M HYPE SPLASH
// general

Calculate points(x, y) within an arc

By Emma Terry
$\begingroup$

I am trying to draw lines from the center of a circle to points (x, y) in the circumference.

To calculate this the angle is used. I need to render points in between two angles. E.g. Angle 0 to angle 1 I would like to render lines from the center of the circle to 5 different points along the circumference between angle 0 and 1. There might be any number of points in between these two angles.

How can I calculate these 5 points? I would need to calculate the (x, y) using angle i and the (x, y) using angle i+1. and then get the arc between these two points.

How is this done and how would I then get the individual points within this arc so that I can incrementally draw lines from the center to these individual points?

$\endgroup$

1 Answer

$\begingroup$

For circles around $(0,0)$ with radius $r$, the point $(x,y)$ on the circumference at angle $\varphi$ is $$ (x,y) = (r\cos\varphi, r\sin\varphi) \text{.} $$

$\endgroup$ 1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy