Maximizing distance between n points on a sphere with radius 1

3 次查看(过去 30 天)
Hi there!
I've been stuck with this task of placing n (in this case, n=6) points on a sphere with radius 1, where I have to maximize the distance between these n points. However, they have to be placed on the sphere's rand. As of right now, I've written a code for my constraint and one for the distance, which I want to maximize. The only problem I seem to encounter is that fmincon always gives me the same 6 points, every time. I.e. I want to place 3 points on a unisphere. The result fmincon gives me is that all three points will have the coordinates (0.577, 0.577, 0.577). This is partially correct, since one of the points will probably have those coordinates, but I want to know how I get to know the rest of the points. I'll try to file some of my work below.
I understand the mathematical part, but the coding is my weakness as of right now.
Thank you in advance for every help I can get.
  3 个评论
Ibrahim Taha
Ibrahim Taha 2020-5-17
Hi there!
Thank you for telling me that fmincon minimizes the distance. Now that I've changed my code to maximize the distance, fmincon gives 6 different points, which is good. However, I know for a fact that if I input 6 points, I should get the following points:
(1, 0, 0), (0, 1, 0), (0, 0, 1), (-1, 0, 0), (0, -1, 0) and (0, 0, -1).
But I get instead these points. Do you know why? Is it because of the starting points that I've chosen?
John D'Errico
John D'Errico 2020-5-17
Why? Do you think the ones you have chosen represent the only possible set of 6 points that are as far apart from each other as possible from each other? Suppose I were to perform a rigid rotation of that entire set of points? That would not be as equally valid a set? Just pick some random rigid rotations, around any sets of axes, moving them all together. Stop when you get bored. Then look to see where they ended up.
Just because you happen to think of a sphere in terms of north, south, east, west, etc., is that really the only point of reference to look at a completely rotationally symmetric object?
And, since the solution is, as I said, not unique, then yes, you do need to consider that the solution is also dependent on the starting points. This is true for any numerical optimization tool.
Finally, just because you started SOME of those points out at the solution you happen to prefer, don't forget that you seem to be allowing the entire set of values to wander around until the tool finds a local minimizer of whatever distance measure you have created.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Particle Swarm 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by