From f56998dcf613dcbe8dea936c8a3cbc63a8c9ab37 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Wed, 27 Aug 2014 01:13:21 +0200 Subject: stretch --- warp.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/warp.py b/warp.py index 9194b41..57564c1 100644 --- a/warp.py +++ b/warp.py @@ -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] -- cgit v1.2.1