Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] 3d surface mesher non deterministic

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] 3d surface mesher non deterministic


Chronological Thread 
  • From: Laurent Rineau <>
  • To:
  • Subject: Re: [cgal-discuss] 3d surface mesher non deterministic
  • Date: Thu, 25 Sep 2008 11:29:35 +0200

On Thursday 25 September 2008 04:30:02 HAQUE, AKTER_HASNINE (GE Healthcare)
wrote:
> Hi.
> This is Hasnine from Japan. according to the advice of Laurent I have
> modified the CGAL/examples/Surface_mesher/mesh_an_implicit_function.cpp
> by Adding #include <CGAL/Random.h> and CGAL::default_random =
> CGAL::Random(0);
>
> however, I have faces an compilation error. Do you have the same problem
> !! Please advice me how to fix this.

Right, my advice was false.

Line 308 of <CGAL/Surface_mesher/Implicit_surface_oracle_3.h>, there is:

typename CGAL::Random_points_on_sphere_3<Point,
Point_creator> random_point_on_sphere(CGAL::to_double(radius));
typename CGAL::Random_points_in_sphere_3<Point,
Point_creator> random_point_in_sphere(CGAL::to_double(radius));

Those lines creates to points generators. Just turn those lines to:

CGAL::Random random(0); // choose seed=0;
typename CGAL::Random_points_on_sphere_3<Point,
Point_creator> random_point_on_sphere(CGAL::to_double(radius), random);
typename CGAL::Random_points_in_sphere_3<Point,
Point_creator> random_point_in_sphere(CGAL::to_double(radius), random);

I hope this time that is correct! (Not tested) Anyway, you see the point: if
CGAL::default_random cannot be change, just create another CGAL::Random
object, and use that one.

--
Laurent Rineau, PhD
Engineer at GeometryFactory
http://www.geometryfactory.com/



Archive powered by MHonArc 2.6.16.

Top of Page