Hey, I'm trying to triangulate a country on the surface on the earth. I want to limit the size of the triangles so that when I convert it from 2d points to 3d points they aren't too long/big so that when I overlay it on the surface of the parent sphere it doesn't get clipped under the surface. Is there any way to do this? The shapes are also concave as well.
Triangulation with maximum triangle size
Crossbones+ - Reputation: 4691
Posted 18 February 2013 - 05:20 PM
Are you triangulating the surface covered by the country, or only the outline? Really in either case you can simply tessellate the object using whatever scheme you want, and then just iterate over the list of triangles and split it up until you go below a particular size metric. For example, any edge that is longer then epsilon would get split, forming two triangles out of one. This can be done recursively until all the triangles meet your criteria...
Jason Zink :: DirectX MVP
Direct3D 11 engine on CodePlex: Hieroglyph 3
Direct3D Books: Practical Rendering and Computation with Direct3D 11, Programming Vertex, Geometry, and Pixel Shaders
Articles: Dual-Paraboloid Mapping Article :: Parallax Occlusion Mapping Article (original):: Fast Silhouettes Article
Games: Lunar Rift
Crossbones+ - Reputation: 2513
Posted 19 February 2013 - 02:56 AM
Assuming the "triangle size" you want to limit is actually edge length, you can immediately split any long edge into enough equal pieces to respect the limit, introducing new vertices along the original edge; after splitting the given boundary edges you can split long edges as soon as triangulation creates them. If you triangulate by ear clipping, triangles can turn into fans of 2 triangles; other approaches might create longer edges with more splits.
Members - Reputation: 416
Posted 20 February 2013 - 07:09 PM
A triangulation which attempts to give you the best quality triangles by enforcing a rule that a circle drawn through the vertices of a triangle cannot contain the vertices of any other triangle.