Skip to Content.
Sympa Menu

cgal-discuss - meshing a implicit surface

Subject: CGAL users discussion list

List archive

meshing a implicit surface


Chronological Thread 
  • From: "gre6" <>
  • To:
  • Subject: meshing a implicit surface
  • Date: Sun, 4 May 2008 11:47:50 +0800 (CST)

hi all!
I want to mesh a torus surface and the equation is (x^2+y^2+z^2+10^2-5^2)^2=4*10^2*(x^2+y^2), which is the equation (y-10)^2+z^2=5^2&&x=0 spin around the z axis. I revised the example code /examples/Surface_mesher/mesh_an_implicit_function.cpp as below:

FT sphere_function (Point_3 p) {
const FT x2=p.x()*p.x(), y2=p.y()*p.y(), z2=p.z()*p.z();
FT a = x2+y2+z2+100.0-25.0;
return a*a-400.0*(x2+y2);
}

Surface_3 surface(sphere_function, // pointer to function
Sphere_3(Point_3(0,10.0,0), 100.0)); // bounding sphere

CGAL::Surface_mesh_default_criteria_3<Tr> criteria(30.0, // angular bound
0.8, // radius bound
0.8); // distance bound


But when I run the program it abort with the below information:
CGAL error: assertion violation!
Expr: false
File: /usr/include/CGAL/Delaunay_triangulation_3.h
Line: 1068
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct NULL not valid
Aborted

I don't know how to handle it. Any suggestions is helpful.
Thank you!

gre6




===============================================
快来和我一起享受TOM免费邮箱吧! 看看除了1.5G,还有什么?
===============================================


  • meshing a implicit surface, gre6, 05/04/2008

Archive powered by MHonArc 2.6.16.

Top of Page