Archive for the centroid tag
Tutorial #3: The icosahedron-based geodesic sphere
This quick tutorial will show a more reasonable alternative to the electronsphere, which addressed the problem of distributing points evenly on a sphere. We’ll be creating a geodesic sphere (like at the Epcot center) using a subdivided icosahedron. It’s a relatively simple script and inexpensive in terms of CPU usage. Much more efficient than the electronsphere approach, though not quite as interesting.
Here’s where we’re headed: The final result
And here are the classes you’ll need: Icosahedron classes
About the geodesic sphere
The geodesic dome and sphere are often credited to Buckminster Fuller, although it is generally acknowledged that he did not invent the shape or concept, but rather investigated and expanded upon them. Read more in the Wikipedia article on geodesic spheres.
There is no one standard way to create a geodesic, but in general, the process is as follows:
- Create a Platonic solid. We’ll be using the icosahedron.
- Subdivide the faces of the Platonic solid to the desired level of resolution.
- Project the points of each subdivided face to the surface of a sphere.
Additionally, the term buckyball is used to describe the truncated counterpart to the geodesic sphere. Buckyballs are found frequently in molecular science… and also in soccer. We’ll take a look at how to convert one to the other.
Why create a geodesic sphere?
If you need to create a sphere in Processing just for decoration or whatnot, by all means, use the sphere() command. You do not need this level of complexity.
But let’s say that you need a sphere that can transform itself into a different shape, or warp itself according to some input variable, or behave like a blob… then you’ll probably want to use a geodesic. As I mentioned, its one of the most straightforward ways to create an array of points on a sphere.
Of course, you could also use this script in more physical applications: the coordinates it defines could be used to construct a real-life geodesic structure. You’d probably want to drop the points into Rhino and unfold the thing first.
What you’ll learn
I’ll touch upon the following issues in this tutorial:
- Subdividing a face to an arbitrary level of resolution.
- Constraining points to a sphere.
- Finding the centroid of a face.
- And of course, more about geodesics.
Still sound interesting?

The article has
no responses yet