Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I think a good solution would be to distribute points in the HSV cone in such a way that they are as evenly spread as possible.

I can calculate the sum of distances for all the points, and the find the maximum, but how to distribute the points?

How to approach such a problem?

share|cite|improve this question
The tag (distribution-theory) refers to a completely dfferent subject. – Did Dec 30 '12 at 22:35
up vote 2 down vote accepted

I don't believe there is a general non-numerical solution. One way to do this numerically would be to use simulated annealing or a similar approach. To use this method, you first define a energy function between each pair of points on the cone. For instance you could use: $$d(h_1,s_1,v_1,h_2,s_2,v_2)=\frac{1}{\sqrt{(h_1-h_2)^2+(s_1-s_2)^2+(v_1-v_2)^2}}$$ Then randomly choose 10 points on the cone, and with each step move each point a small random amount, recalculate the total energy, and decide whether you want to keep the new set of points. Continue iterating, and with a correct choice of the annealing schedule, you should converge to the "optimal" solution for the function you chose. This method has been used quite successfully on the Thomson problem, which is quite similar to yours.

share|cite|improve this answer
Nice reference, thanks. This look a lot like the Self Organising Maps that I know from the AI field. I was hoping there was a nice analytical solution.. But your solution will yield a (local?) optimum. – RobAu Dec 30 '12 at 21:54
It will yield a global optimum (with the right choice of schedule) - that's why simulated annealing is such a good choice :) – nbubis Dec 30 '12 at 21:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.