Sandbox Anim
authorBen Morrow <childoftv@gmail.com>
Sat, 17 Aug 2013 22:55:55 +0000 (15:55 -0700)
committerBen Morrow <childoftv@gmail.com>
Sat, 17 Aug 2013 22:56:16 +0000 (15:56 -0700)
BenMorrow.pde
SugarCubes.pde

index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..bde4ddb0fa92609c9aa785a1ff4fc3cdaadccd89 100644 (file)
@@ -0,0 +1,35 @@
+class Sandbox extends SCPattern
+{
+
+       LetsTry(GLucose glucose) {
+               super(glucose);
+       }
+       int c=0;
+       int huerange=255;
+       int cuberange = 74;
+
+       int counter=0;
+       public void run(int deltaMs) {
+               Cube cube = model.cubes.get((int) c);
+               println("face length "+cube.faces.size());
+               if(cube.faces.size()!=4)
+               {
+                       for(Face f : cube.faces)
+                       {
+                       double col = Math.random()*255;
+                               for(Point p: f.points)
+                               {
+                                       colors[p.index] = color(Math.round(col),255,255);
+                               }
+                       }
+                               
+                       
+               }
+               if(counter% 3 ==0)
+               {
+                       c = (c+1) % cuberange;
+               }
+               counter++;
+               println(c);
+       }
+}
\ No newline at end of file
index 0f102e334f5acaa688743c95eb1adec344aeae7a..1d2de40910e4303d4ca29bdc902a0456f45a6a62 100644 (file)
@@ -25,6 +25,7 @@
 
 LXPattern[] patterns(GLucose glucose) {
   return new LXPattern[] {
+    new Sandbox(glucose),
     new HelixPattern(glucose),
     new ShiftingPlane(glucose),
     new AskewPlanes(glucose),