Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Sampling in the volume of the mesh

Subject: CGAL users discussion list

List archive

[cgal-discuss] Sampling in the volume of the mesh


Chronological Thread 
  • From: Rifat Aras <>
  • To:
  • Subject: [cgal-discuss] Sampling in the volume of the mesh
  • Date: Sun, 2 Oct 2011 19:17:54 -0400

Dear CGAL users,

I have a triangular closed mesh (like the shell of a sphere). I want to sample some 3D points in the volume defined by the convex hull of the mesh.

I think the 3D triangulation class of CGAL is a perfect match for this problem. From the manual: "The basic 3D-triangulation class of CGAL is primarily designed to represent the triangulations of a set of points
A in R3. It is a partition of the convex hull of A into tetrahedra whose vertices are the points of A". Only the last part of this definition bugs me a little bit as I want points not only on the outer shell but also inside the volume.

If 3D-triangulation class (or another class of CGAL) will not do the job for me, I guess I will need to implement my own sampling routine. For that purpose, I have something like the following in my mind:

- Compute the bounding volume of the mesh
- Shoot a random ray in the bounding volume
- Find the intersection points of the ray with the mesh
- Sample some points on the portion of the ray that is inside of the mesh
- Repeat until I have enough points.

Any comments about this?

Cheers, Rifat Aras.



Archive powered by MHonArc 2.6.16.

Top of Page