Making a Sphere the hard way

A while back, I started doing some experiments with magnetic attraction and gravitational fields. I had seen a video where drops of ferromagnetic fluid were placed in a weak magnetic field. The drops, which all had like charges were pushing away from each other, but ultimately were drawn to the center of the weak magnetic field. As the drops jockey for position, they eventually stabilize in smooth spirals not unlike the spiral patterns seen in the center of sunflowers.

I cannot seem to locate the original video, but I found this which shows some pretty nifty ferrofluid effects.

Recently, I revisited my magnet experiment and cleaned up the code. I wanted to see if I could make a tessellated sphere by placing a bunch of charged particles in a gravitational field but making the gravitational field repulse if the magnets come within a certain distance from the center of the grav field.

This sample video shows a bunch of points organize themselves into a sphere.

Couple of 2 dimensional examples: 1, 2.