Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] meshing a disk implicitly with circle_3

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] meshing a disk implicitly with circle_3


Chronological Thread 
  • From: Sean McDuffee <>
  • To:
  • Subject: Re: [cgal-discuss] meshing a disk implicitly with circle_3
  • Date: Tue, 24 Mar 2009 17:13:29 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=clISjjWtBgquVoUwJuJZCLUCq5l+3TC0F/WbW1ez2sch8HfME3UA44GZhwjEePwEWK RcpbkDDyneqAmMfEjHtlvdbAO/cC+AMcVasGGdiJ1aiT2ikJ4Ozsca9hpKmojbyxotDG 0bzh3gjS7+yM8hxew0NSINgEGCaimtuknEgOk=

K - realized I needed to use a sphere_3 as a bound not a circle_3 and that my implicit func here is an infinite cylinder.  But still don't know how to generate a well triangulated disk.  Anybody?

On Tue, Mar 24, 2009 at 2:21 AM, Sean McDuffee <> wrote:
Hi,

I'm trying to generate a meshed disk using the following code but end up with a cylinder.

typedef CGAL::Surface_mesh_default_triangulation_3 Tr;
typedef CGAL::Complex_2_in_triangulation_3<Tr> C2t3;

typedef Tr::Geom_traits GT;
typedef Tr::Vertex_handle Vertex_handle;
typedef GT::Sphere_3 Sphere_3;
typedef GT::Circle_3 Circle_3;
typedef GT::Vector_3 Vector_3;
typedef GT::Point_3 Point_3;
typedef GT::FT FT;

typedef FT (*Function)(Point_3);

typedef CGAL::Implicit_surface_3<GT, Function> Surface_3;

FT circle_function (Point_3 p) {
  const FT x2=p.x()*p.x(), y2=p.y()*p.y();
  return x2+y2-1;
}

int main(int argc, char* argv[]) {
  Tr tr;        
  C2t3 c2t3 (tr);  

  Surface_3 circle_surface(circle_function,
               Circle_3(CGAL::ORIGIN, 4., Vector_3(0.,0.,1.)));       

  CGAL::Surface_mesh_default_criteria_3<Tr> criteria(30.,
                                                     0.1, 
                                                     0.1);

  CGAL::make_surface_mesh(c2t3, circle_surface, criteria, CGAL::Non_manifold_tag());

}

Anybody spot what I'm doing wrong?  thanks

Sean






Archive powered by MHonArc 2.6.16.

Top of Page