icosahedron
geometry
3D modeling
subdivisions
computational graphics

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.

Practice algorithms

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

  1. Initial Setup: Start with a standard icosahedron. The vertices of an icosahedron inscribed in a unit sphere have coordinates derived from the golden ratio, ϕ=1+52\phi = \frac{1 + \sqrt{5}}{2}.
  2. 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.
  3. 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.
  4. 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).
  5. 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
Course
Intermediate
27 lessons
15 hours
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 course
Track 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.

Practice algorithms

All Rights Reserved.