Anagha
Anagha

Reputation: 760

Formula to find points on the circumference of a circle, given the center of the circle and the radius

I am working on code to find the points on the circumference of a circle. I have the center point of the circle and the radius and I need to draw a circle around it. This will help me define the boundary. Please help me with formula for finding the these points on the circumference.

Upvotes: 11

Views: 38817

Answers (1)

user_CC
user_CC

Reputation: 4776

For a circle with origin (j, k) and radius r:

x(t) = r cos(t) + j
y(t) = r sin(t) + k

where you need to run this equation for t taking values within the range from 0 to 360, then you will get your x and y each on the boundary of the circle.

For more information: http://www.math.com/tables/geometry/circles.htm

Upvotes: 37

Related Questions