Search code examples
cgal

CGAL: How to create a sphere mesh?


How can I build a sphere mesh by cgal? I want to use SurfaceMesh data structure to store a sphere

I tried to use the example: Surface_mesher_2mesh_an_implicit_function_8cpp-example But the sphere is irregular in shape. irregular_sphere And I want to generate a sphere like this, what should I do? regular_sphere


Solution

  • I found this blog post by Daniel Sieger.
    Note that CGAL offers the subdivision functions, as well as the function to construct an isocahedron So you have to assemble this and add the projection to the sphere.