I wrote this function:
def get_x_y_co(circles):
xc = circles[0] #x-co of circle (center)
yc = circles[1] #y-co of circle (center)
r = circles[2] #radius of circle
arr=[]
for i in range(360):
y = yc + r*math.cos(i)
x = xc+ r*math.cos(i)
x=int(x)
y=int(y)
#Create array with all the x-co and y-co of the circle
arr.append([x,y])
return arr
With 'circles' being an array with [X-center, Y-center, Radius]
I would like to extract all the points with integer resolution present in the circle. Right now, I realised I am creating an array of points who are on the BORDER of the circle, but I don't have access to the points INSIDE the circle.
I thought of just reducing the radius, and iterate this for all values of the radius, until the radius is 0
But I feelthere is a much more efficient way. Any help is welcome