# Moddeling a sphere from triangles

This topic is 4509 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, I'm quite new to 3D and I'm looking for some resources about modeling a sphere out of triangles. I hope you know what I mean, 'cause I can't explain it in a different way. I am using ActionScript (Flash) so please don't point me to specific libraries or pre-made classes 'cause I won't be able to use them. It's because I'm new to 3D that I don't know what to google for and I hope you guys can help. Greets, Dauntless

##### Share on other sites
It's commonly done by tessellating an octahedron or an icosahedron (8- or 20-sided polyhedra). These base shapes are convenient because they're symmetrical and made of equilateral triangles to begin with. The way this method works is you split each triangle into four by placing vertices at the midpoint of each edge. Then you move these vertices to the same distance from the origin (center of the sphere) as the original vertices, which is what makes it round. If you started with an octahedron you'll now have a 32-sided somewhat-round object. You can repeat the routine several times depending on how perfectly round you want it. Each iteration quadruples the number of triangles while making the shape a closer approximation of a sphere.

an old thread that illustrates how the triangle is split

##### Share on other sites
Just a side note, if you want each side to be sized exactly the same, the 20-sided icosahedron is the most faces you can have.

If you are willing to have differing sizes of triangles, you can just use sine and cosine to compute each vertex rather than going through all the subdivisions. Use m rows and n columns. Divide up your sphere along m latitude lines and n longitude lines.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 14
• 10
• 9
• 35
• 16
• ### Forum Statistics

• Total Topics
634125
• Total Posts
3015674
×