0

I've been working on a project that needs to triangulate a sphere. I've known ear-clipping algorithm and know how to apply it in a non-closed polygon, like a plane.

But how to triangulate a closed polygon, like a sphere?

Noah Zuo
  • 98
  • 12
  • It seems you are mixing up terminology (which makes it a bit hard to understand your question). A sphere isn't a polygon. You could approximate it with a polyhedron. Ear clipping triangulates polygons by filling them with triangles. The analog for polyhedra would be a tetrahedralization (i.e. filling it with tetrahedra). But a sphere is a continuous surface, whereas triangulations and tetrahedralizations work on (or produce) discrete shapes. So it doesn't really work together. What is it that you are actually trying to achieve? – Nico Schertler Nov 11 '17 at 10:11
  • Thanks for your comment@Nico Schertler . It seems that I need to approximate the sphere with some other polygons. I am currently working on a game project like spore which can make player customize creature limbs. So I need to re-write the skinning part. – Noah Zuo Nov 11 '17 at 10:15
  • If it's just spheres, then it is probably easier to just generate a mesh for it directly (look e.g. [here](https://stackoverflow.com/questions/4081898/procedurally-generate-a-sphere-mesh)). – Nico Schertler Nov 11 '17 at 10:53

1 Answers1

0

I'm assuming from your question that you want to panel a spherical surface with 3D patches. I would start by sketching a 2D equilateral triangle. Get some practice segmenting it into 4 half-size equilaterals, then each of those into 4 more, etc.

In 3D, you can do the same recursive triangulation on the 4 faces of a regular tetrahedron. Except, if each vertex is normalized to unit length, then you inflate your triangulated polyhedron into a sphere of triangular patches. You can use these patches to render a solid surface rendering (you'll want to learn how a simulated light source and shading works( e.g. Lambertian, Goraud, Phong ). Or, you can draw the edges of the patches as line segments to create a wireframe mesh.

pbierre
  • 276
  • 1
  • 8