Sphere approximation with subdivisions of icosahedron

Standard way of rendering sphere is by divinding into triangles at regular angles - which gives very different sizes of triangles near the poles and ‘equator’. Probably a lot better way would be to start from icosahedron (which is very sphere-like given it is composed from 20 triangles only) and then subdivide the triangles for better level of detail. Does anybody know about ready to use algorithm for it ? It doesn’t have to be java3d specific, just something outputting the triangle coordinates. Even coordinates for basic icosahedron would be nice :slight_smile:

If not, I’m considering writing one. One question which comes to my head - if I would like to approximate the sphere of radius 1, should the vertices of icosahedron be at distance one from center (and stay there when more and more vertices are added with better level of detail) or should they be moved a bit further for basic LOD and get closer and closer to sphere radius with each detail step (which would mean that volume of the solid would be always the same) ?

Link to the sphere code of Jon Leech - haven’t tried it myself though; also gives icosahedron coordinates:
http://www.neubert.net/Htmapp/SPHEmesh.htm

Some more in the CGA FAQ:
http://cgafaq.info/wiki/Evenly_Distributed_Points_On_Sphere

I believe that Java 3D improved upon its sphere tesselation some versions back.

Thanks a lot - I was looking for a code like that.

Since my last post I have realized that putting a texture on top of such sphere will not be an easy undertaking, but maybe it can be solved easily with pixel shader, skipping interpolation on vertex level completly.