gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz/gfx libpaper/textures.py libtexture/geometr...


From: Janne V. Kujala
Subject: [Gzz-commits] gzz/gfx libpaper/textures.py libtexture/geometr...
Date: Wed, 16 Oct 2002 06:07:17 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Janne V. Kujala <address@hidden>        02/10/16 06:06:52

Modified files:
        gfx/libpaper   : textures.py 
        gfx/libtexture : geometric.texture 

Log message:
        New offset textures

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/textures.py.diff?tr1=1.31&tr2=1.32&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libtexture/geometric.texture.diff?tr1=1.4&tr2=1.5&r1=text&r2=text

Patches:
Index: gzz/gfx/libpaper/textures.py
diff -c gzz/gfx/libpaper/textures.py:1.31 gzz/gfx/libpaper/textures.py:1.32
*** gzz/gfx/libpaper/textures.py:1.31   Wed Oct 16 04:41:27 2002
--- gzz/gfx/libpaper/textures.py        Wed Oct 16 06:06:52 2002
***************
*** 181,187 ****
            },
          ])
  
!     ptextures["DSDT_HILO"] = map(NamedTexture, [ 
          { "name" : "dsdt_w1",
            "args" : [tres, tres, 0, 2, "SIGNED_HILO_NV", "HILO_NV", "fnoise",
                      ["scale", ".43", "freq", "1", "df", "1", "bias", "0.5",
--- 181,202 ----
            },
          ])
  
!     ptextures["DSDT_HILO"] = map(NamedTexture,
!                                  filter(lambda dict: dict["name"] in [
!         "dsdt_w1",
!         "dsdt_turb",
!         "dsdt_pyramid",
!         "dsdt_checkerboard",
!         "dsdt_cone",
!         "dsdt_saw",
!         "dsdt_triangle",
!         "dsdt_stripe",
!         "dsdt_rnd0",
!         "dsdt_rnd1",
!         "dsdt_rnd2",
!         "dsdt_rnd3",
!         "dsdt_rnd4",
!         ], [ 
          { "name" : "dsdt_w1",
            "args" : [tres, tres, 0, 2, "SIGNED_HILO_NV", "HILO_NV", "fnoise",
                      ["scale", ".43", "freq", "1", "df", "1", "bias", "0.5",
***************
*** 191,198 ****
            "args" : [tres, tres, 0, 2, "SIGNED_HILO_NV", "HILO_NV", "fnoise",
                      ["turb", "1", "scale", ".3", "freq", "1",
                       "freq2", "100", "df", "1", "bias", "0"]],
!           }
!         ])
  
      ptextures["FOOBAR"] = [ ptextures["RGB2"][-1] ]
      
--- 206,261 ----
            "args" : [tres, tres, 0, 2, "SIGNED_HILO_NV", "HILO_NV", "fnoise",
                      ["turb", "1", "scale", ".3", "freq", "1",
                       "freq2", "100", "df", "1", "bias", "0"]],
!           },
!         { "name" : "dsdt_pyramid",
!           "args" : [64, 64, 0, 2, "SIGNED_HILO_NV", "HILO_NV", "geometric",
!                     ["type", "0", "scale", ".5"]],
!           },
!         { "name" : "dsdt_checkerboard",
!           "args" : [4, 4, 0, 2, "SIGNED_HILO_NV", "HILO_NV", "geometric",
!                     ["type", "1"]],
!           "minfilter" : "NEAREST",
!           "magfilter" : "NEAREST",
!           },
!         { "name" : "dsdt_cone",
!           "args" : [64, 64, 0, 2, "SIGNED_HILO_NV", "HILO_NV", "geometric",
!                     ["type", "2", "scale", ".5"]],
!           },
!         { "name" : "dsdt_saw",
!           "args" : [64, 64, 0, 2, "SIGNED_HILO_NV", "HILO_NV", "geometric",
!                     ["type", "4"]],
!           },
!         { "name" : "dsdt_triangle",
!           "args" : [64, 64, 0, 2, "SIGNED_HILO_NV", "HILO_NV", "geometric",
!                     ["type", "5"]],
!           },
!         { "name" : "dsdt_stripe",
!           "args" : [2, 2, 0, 2, "SIGNED_HILO_NV", "HILO_NV", "geometric",
!                     ["type", "6"]],
!           "minfilter" : "NEAREST",
!           "magfilter" : "NEAREST",
!           },
!         { "name" : "dsdt_rnd0",
!           "args" : [2, 2, 0, 2, "SIGNED_HILO_NV", "HILO_NV", "geometric",
!                     ["type", "7"]],
!           },
!         { "name" : "dsdt_rnd1",
!           "args" : [4, 4, 0, 2, "SIGNED_HILO_NV", "HILO_NV", "geometric",
!                     ["type", "7"]],
!           },
!         { "name" : "dsdt_rnd2",
!           "args" : [8, 8, 0, 2, "SIGNED_HILO_NV", "HILO_NV", "geometric",
!                     ["type", "7"]],
!           },
!         { "name" : "dsdt_rnd3",
!           "args" : [16, 16, 0, 2, "SIGNED_HILO_NV", "HILO_NV", "geometric",
!                     ["type", "7"]],
!           },
!         { "name" : "dsdt_rnd4",
!           "args" : [32, 32, 0, 2, "SIGNED_HILO_NV", "HILO_NV", "geometric",
!                     ["type", "7"]],
!           },
!         ]))
  
      ptextures["FOOBAR"] = [ ptextures["RGB2"][-1] ]
      
Index: gzz/gfx/libtexture/geometric.texture
diff -c gzz/gfx/libtexture/geometric.texture:1.4 
gzz/gfx/libtexture/geometric.texture:1.5
*** gzz/gfx/libtexture/geometric.texture:1.4    Wed Oct  9 10:07:27 2002
--- gzz/gfx/libtexture/geometric.texture        Wed Oct 16 06:06:52 2002
***************
*** 55,63 ****
      FPARAM(type, 0);
      FPARAM(scale, 1);
      FPARAM(bias, 0);
      if(components > 4) return;
      
! 
  
      int ind=0, i, j;
      float x, y;
--- 55,66 ----
      FPARAM(type, 0);
      FPARAM(scale, 1);
      FPARAM(bias, 0);
+     FPARAM(seed, 1);
      if(components > 4) return;
      
!     if (seed != 1) {
!       srandom((unsigned)seed);
!     }
  
      int ind=0, i, j;
      float x, y;
***************
*** 94,114 ****
          break;
        case 4:
          if (components >= 1) data[ind++] = saw(x);
!         if (components >= 2) data[ind++] = saw(1 - xstep - x);
!         if (components >= 3) data[ind++] = saw(y);
          if (components >= 4) data[ind++] = saw(1 - ystep - y);
          break;
        case 5:
          if (components >= 1) data[ind++] = triangle(x);
!         if (components >= 2) data[ind++] = triangle(.5 + x);
!         if (components >= 3) data[ind++] = triangle(y);
          if (components >= 4) data[ind++] = triangle(.5 + y);
          break;
        case 6:
          if (components >= 1) data[ind++] = stripe(x);
!         if (components >= 2) data[ind++] = stripe(1 - xstep - x);
!         if (components >= 3) data[ind++] = stripe(y);
          if (components >= 4) data[ind++] = stripe(1 - ystep - y);
          break;
          
        }
--- 97,123 ----
          break;
        case 4:
          if (components >= 1) data[ind++] = saw(x);
!         if (components >= 2) data[ind++] = saw(y);
!         if (components >= 3) data[ind++] = saw(1 - xstep - x);
          if (components >= 4) data[ind++] = saw(1 - ystep - y);
          break;
        case 5:
          if (components >= 1) data[ind++] = triangle(x);
!         if (components >= 2) data[ind++] = triangle(y);
!         if (components >= 3) data[ind++] = triangle(.5 + x);
          if (components >= 4) data[ind++] = triangle(.5 + y);
          break;
        case 6:
          if (components >= 1) data[ind++] = stripe(x);
!         if (components >= 2) data[ind++] = stripe(y);
!         if (components >= 3) data[ind++] = stripe(1 - xstep - x);
          if (components >= 4) data[ind++] = stripe(1 - ystep - y);
+         break;
+       case 7:
+         if (components >= 1) data[ind++] = rand() / (RAND_MAX + 1.0);
+         if (components >= 2) data[ind++] = rand() / (RAND_MAX + 1.0);
+         if (components >= 3) data[ind++] = rand() / (RAND_MAX + 1.0);
+         if (components >= 4) data[ind++] = rand() / (RAND_MAX + 1.0);
          break;
          
        }




reply via email to

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