MATLAB: How to determine the position of points which belong to a circle

circlepoints

Hi how to determine the points of a circle (their x, y coordinates) if we knew the position of the center and the radius of the circle thanks!!!!

Best Answer

If the center is at (x0,y0) and the radius is r, then
1) if (x-x0)^2 + (y-y0)^2 < r^2, the point (x,y) is inside the circle,
2) if (x-x0)^2 + (y-y0)^2 == r^2, the point (x,y) is on the circle, and
3) if (x-x0)^2 + (y-y0)^2 > r^2, the point (x,y) is outside the circle.
Related Question