Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 570
Anagha Avatar asked Feb 12 '13 09:02

Anagha


People also ask

How do you find the equation of a circle given the center and circumference?

Explanation: The formula for the equation of a circle is (x – h)2+ (y – k)2 = r2, where (h, k) represents the coordinates of the center of the circle, and r represents the radius of the circle.

How do you find circumference with radius?

To calculate the circumference of a circle, multiply the diameter of the circle with π (pi). The circumference can also be calculated by multiplying 2×radius with pi (π=3.14).


1 Answers

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

like image 52
user_CC Avatar answered Oct 25 '22 02:10

user_CC