Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to plot N points on the surface of a D-dimensional sphere roughly equidistant apart?

Let's say I have a D-dimensional sphere with center, [C1, C2, C3, C4, ... CD], and a radius R. Now I want to plot N number of points evenly distributed (equidistant apart from each other) on the surface of the sphere. It doesn't matter where those points are exactly, just that they are ROUGHLY equidistant from each other. I want a function that returns an array of these points, P.

function plotter(D, C[1...D], R, N)
{
   //code to generate the equidistant points on the sphere

   return P[1...N][1...D];
}

3-dimensional sphere with many points

3-dimensional sphere with a few points

like image 989
Dane Iracleous Avatar asked Oct 03 '12 01:10

Dane Iracleous


People also ask

What is the maximum number of points in space that can be equidistant from each other?

geometry - Maximum number of mutually equidistant points in an n-dimensional Euclidean space is (n+1).

Is a sphere equidistant?

A sphere is a set of points in three dimensional space equidistant from a point called the center of the sphere. The distance from the center to the points on the sphere is called the radius of the sphere.

How many points are on a sphere?

A sphere is uniquely determined by four points that are not coplanar. More generally, a sphere is uniquely determined by four conditions such as passing through a point, being tangent to a plane, etc.


2 Answers

Several options :

  • Randomly throw points on the sphere and use a Lloyd relaxation to make them uniformly spread : you iteratively compute their Voronoi diagram and move them toward the center of their Voronoi cell (instead of working on the sphere, you may want to use an euclidean voronoi diagram restricted to the sphere : CGAL can fo that for instance, or refer to my article).

  • If a rough approximation is fine (ie., if a uniformly random distribution is good enough), you can use the formula explained on Wiki : N-Sphere . If not, you can still use this random sampling as the initialization of the method above

  • For a still random but better notion of equidistant samples, you can generate a Poisson-disk distribution. Fast code in high dimension is available at Robert Bridson's homepage . You may need to adapt it for a spherical domain though.

like image 130
nbonneel Avatar answered Sep 17 '22 14:09

nbonneel


I don't know if this has been mentioned here yet; but you could, as others have suggested draw points from the uniform distribution on the sphere. After which, flow each point according to columb energy; using a gradient descent method. This particular problem has received a lot of attention. Check out the following paper and this website

like image 27
Arvind Avatar answered Sep 21 '22 14:09

Arvind