Finding points around the perimeter of a circle
I need to draw a line from the center of the circle. To do this, I first selected the center of the image as the center of the circle and draw a circle with a known radius. After that, using the parametric equation of the circle, I simply calculated the x and y around the perimeter, increasing the angle by 6 degrees.
x = cx + r * cos(a)
y = cy + r * sin(a)
I am using OpenCV to do all this where the pixel coordinate starts at the top left corner. So my problem is 360 degree loop, the algorithm should be drawn with 60 lines, but when the angle reaches 120 degrees it completes one loop and I noticed that each line is split 15 degrees instead of 6 degrees. Below is my image after 120 degrees.
+1
source to share