Change multiple positions of points on circles with different radius

127 Views Asked by At

There are some points which are placed on a circular path:

enter image description here

Now I want to change the position of some points equals to the distance value(d) respected to their path. I'm using this formula to initial points:

x0: centerX + (radius * cos(angle)),
y0: centerY + (radius * sin(angle)),
delta = 2 * asin(d / (2 * radius)))

So I have this formula in order to do the purpose. The new positions are:

x1: centerX + (radius * cos(angle+delta)),
y1: centerY + (radius * sin(angle+delta)),

This formula works properly, but the problem is when there are multiple circles which contain points:

enter image description here

Now I want to change the bold circles respected to their path, but the result is wrong:

enter image description here

Obviously the position of points of the smallest circle are changed more than the largest circle. I move them with the same value(d) and I know it is wrong, but I don't know how to calculate suitable value for each circle, my result should be this:

enter image description here

1

There are 1 best solutions below

0
On

That is because all the small circles have the same radius, so you need a smaller number of them to fill up the inner circle than you do to fill the outer one. If you want to skip a certain fixed angle $\alpha$ in all three circles, compute how many times you have to skip delta (if it has to be an integer, take the largest integer less than or equal to $\alpha/\delta$).