diff options
-rw-r--r-- | warp.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -5,11 +5,11 @@ import numpy xlist=[] ylist=[] -xres=1280/5 -yres=720/5 +xres=1600 +yres=900 #constant = 1./math.sqrt((xres/2)**2 + (yres/2)**2) -constant = 1./(1280/2.)*30./42. +constant = 1./(1280/2.)*30./40. print constant for y in xrange(0,yres): @@ -23,8 +23,8 @@ for y in xrange(0,yres): dist = math.sqrt(xx**2 + yy**2) if (dist != 0): - xtmp=xtmp+[ 1280/2+ xx/dist/constant*math.atan(constant*dist) ] - ytmp=ytmp+[ 720/2 + yy/dist/constant*math.atan(constant*dist) ] + xtmp=xtmp+[ 1280/2+ xx/dist/constant*math.atan(constant*dist*1.3) ] + ytmp=ytmp+[ 720/2 + yy/dist/constant*math.atan(constant*dist*1.3) ] else: xtmp=xtmp+[0+1280/2] ytmp=ytmp+[0+720/2] |