I am writing a code where I want the scatter plot to stop as soon as my code tries to plot a scatter point on an already existing scatter point.
This is the code I wrote that works for a divisor of 360,
r = 2
pi = np.pi
i = 0
theta = 10
for i in range(100):
x = r*np.cos(theta +i*theta )
y = r*np.sin(theta +i*theta )
plt.scatter(x,y, label = i+1)
if (theta +i*theta == 360):
print(i)
break
when theta = 10, the plotting process stops at i = 35
but rather than having my if condition as "stop code when theta is equal to 360", I need a code when code stops when a scatter point overlaps another, since this condition does not work for other integers.

