Guest User

Untitled

a guest
Sep 24th, 2014
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. import math as m
  2. import matplotlib.pyplot as l
  3. c="3,1,1 3,2,1.5 1,2,0.7 0.9,1.2,1.2 1,0,0.8"
  4. a=[[float(y) for y in x.split(",")] for x in c.split(" ")]
  5. for a2 in a:
  6.  for x in xrange(0,200):
  7.   q=x*m.pi/100.;p=(a2[0]+m.sin(q)*a2[2],a2[1]+m.cos(q)*a2[2]);cc=[]
  8.   for z in a:            
  9.    if z != a2:              
  10.     if ((z[0]-p[0])**2+(z[1]-p[1])**2)<(z[2]**2):cc.append(z)
  11.     if not cc:l.scatter(p[0],p[1])
  12. l.show()
Advertisement
Add Comment
Please, Sign In to add comment