# Calculating circle properties.

How can I incrementally calculate the angle from angle 0 and the point (x, y) in a circumference path if I have the center of the circle coordinates and the radius of the circle.

I have 127 segments each with 5 points in a segment. This is 635 in circumference. The closest radius to this is 102.

• The question isn't terribly clear. Could you try to clarify? What, e.g. is the center (it's coordinates), and what is the radius? I'm not sure what you mean when you say you have the radius, but end your post with "the closest radius to 'this' [what this] is 102"? – Namaste Apr 28 '13 at 15:34
• I have 127 segments that I need to render points for, each segment has 5 points. This gives me 635. So I need a circle with the circumference of 635, each point in the circumference can be mapped by a point in a segment. Calculating the radius of this causes a flooring of a floating point number to an integer of 102. I would like to calculate each point in the circumference, each point in each segment. So e.g. for each angle in the circle, 360 is used, incremented by 1 each time, how can I determine the (x, y) coordinate of each point in the circumference path, (going clockwise)? – jarryd Apr 28 '13 at 15:42
• If you have 635 points, and want them evenly dispersed along a circle, you can increment the angle by $\dfrac{360}{635}^\circ$. – Namaste Apr 28 '13 at 15:59

$$x = r\cos\theta, \quad y = r\sin\theta, \quad\text{for circle radius r centered at origin}$$

With an arbitrary center $(x_c, y_c)$, then

$$(x - x_c) = r\cos\theta, \quad (y - y_c) = r\sin\theta$$

$$x = r\cos\theta + x_c, \quad y = r\sin\theta + y_c$$

$$\tan\theta = \dfrac{y - y_c}{x - x_c} \iff \theta = \arctan\left(\frac{y - y_c}{x - x_c}\right)$$

• Thank you for your time on helping me. :) – jarryd Apr 28 '13 at 17:22
• You're welcome, Helium3! – Namaste Apr 28 '13 at 17:25
• Nice, clean answer +1 – Amzoti Apr 29 '13 at 0:40