Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Questions about surface mesh generation: coordinate system, criteria, randomness

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Questions about surface mesh generation: coordinate system, criteria, randomness


Chronological Thread 
  • From: Nicholas Mario Wardhana <>
  • To:
  • Subject: Re: [cgal-discuss] Questions about surface mesh generation: coordinate system, criteria, randomness
  • Date: Tue, 12 Jul 2011 11:56:17 +0800

Hi Mariette, thank you for your reply!

On 11 July 2011 20:57, Mariette Yvinec
<>
wrote:
>
>
> Note that the coordinate system of a gray image is encoded in the image
> file.

Which of the variables in the header corresponds to it? Are they the
VX, VY, VZ variables? Because I thought they corresponded to the size
of one voxel...

> You are  not required to determine the center of the coordinate system.
> You are just required  to provide a bounding-sphere whose center
> is a point inside the surface you want to mesh and whose radius is big
> enough
> for the sphere to include the whole image.
>

My problem is actually in determining the centre point of the bounding
sphere itself, because the point I chose (inside an arbitrary voxel
with value 0) is rejected on the basis of positive sign, so I was
wondering if the coordinate system of the image is different from my
voxelisation.

As for the radius, as long as the centre is correct, assuming the
dimension of the voxels is x times y times z, I suppose it is always
safe to set the radius to sqrt(x^2 + y^2 + z^2), which is the diagonal
of the dimension?

>
> The radius bound provide an upper bound on the size of the surface mesh
> elements.
> If you decrease it, you will get a finer mesh with more  and smaller
> elements.
> So the right value is function of the size (in terms of number of elements)
>  of the mesh
> you want to generate.
> The centre-centre  bound controls the accuracy of the surface approximation.
> It will also has an influence on the granularity of the mesh.
> Beware that this parameter should not be small
> compared to the precision with which
> points on the level set are computed
> which is be default set to 1E-03 x the bounding sphere radius.
> Typically the  centre-centre distance bound should be 10 times the
> error bound.

Thanks Mariette for the explanation.

I have been doing experiments with various precision and centre-centre
bound (I prefer coarse mesh, so I have a fix 1000.0f for the radius
bound). My original environment consists of two fat polyhedra:

http://i.imgur.com/MVYqt.jpg ,

but the best result I got so far is like a very thin plate. You can
see it (and the corresponding sampled points) here:

http://i.imgur.com/9eHQg.jpg

The points the algorithm samples seem to be concentrated in a
particular area, so I am wondering whether I made a mistake here? Here
is a piece of my code:

// -------------------------- code starts ------------------------------------
typedef CGAL::Surface_mesh_default_triangulation_3 Tr;
typedef Tr::Geom_traits GT;

Gray_level_image image("data/voxel.inr", 0.9f);
GT::Sphere_3 bounding_sphere(bounding_sphere_center,
bounding_sphere_squared_radius);
Surface_3 surface(image, bounding_sphere, 0.001f);
CGAL::Surface_mesh_default_criteria_3<Tr> criteria(30., 1000.0f, 0.1f);
CGAL::make_surface_mesh(c2t3, surface, criteria, CGAL::Manifold_tag());
// -------------------------- code ends ------------------------------------

>
> The surface_mesher has a randomized way of computing a few initial points
> on the surface : it computes intersections with the surface of random rays
> casted from the center of the bounding sphere.
> Depending of these initial points, different connected components
> of the level set can be discovered and meshed. This might explain
> what you observe.
> Hope this helps.
>
>

I see, that seems to explain the phenomenon.

>
> --
> Mariette Yvinec
> Geometrica project team
> INRIA  Sophia-Antipolis



Archive powered by MHonArc 2.6.16.

Top of Page