Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math as m
- import matplotlib.pyplot as l
- c="3,1,1 3,2,1.5 1,2,0.7 0.9,1.2,1.2 1,0,0.8"
- a=[[float(y) for y in x.split(",")] for x in c.split(" ")]
- for a2 in a:
- for x in xrange(0,200):
- q=x*m.pi/100.;p=(a2[0]+m.sin(q)*a2[2],a2[1]+m.cos(q)*a2[2]);cc=[]
- for z in a:
- if z != a2:
- if ((z[0]-p[0])**2+(z[1]-p[1])**2)<(z[2]**2):cc.append(z)
- if not cc:l.scatter(p[0],p[1])
- l.show()
Advertisement
Add Comment
Please, Sign In to add comment