JaroslawWiosna/equidistant

Basic positioning alghoritm needs fundamental change

Closed this issue · 1 comments

Description

Let's randomly put 4 points on unit sphere. The goal is to move the points to the following configuration:

IMG

So the points coordinates are*:

p1 = ( 0, -1/3 * pi)
p2 = ( 0, 1/3 * pi)
p3 = ( 2/3 * pi, 0)
p4 = ( 4/3 * pi, 0)

There are an infinitive number of ways to put the points so they are equally distant

Honestly, I am not sure about coordinates anymore; according to wiki, this configuration is identical or, at least similar to tetrahedron

How to do it?

Firstly, every single point on unit sphere can be represented by two parameters:

  1. phi - [0, 2*pi)
  2. theta - [-pi/2, pi/2]

Secondly, on a sphere we have two points, that are equally distant from three points:
(x, y) and (x + pi, y * (-1))

....so, the algorithm is:

  • Pick one point. Let's call it A
  • Find three closest points to A. Sort them and let's call them B (is the closest), C, D.
  • Create 4 new points by adding and subtracting to phi and theta 0.0001 rad
  • Check which (if any) is more optimal than A, then this point is the new A.
  • Repeat procedure for remaining points. And once again for all points, and again...

What is more optimal?

According to my understanding of the problem we want A to move to (x, y) or (x + pi, y * (-1))
And when we have only 4 points on sphere in total, it is better to point to move where the distance from B, C, D is greater.

only 4 points? - image 20 points on a sphere, it's obvious, that we want that point (from the proposed two) that is closer to 3 neighbours. (I cannot explain it with words, if anyone wants a picture, please, let me know)

What is the stop criterium?

I think that point A shouldn't move when distance(A,B) = distance(A,C) = distance(A,D)


My questions?

  1. Perhaps problem would be easier to solve on the surface of unit cube?
  2. How to define distance function? My suggestions:
  • using the Pythagorean theorem twice click
  • absolute value of difference between phis + absolute value of difference between thetas
  • And maybe final result of calculate distance function should be the sum of d(A,B) + d(A,C) + d(A,D)
  1. What about moving A so the distance(A,B) will be greater? Eventually, C will be closer to A. Then let's move A so the distance(A,C) will be greater. Finally d(A,B) = d(A,C) = d(A,D), aren't they?
  2. What about moving all points in parallel in one step?
  3. Since the problem in 3D is not trivial, what about 2D? Let's imagine unit square and move them in a similar way? So, two points will move to the opposite corners, 4 points will move to corners, what about 6 points? Just like 4 points case and an additional one in the very center?
  4. I wrote earlier, that 4 new points are created
  • A1( x - 0.0001, y)
  • A2( x + 0.0001, y)
  • A3( x, y - 0.0001) <-- warning! What if y equals -pi/2 ?
  • A4( x, y + 0.0001) <-- warning! What if y equals pi/2 ? Theta has value between -pi/2 and pi/2. But it shouldn't be a problem, because we calculate sin( X ) or cos( X )
  1. Am I missing something?

...but what is it all about?

Sometimes images are better for imagination, so please, have a look at platonic solids.
Well, we know how it should look for 4 points, and 8 points...
What about five or six points? I cannot imagine that for 5 or 6 or 7 we can reach steady state
Nevertheless, I want to see transient process.

(by the way, if process won't reach steady state for sure..., can we call it transient?)

Is it possible to circumscribe a sphere on 5 points (or 6, 7, 9...) that are equally distant to the 3 closest neighbours?

I hope we can say circumscribe (1 ,2) when talking about sphere...

Issue outdated