I want to create an illustrator script that places dots around a circle.
Let's say the shells are given, but I need a way to evenly spread out a n amount of dots (electrons) on a n-sized circle. For example 2 dots on the first circle, 8 on the second, etc.
To rephrase my problem: I have up to 7 circles that are all set. How do I spread out the dots on those circles?
Since the whole circle is 2 * PI
radians, circle center is at (0, 0) and suppose you have n
dots, you have to place the i'th dot on coordinate x = R * cos(i * 2 * PI / n)
and y = R * sin(i * 2 * PI / n)
for i = 0..n-1
where R
is the radius of current circle.
This is all about Polar coordinate system