gzz-commits
[Top][All Lists]
Advanced

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

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


From: Janne V. Kujala
Subject: [Gzz-commits] gzz/gfx/demo irregu4.py
Date: Sat, 30 Nov 2002 05:06:38 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Janne V. Kujala <address@hidden>        02/11/30 05:06:38

Modified files:
        gfx/demo       : irregu4.py 

Log message:
        try different motion fig parameters

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

Patches:
Index: gzz/gfx/demo/irregu4.py
diff -u gzz/gfx/demo/irregu4.py:1.24 gzz/gfx/demo/irregu4.py:1.25
--- gzz/gfx/demo/irregu4.py:1.24        Sat Nov 30 04:23:57 2002
+++ gzz/gfx/demo/irregu4.py     Sat Nov 30 05:06:37 2002
@@ -575,79 +575,81 @@
 
 
 class StillMotionScene:
-    stdcode = """
+    def __init__(self):
+        self.scale = 512
+        self.x0, self.y0 = -.35, -.65
+        self.x1, self.y1 = .35, .65
+        self.xs, self.ys = .6,.4
+        self.a1 = 0
+
+        stdcode = """
         PushAttrib ENABLE_BIT TEXTURE_BIT CURRENT_BIT
         BindTexture TEXTURE_2D %s
         TexParameter TEXTURE_2D TEXTURE_MIN_FILTER LINEAR_MIPMAP_LINEAR
         TexParameter TEXTURE_2D TEXTURE_MAG_FILTER LINEAR
         Enable TEXTURE_2D
         TexEnv TEXTURE_ENV TEXTURE_ENV_MODE ADD
+        TexEnv TEXTURE_FILTER_CONTROL_EXT TEXTURE_LOD_BIAS_EXT 3
         Enable ALPHA_TEST
         AlphaFunc GEQUAL 1.0
         """ % texINTENSITY.getTexId() 
 
     
-    shape = 0
-    texscale = 3
-    linewidth = 4
-    refsize = 128
-    scale_pow = 0
-    border0 = -.5 * ripple_scale * texscale
-    border1 = .5 * ripple_scale * texscale 
-    texslicing = 0.0
-
-    inner =  GLRen.createIrregularEdge(
-        shape, texscale, linewidth, refsize, scale_pow,
-        border0, border1, texslicing,
-        "0 0 0 1 0 0 0 0", "", 0, 0, SLICE_1D + Y_COLOR + INSIDE,
-        stdcode, 1.0)
-    outer = GLRen.createIrregularEdge(
-        shape, texscale, linewidth, refsize, scale_pow,
-        border0, border1, texslicing,
-        "0 0 0 1 0 0 0 0", "", 0, 0, SLICE_1D + Y_COLOR + SHIFTS + INSIDE,
-        stdcode, 1.0)
-    envelope = GLRen.createIrregularEdge(
-        shape, texscale, linewidth, refsize, scale_pow,
-        border0, border1, texslicing,
-        "", "", 0, 0, SLICE_2D + INSIDE,
-        """
-        PushAttrib
-        Disable TEXTURE_2D
-        """, 1.0)
-
-    canvas = getDList("""
-    Enable BLEND
-    Disable ALPHA_TEST
-    BlendFunc SRC_ALPHA ONE_MINUS_SRC_ALPHA
-    LineWidth %s
-    Begin LINES
-    Vertex -4 -4
-    Vertex -4 +4
-
-    Vertex +4 -4
-    Vertex +4 +4
-
-    Vertex -4 -4
-    Vertex +4 -4
-
-    Vertex -4 +4
-    Vertex +4 +4
-    End
-    Color 0 0 0 0
-    Begin QUAD_STRIP
-    Vertex -4 -4 
-    Vertex -4 +4 
-    Vertex +4 -4 
-    Vertex +4 +4 
-    End
-    """ % linewidth)
+        shape = 10
+        texscale = 1
+        linewidth = 4
+        refsize = 128
+        scale_pow = 0
+        border0 = -.5 * ripple_scale * texscale
+        border1 = .5 * ripple_scale * texscale 
+        texslicing = 0.0
+
+        self.inner =  GLRen.createIrregularEdge(
+            shape, texscale, linewidth, refsize, scale_pow,
+            border0, border1, texslicing,
+            "0 0 0 1 0 0 0 0", "", 0, 0, SLICE_1D + Y_COLOR + INSIDE,
+            stdcode, 1.0)
+        self.outer = GLRen.createIrregularEdge(
+            shape, texscale, linewidth, refsize, scale_pow,
+            border0, border1, texslicing,
+            "0 0 0 1 0 0 0 0", "", 0, 0, SLICE_1D + Y_COLOR + SHIFTS + INSIDE,
+            stdcode, 1.0)
+        self.envelope = GLRen.createIrregularEdge(
+            shape, texscale, linewidth, refsize, scale_pow,
+            border0, border1, texslicing,
+            "", "", 0, 0, SLICE_2D + INSIDE,
+            """
+            PushAttrib
+            Disable TEXTURE_2D
+            """, 1.0)
+        
+        self.canvas = getDList("""
+        Enable BLEND
+        Disable ALPHA_TEST
+        BlendFunc SRC_ALPHA ONE_MINUS_SRC_ALPHA
+        LineWidth %s
+        Begin LINES
+        Vertex -1 -1
+        Vertex -1 +1
+        
+        Vertex +1 -1
+        Vertex +1 +1
+        
+        Vertex -1 -1
+        Vertex +1 -1
+        
+        Vertex -1 +1
+        Vertex +1 +1
+        End
+        Color 0 0 0 0
+        Begin QUAD_STRIP
+        Vertex -1 -1 
+        Vertex -1 +1 
+        Vertex +1 -1 
+        Vertex +1 +1 
+        End
+        """ % linewidth)
 
-    def __init__(self):
-        self.scale = 256
-        self.x0, self.y0 = 2,0
-        self.x1, self.y1 = -2.5,0
-        self.xs, self.ys = 2,1
-        self.a1 = 0
 
     def putedge(self, vs, cs1, cs2, alpha):
         vs.map.put(Depth.mask0)
@@ -689,13 +691,13 @@
         for i in 0,1,2,3:
             
             cs2 = vs.coords.affineCoordsys(
-                0, 0, self.x1 + .15 * i, self.y1,
+                0, 0, self.x1 + .02 * i, self.y1,
                 self.xs * cos(self.a1), self.ys * -sin(self.a1),
                 self.xs * sin(self.a1), self.ys * cos(self.a1) )
 
             vs.matcher.add(cs2, "2." + str(i))
 
-            self.putedge(vs, cs1, cs2, (1, .6, .3, .2)[i])
+            self.putedge(vs, cs1, cs2, (.2, .3, .6, 1)[i])
 
 
 def r(sc, filename):




reply via email to

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