Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: Accessing vertices and simplex information

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: Accessing vertices and simplex information


Chronological Thread 
  • From: Mariette Yvinec <>
  • To:
  • Subject: Re: [cgal-discuss] Re: Accessing vertices and simplex information
  • Date: Tue, 24 Jan 2012 15:45:37 +0100



If you are using the class
CGAL::Implicit_surface_3<Traits, Function> to define your implicit surface,
there is a parameter error_bound
in the creator that let you tune the precision with which
points on the surfaces are computed. Be carefull that this error bound
is relative to the size of the bounding sphere.
I quote the manaual below

Implicit_surface_3<Traits, Function> surface ( Function f, Sphere_3 bounding_sphere, FT error_bound = FT(1e-3)); f is the object of type Function that represents the implicit surface.
bounding_sphere is a bounding sphere of the implicit surface. The evaluation of f at the center c of this sphere must be negative: f(c)<0.
error_bound is a relative error bound used to compute intersection points between the implicit surface and query segments. This bound is used in the default generated traits class. In this traits class, the intersection points between the surface and segments/rays/line are constructed by dichotomy. The dichotomy is stopped when the size of the intersected segment is less than the product of error_bound by the radius of bounding_sphere.


Le 24/01/12 14:49, phdprav a écrit :
Mariette Yvinec wrote
The function
template <class C2t3>
bool output_surface_facets_to_off (std::ostream& os,
                    const C2t3& c2t3,
                    int options =
                    Surface_mesher::IO_ORIENT_SURFACE)
available in file
CGAL/IO/complex_2_in_triangulation_3_file_writer.h
should do more or less what you want

Dear Mariette,

First of all thank you for your answer, it was very useful. The implicit
surface mesher has allowed me to create a wide range of different surfaces
with varying smoothness to perform numerical tests on. 

One issue I've had with it was that the generated points of the mesh were
not close enough to the actual surface for the particular numerical tests
I had in mind. To give you an example, when meshing the unit sphere the
resulting l2 norm of points of the mesh was around 10^-4 away from 1.
Ideally I'd like points much closer to the actual surface. Is there some
tolerance parameter that can be set to increase the accuracy? Thank you.

Le 06/12/11 11:32, phdprav a écrit :
Dear cgal community,

I am new to CGAL and this should hopefully be a rather simple question. I
am
trying to obtain the vertices and corresponding simplex for a 3D surface
defined implicitely as a level set function. My starting point is the
example program mesh_an_implicit_function.cpp

I'd like to modify this program so that it outputs a file with a format
similar to the one shown below:

VERTEX // Coordinates of the vertices
1 0 1  // vertex 0
0 -1 0 // vertex 1
1 0 0 // vertex 2
1 0 -1
-1 0 0
0 1 0

SIMPLEX
0 1 2 // triangle 0 made up of vertex 0, 1, 2.
1 3 2
1 4 3
4 5 0
0 1 4
4 5 3
0 5 2
5 3 2

So basically all I want is to access the vertices, and to know which
vertices form which elements, of a given mesh generated by the example
code
mesh_an_implicit_function.cpp. Any advice on how I should go about doing
this? Thank you.

--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Accessing-vertices-and-simplex-information-tp4164177p4164177.html
Sent from the cgal-discuss mailing list archive at Nabble.com.

-- 
Mariette Yvinec
Geometrica project team
INRIA  Sophia-Antipolis




-- 
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss


--
View this message in context: http://cgal-discuss.949826.n4.nabble.com/Accessing-vertices-and-simplex-information-tp4164177p4323779.html
Sent from the cgal-discuss mailing list archive at Nabble.com.


-- 
Mariette Yvinec
Geometrica project team
INRIA  Sophia-Antipolis  





Archive powered by MHonArc 2.6.16.

Top of Page