Sphere Points

I spent some time dressing up the sphere points script for a video. The points are now added one at a time at the same spot, resulting in some nice swirling effects as they spread out. I also added a bit of color to further emphasize the three dimensionality of the form. There were some artifacts from the encoding when the sphere spins that I couldn’t get rid of, but it doesn’t look too bad. You can see it below or click Here for a bigger version.

Gather Round

Someone recently asked a question in the Cornell scripting group about equally distributing points on a sphere. There was a quick response to the question, pointing to some of the classic spiral distribution algorithms. This came with the caveat that, depending on the number of points you have, there is no mathematically perfect solution. My first reaction was, why try to calculate the position of each point when you could just have the points figure it out for themselves? I may be showing my partiality towards self organization, but nobody pulls out a calculator before blowing a bubble, you just throw it out there and let nature do it’s thing.

So I opened up processing and set up a basic physics simulation, throwing points on a sphere at random and instructing them to stay as far away from each other as they could. The points repel each other depending on how close together they are. Points right next to each other yell “Get away!” and run the other direction, while points that are far from each other call out hesitantly “Keep your distance!”. The result is that each point gets its own space, and each space is roughly equal in size. I say roughly because, even though we aren’t using a single mathematical algorithm to place every point, there’s no getting around the fact that there is no perfect solution to this problem (outside of special situations, such as a dodecahedron or Icosahedron). You can see the result for 100 points below. I added some lines between the closest points to make the space easier to understand in a still image (it looks great in motion so I’ll try to put up an animation soon).

As I typed this up, I searched around and found that a paper on this method of point distribution was published in 2004 called Discretizing Manifolds via Minimum Energy Points. The authors thought this title was a bit too dificult to digest, so they also call it the Poppy-Seed Bagel Theorem (I see what they did there).