Sphere with equally sized triangles

I think this is called a "geodesic sphere", is that right?



Does anyone have an algorithm/code that creates one? I simply need I sphere with equally sized tiles. I can't think of any other geometry but a geodesic sphere. The triangles are supposed to be equal in size when looking straight down on the sphere (planetary object). I will add any height/depth information (hills, mountains, …) to offset the vertices from/to the center of the sphere in an additional step later… Does anyone have code for this? C/C++ would be fine too.



Is it right the base object for such a geometry is a dodecahedron, that is, 5 triangles form a complete fan, not 4, not 6…?



Maybe someone has an algorithm/code to create a dodecahedron easily? I would then tile each triangle with 4 or 9 triangles and offset the resulting subvertices accordingly.



I bet this is standard code…



Ahm, BTW: Wouldn't this be a nice extension for a future jME?



-> new Dodecahedron and new GeodesicSphere classes… I bet there are many situations, where game developers need a sphere with equally sized triangles… -> Planets etc…



Karsten

Yes, this is called Geosphere in max. I posted about it here. But I didn’t know how texture coordinates should be mapped… if you can tell how this should happen I will happily add a geosphere to jME.

Hmm I might not be quite in the picture about it… Where's the difference between mapping a standard sphere and a geosphere?



You mean, because there is no actual axis you can calc the UV coords from?? :?

Yes, you could compute normal polar mapping coordinates for the geosphere (which is quite expensive, but acceptable as only for creating the mesh). But it looks really bad :frowning: even worse than on a normal sphere :’(

Hi irrisor!



I followed the link you posted…



Where can I get the sources from? I can't see any download locations, neither your code nor Ogli's…



Can anyone tell me how to get them?



Karsten

Sorry for the late answer.

I did not upload the code anywhere because I was still missing texture coordinates.

But I think I could simply add the GeoSphere to jME - probably with polar texture coordinates. Stay tuned (I hope to get it done tomorrow).

I have committed the GeoSphere with polar texture coordinates.

cool! good work!

little thing, any reason you put it in it's own package, spent time looking where I expected it to be

own package :? it's right besides Sphere, isn't it?

I mean the test sorry about that

Ah, well yes. The other simple shape tests (like Sphere) are spread over the 'renderer' and other packages. I think a new shape package was needed. Maybe there can go other such tests lateron.