Sunday, November 13, 2011

Math Problem: Evenly spaced points on a sphere - Part 2

Continued from Part 1

In an ideal case, we would be able to position all the points around the sphere so that they formed equilateral triangles and all the adjacent points were exactly the same difference apart.

I should be more specific about what I mean by adjacent points. Draw a line connecting the two points that are closest to each other. Then draw a line connecting the next two points that are the next closest to each other and where the line wouldn’t cross any other existing lines. Continue along like this until no more lines can be drawn. The points with a line connecting them are considered to be adjacent.

In the ideal case, we can divide the surface area of the sphere by the number of triangles to find the surface area along the sphere of each triangle.

Let’s find the relationship between the number of points, the number of triangle edges, and the number of triangular faces. A tetrahedron has four points, six edges, and four faces. Whenever you add another point that is not in the same spot as an existing point, it will either fall along an existing edge or on a face. In either case, there will be three more edges and two more faces.

points edges faces
4 6 4
5 6+3 4+2
6 6+3+3 4+2+2
n 3 (n - 2) 2 (n - 2)

So in the ideal case, the spherical surface area A of each triangle is

A = (2 pi r^2) / (n-2)

Now let’s find the relationship between the distance 'd' along the surface of the sphere between two adjacent points and the spherical surface area of the triangle anchored by these two points. We can use Girard's theorem to find the relationship between the spherical vertex angle 't' and the spherical surface area A, and we can use the spherical law of cosines to find the relationship between the distance 'd' and the vertex angle 't'.

Use the spherical law of cosines.

Let a = d/r

cos(a) = cos(a)^2 + sin(a)^2 cos(t)

Solve for a.

First use the Pythagorean trigonometric identity to substitute.

cos(a) = cos(a)^2 + (1-cos(a)^2) cos(t)

Group the terms.

(1-cos(t)) cos(a)^2 - cos(a) + cos(t) = 0

Use the quadratic formula.

cos(a) = (1 +- sqrt(1 - 4 (1 - cos(t)) cos(t))) / (2 (1 - cos(t)))


cos(a) = (1 +- sqrt(1 - 4 cos(t) + 4 cos(t)^2)) / (2 (1 - cos(t)))

cos(a) = (1 +- (1 - 2 cos(t))) / (2 (1 - cos(t)))

cos(a) = 1 or cos(t) / (1 - cos(t))

We can ignore the case when cos(a) = 1 because that is when a = 0 or 2 π, which is when the two points are in the same location.

Now use Girard's theorem.

A = (3 t - pi) r^2

Solve for t.

t = (A + pi r^2)/(3 r^2)

Substitute for A.

t = (n pi)/(3 (n - 2))

Now substitute this for t in the equation for cos(a) above.

cos(a) = cos((n pi)/(3 (n - 2))) / (1 - cos((n pi)/(3 (n - 2))s))

In most cases we will not be able to position the points into perfect equilateral triangles of this size because the triangles will start to overlap or leave gaps with each other, but we can do it for n=4 the tetrahedron, n=6 the octahedron, and n=12, the icosahedron.

In the other cases, we can measure the amount of unevenness U by looking at the difference between the ideal distance between adjacent points 'd' and the actual distance between adjacent points dk. Define U as the sum of the squares of these differences:

U = sum( (dk - d)^2 )

For the tetrahedron, octahedron, and icosahedron, U = 0. For the other cases, we will try to position the points so that U is as small as possible.

So the next questions are whether there is a way to systematically position the points to minimize U, and given a configuration of points, how can you tell if U for this configuration is the lowest possible.

You can probably show that U is a local minimum if moving any one point by some small distance delta in any direction causes U to increase, but how do you determine whether that local minimum is the lowest minimum possible?

One way to explore this further is to build a computer simulation of marbles around the surface of a sphere that are all magnetically opposed to each other. Or better yet, let the force between any two adjacent points be proportional to the square of the difference between the actual distance between the points and the ideal distance between the points, so that the points are always being pushed towards the ideal distance.

Continue to Part 3

No comments: