I have three points on the circumference of a circle:
pt A = (A.x, A.y);
pt B = (B.x, B.y);
pt C = (C.x, C.y);
How do I calculate the cente
def circle_mid_point(list_b):
list_k = []
for i in range(3):
for j in range(1,4):
if i+j <=3:
midpoint_x1 = (list_b[i][0] + list_b[i+j][0])/2
midpoint_y1 = (list_b[i][1] + list_b[i + j][1]) / 2
list_k.append([midpoint_x1,midpoint_y1]) # list of all the midpoints of the lines
for k in range(len(list_k)):
for j in range(1,len(list_k)-1):
if list_k[k] == list_k[k+j]: #at centre only two midpoints will have the same value
return list_k[k]
k = circle_mid_point([[0,1],[1,0],[-1,0],[0,-1]])
print(k)