How to generate a subdivided icosahedron?
Data Structures & Algorithms practice on Codemia
Step through 300 algorithm problems with animated visualisers that show the data structure changing as the code runs.
Generating a subdivided icosahedron is a fundamental technique in computer graphics and computational geometry, often used to produce smoother spherical surfaces such as spheres for 3D models, geodesic domes, or atmospheric simulation meshes. This article will delve into the technical aspects of how to achieve a subdivided icosahedron, providing explanations, examples, and supporting details to enrich the understanding.
Understanding the Basic Icosahedron
An icosahedron is a polyhedron with 20 equilateral triangular faces, 12 vertices, and 30 edges. It is one of the five Platonic solids and presents a fair symmetry, making it an ideal starting shape for constructing a sphere-like form through subdivision.
Properties of an Icosahedron
• Number of Faces: 20 • Number of Edges: 30 • Number of Vertices: 12 • Face Type: Equilateral triangles
Process of Subdividing an Icosahedron
The subdivision process involves the refinement of an icosahedron's faces into smaller triangles, thereby increasing the approximation to a sphere. A common algorithm used for this process is the Loop subdivision, but for simplicity and widespread use, the following method focuses on dividing the edges and normalizing vertices.
Step-by-Step Guide to Subdividing
- Initial Setup: Start with a standard icosahedron. The vertices of an icosahedron inscribed in a unit sphere have coordinates derived from the golden ratio, .
- Edge Subdivision: • For each triangular face, identify the midpoints of each edge. • Normalize these new points to enforce that they remain on the unit sphere.
- Creating New Faces: • For each triangular face, replace it with four smaller triangles using the original vertices and the newly calculated midpoints. • This subdivision increases the number of faces and vertices exponentially based on the level of subdivision.
- Normalizing Vertices: • After adding new vertices, project them to the unit sphere by normalizing their coordinates (dividing each coordinate by the length of the vector).
- Repeat: Repeat steps 2-4 for the desired level of subdivision, each iteration increasing the smoothness and spherical appearance.
Example Code
Here is a simplified Python snippet using a vector library for performing one level of subdivision:
Related reading
- How to generate all multiplicative partitions of a number if I have a list of primes/exponents?
- How to generate all permutations of a string in PHP?
- How to generate all the permutations of a multiset?
- how to generate Narcissistic numbers faster?
- How to generate random graphs?
- How to generate random numbers biased towards one value in a range?
- How to generate the power-set of a given List?
- How to get a normal distribution within a range in numpy?

DSA Fundamentals
Master algorithmic patterns and data structures through hands-on LeetCode-style problems - from arrays and hashing to dynamic programming and advanced graphs.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Data Structures & Algorithms practice on Codemia
Step through 300 algorithm problems with animated visualisers that show the data structure changing as the code runs.