Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Overriding Implicit surface oracle behavior for SurfaceMesher
Chronological Thread
- From: "Laurent Rineau (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Overriding Implicit surface oracle behavior for SurfaceMesher
- Date: Thu, 8 Oct 2009 12:24:55 +0200
- Organization: GeometryFactory
On Wednesday 07 October 2009 22:24:01
wrote:
> Hi.
> I'm just learning my way around CGAL 3.5-bet1 and I have been experimenting
> with the SurfaceMesher example.
Hi,
CGAL-3.5 is now released, since Monday. You can upgrade. However, as far as I
know, nothing has been changed (by documentation details), in Surface_mesher.
See the file CHANGES_from_CGAL-3.5-beta1 which is included in CGAL-3.5 finale
tarball.
> I would like to work with an implicit representation that defines a surface
> in terms of both the value of the function and its gradient (magnitude).
>
> Reading the manual gave me the impression that it would be a
> straightforward matter to create a new model of ImplicitSurfaceTraits3 for
> the SurfaceMesher to use my new oracle, but now that I have waded around
> in the code a bit I don't quite see how to do it.
>
> Is this in fact a simple thing to do and if so, would someone point me in
> the correct direction to get started?
If you want to create a new model for the concept ImplicitSurfaceTraits_3,
that deals with implicit representation, you can adapt the class template
Implicit_surface_oracle_3 in
<CGAL/Surface_mesher/Implicit_surface_oracle_3.h>.
That class is a model of ImplicitSurfaceTraits_3 that works by bissection: it
assumes the object is fully contained in a given bounding sphere, and, once a
query segment/ray/line is passed to the sub-functor Intersect_3, the query is
clipped to the sphere, so that it is always a segment and, if the value of
the
function at the extremities of that segment are different, a bissection is
done on that segment, to find compute an intersection point. The sub-functor
Construct_initial_points uses Intersect_3 to find initial intersection
points,
by throwing random ray queries, until we get a given number of initial
intersection points.
If you want to adapt that computation to use not only the values of the
function but also the gradient, you should have a look at, and modify, the
function Intersect_3::intersect_clipped_segment(...) of the sub-functor
Intersect_3 of the traits class. That function member is the one that really
does the bissection once the queries are clipped by the bounding sphere.
--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/
- [cgal-discuss] Overriding Implicit surface oracle behavior for SurfaceMesher, dsterling, 10/07/2009
- Re: [cgal-discuss] Overriding Implicit surface oracle behavior for SurfaceMesher, Laurent Rineau (GeometryFactory), 10/08/2009
Archive powered by MHonArc 2.6.16.