summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2014-08-27 02:08:40 +0200
committerFlorian Jung <flo@windfisch.org>2014-08-27 02:08:40 +0200
commit1a9cf0e213af0de7c447c7085a04f4c7b2c3e4b7 (patch)
treeb4d9e5c2272a818dbdf7be787e7c429358059fed
parent7a14a2996b5a1509d2650eaebd04f404ea03b25f (diff)
zylindrische projektion statt planare
-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)