gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/gfx/demo fisheye.py


From: Janne V. Kujala
Subject: [Gzz-commits] gzz/gfx/demo fisheye.py
Date: Thu, 12 Sep 2002 12:57:29 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Janne V. Kujala <address@hidden>        02/09/12 12:57:29

Modified files:
        gfx/demo       : fisheye.py 

Log message:
        scale paper by "*" and "/"; perhaps these should also scale the bulge 
at the same time

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/fisheye.py.diff?tr1=1.11&tr2=1.12&r1=text&r2=text

Patches:
Index: gzz/gfx/demo/fisheye.py
diff -c gzz/gfx/demo/fisheye.py:1.11 gzz/gfx/demo/fisheye.py:1.12
*** gzz/gfx/demo/fisheye.py:1.11        Thu Sep 12 12:39:59 2002
--- gzz/gfx/demo/fisheye.py     Thu Sep 12 12:57:29 2002
***************
*** 83,88 ****
--- 83,89 ----
  bl = 0
  bm = 2
  px, py = 600, 450
+ ps = 1
  
  rng = java.util.Random()
  
***************
*** 108,118 ****
          self.fpq = getfisheyepaper(self.seed);
  
      def key(self, k):
!         global bx, by, bs, ba, bl, bm, px, py
          if k == "Up": py += 100
          elif k == "Down": py -= 100
          elif k == "Left": px += 100
          elif k == "Right": px -= 100
          elif k == "e": by -= 100
          elif k == "c": by += 100
          elif k == "s": bx -= 100
--- 109,121 ----
          self.fpq = getfisheyepaper(self.seed);
  
      def key(self, k):
!         global bx, by, bs, ba, bl, bm, px, py, ps
          if k == "Up": py += 100
          elif k == "Down": py -= 100
          elif k == "Left": px += 100
          elif k == "Right": px -= 100
+         elif k == "*": ps += .05
+         elif k == "/": ps -= .05
          elif k == "e": by -= 100
          elif k == "c": by += 100
          elif k == "s": bx -= 100
***************
*** 138,144 ****
      def scene(self, vs):
        putnoc(vs, background(self.bgcolor))
  
!       cs1 = vs.coords.affineCoordsys(0, "1", 10, px, py, 400, 0, 0, 400)
  
        cs2 = vs.coords.affineCoordsys(0, "2", 10 - bm, bx, by, 
                                         400 * bs * math.exp(+bl) * 
math.cos(ba),
--- 141,147 ----
      def scene(self, vs):
        putnoc(vs, background(self.bgcolor))
  
!       cs1 = vs.coords.affineCoordsys(0, "1", 10, px, py, 400 * ps, 0, 0, 400 
* ps)
  
        cs2 = vs.coords.affineCoordsys(0, "2", 10 - bm, bx, by, 
                                         400 * bs * math.exp(+bl) * 
math.cos(ba),




reply via email to

[Prev in Thread] Current Thread [Next in Thread]