Make GranimsTest more purty
authorBen Morrow <childoftv@gmail.com>
Mon, 19 Aug 2013 07:46:08 +0000 (00:46 -0700)
committerBen Morrow <childoftv@gmail.com>
Mon, 19 Aug 2013 07:46:08 +0000 (00:46 -0700)
BenMorrow.pde
GranimPattern.pde

index c632b8df26ec66b57a2a059d62364505e0dcdebb..e610155120eced021237936582d2e4758d8c477e 100644 (file)
@@ -135,15 +135,8 @@ class DriveableCrossSections extends CrossSections
                addParameter(xd);
            addParameter(yd);
            addParameter(zd);
-           addParameter(xr);
-           addParameter(yr);
-           addParameter(zr);    
-           addParameter(xw);
-           addParameter(xl);
-           addParameter(yl);
-           addParameter(zl);
-               addParameter(yw);    
-           addParameter(zw);
+
+          super.addParams();
        }
 
        public void onParameterChanged(LXParameter p) {
index 0a34bafe986d1d4baac8eda506158b9cc3a1ef40..6c3088fa20bfde481766a94bad99ee4d6023ad70 100644 (file)
@@ -188,31 +188,35 @@ class RandomsGranim extends Granim
                _len=len;
                addGraphic("myrandoms", makeGraphic(len));
        }
+       int colorLid=0;
        public Graphic makeGraphic(int len)
        {
+
                int[] colors= new int[len]; 
                for(int i =0;i<len;i++)
                {
-                       colors[i]=(int) Math.round(Math.random()*255);
+                       colors[i]=(int) Math.round(Math.random()*80)+colorLid;
+                       
                }
+               colorLid+=4;
                return new ColorDotsGraphic(colors);
        }
        private int count =1;
        private int instanceCount =0;
        public void update()
        {
-               super.update();
-               if(instanceCount<50 && count % 20==0)
+               
+               if(instanceCount<90 && count % 20==0)
                {
                        instanceCount++;
                        Graphic h=addGraphic("myrandoms_"+instanceCount, makeGraphic(_len));
                        h.position = instanceCount*(_len+100);
-                       println("one more " + instanceCount+" at "+h.position);
+                       //println("one more " + instanceCount+" at "+h.position);
                        count=0;
                        changed = true;
                }
                count++;
-               
+               super.update();
        }
        
 };