How do I find all points of a circle, given the radius and the coordinates of the center point?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The equation of a circle is (x-h)^2 + (y -k)^2 = r^2.
Where:
Because the distance from the center to a point on the circumference on the x-axis, the y-axis and the radius form a right angled triangle where the x-Distance is the base, y-distance is the height and r is the hypotenuse of that right angled triangle. For a circle with center (0,0) the equation of a circle is x^2 + y^2 = r^2 (which is the Pythagorean Theorem).
You could also use the identities cos theta = y/r => y = r*cos theta and sin theta = x/y => x = r*sin theta and iterate over theta from 0 to 360 degrees
So given a center point (h,k) and radius r you can find the points (x,y) that lie on the circumference of the circle.
Then you can have a function to check if a certain point lies in a within the circumference or not. What exactly do you need this for?