Problem 1935. Spherical surface triangulation
Create a triangulation of a spherical surface with approximately-uniform coverage
http://www.alfnie.com/software/print_sphere01.jpg
Description:
A rather crude way to obtain a triangulation of the spherical surface would be:
[x,y,z] = sphere(64); fvc = surf2patch(x,y,z,'triangles');
The function sphere creates a uniform grid in spherical coordinates, so the resulting triangulation produces very small triangles/faces at the poles and considerably larger triangles/faces at the equator (see the sphere at the right in the examples above).
In general (with a few exceptions) it is not possible to construct a tessellation of the spherical surface made of triangles of exactly the same size. But we can try...
Your function should return a tessellation of the unit-sphere surface formed by triangles with side lengths as similar as possible (as close to identical equilateral triangles as possible). An example of a somewhat reasonable solution would be the sphere at the left in the examples above.
Details:
Given a number N your function should return an approximately uniform triangulation of the spherical surface with at least N vertices.
Uniformity is measured as the ratio between the longest and the shortest edge across your entire triangulation (lower numbers are better). This ratio should be lower or equal to 2 in order to pass this problem (in other words, the longest edge should be at most twice the size of the shortest edge). Your solution will receive a score 1000*(ratio-1). A score of 0 would correspond to identical equilateral triangles.
The function output should be a valid PATCH format: a structure with fields vertices (with size Nx3; each row of vertices defining the 3d coordinates of each vertex) and faces (with size Mx3; each row of faces defining the three vertices in each face/triangle as indices into the rows of the matrix vertices).
Solution Stats
Problem Comments
-
1 Comment
The tip here is averages. Catmull & Clark used them to smooth polyhedra for instance.
Solution Comments
Show commentsProblem Recent Solvers17
Suggested Problems
-
Find common elements in matrix rows
2633 Solvers
-
given 3 sides, find area of this triangle
797 Solvers
-
336 Solvers
-
Cell Counting: How Many Draws?
1902 Solvers
-
306 Solvers
More from this Author38
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!