Divide colors up
authorBen Morrow <childoftv@gmail.com>
Sun, 25 Aug 2013 05:56:15 +0000 (22:56 -0700)
committerBen Morrow <childoftv@gmail.com>
Sun, 25 Aug 2013 05:56:15 +0000 (22:56 -0700)
BenMorrow.pde

index 31c156b4ecf782734d4e621c763de80ba34e7bd2..67fbbeb032aebd6cdc5f2fed6359726f34b138f0 100644 (file)
@@ -19,6 +19,7 @@ class TowerParams extends SCPattern
 
        ArrayList<BasicParameter> towerParams;
        int towerSize;
+       int colorSpan;
        TowerParams(GLucose glucose) {
                super(glucose);
 
@@ -44,6 +45,7 @@ class TowerParams extends SCPattern
                        addParameter(p);
                }
                towerSize = model.towers.size();
+               colorSpan = 255 / towerSize;
                println("towers "+towerSize);
        }
 
@@ -58,7 +60,7 @@ class TowerParams extends SCPattern
                        {
                                if(p.y<towerParams.get(i).getValuef()*200)
                                {
-                                       colors[p.index]=color(70*i,255,255);
+                                       colors[p.index]=color(colorSpan*i,255,255);
                                }
                        }
                }