
import math


for origlevel in range(11):
  print 'level_%d = ['%(origlevel)
  for y in range(-10,10):
    for x in range(-10,10):
      d= math.sqrt( float(x*x+y*y) )
      level= ( 5 * origlevel ) / (.1+d) - d/3.
      path=[ (0,0) ]
      if d>0.0:
        dx=x/10./d
        dy=y/10./d
        r=0.0
        cx=cy=0.0
        while r<d and not (int(cx)==x and int(cy)==y):
          if (int(cx),int(cy)) not in path:
            path.append( (int(cx),int(cy)) )
          cx += dx
          cy += dy
          r=r+.1
      if level>.6:
        print '           (%s,%s,%s,%s), # d==%s'%(x,y,level,path,d)
  print '           ]'
print 'level = {'
for origlevel in range(11):
  print '          %d:level_%d,'%(origlevel,origlevel)
print '        }'


