summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stabilize.py4
-rw-r--r--warp.py3
2 files changed, 4 insertions, 3 deletions
diff --git a/stabilize.py b/stabilize.py
index c24f1f8..ab11b51 100644
--- a/stabilize.py
+++ b/stabilize.py
@@ -45,7 +45,7 @@ def get_maps(xres,yres):
yy=(y-yres/2.)/xres # yes, xres.
for x in xrange(0,xres):
- xx=(x-xres/2.)/xres
+ xx=math.tan((x-xres/2.)/xres)
dist = math.sqrt(xx**2 + yy**2)
@@ -67,7 +67,7 @@ def get_maps(xres,yres):
return xmap,ymap
-xmap,ymap = get_maps(1600/2,900/2)
+xmap,ymap = get_maps(1280,720)
diff --git a/warp.py b/warp.py
index 746b665..f6407e9 100644
--- a/warp.py
+++ b/warp.py
@@ -18,7 +18,8 @@ def get_maps(xres,yres):
yy=(y-yres/2.)/xres # yes, xres.
for x in xrange(0,xres):
- xx=(x-xres/2.)/xres
+ xx_=(x-xres/2.)/xres
+ xx=math.tan(xx_)
dist = math.sqrt(xx**2 + yy**2)