Permalink
Browse files

Fix RGBRoutine, remove unused Swirl.

  • Loading branch information...
cibomahto committed Sep 4, 2012
1 parent 0db5440 commit b7ed14ae9f05dd49c76e26bd1188fbe7fac6987f
Showing with 26 additions and 28 deletions.
  1. +26 −26 RGBRoutine.pde
  2. +0 −2 Swirl.pde
View
@@ -1,26 +1,26 @@
-//class RGBRoutine extends Routine {
-// int color_angle = 0;
-//
-// void draw() {
-// background(0);
-//
-// for (int row = 0; row < height; row++) {
-// for (int col = 0; col < width; col++) {
-// float r = (((row)*2 + 100.0*col/WIDTH + color_angle + 0)%100)*(255.0/100);
-// float g = (((row)*2 + 100.0*col/WIDTH + color_angle + 33)%100)*(255.0/100);
-// float b = (((row)*2 + 100.0*col/WIDTH + color_angle + 66)%100)*(255.0/100);
-//
-// stroke((r*2+g)/(b/ran),(g*2+b)/(r*r),(b*2+r)/(g/20)));
-// point(col,row);
-// }
-// }
-//
-// color_angle = (color_angle+1);//%255;
-//
-//
-// long frame = frameCount - modeFrameStart;
-// if (frame > FRAMERATE*TYPICAL_MODE_TIME) {
-// newMode();
-// }
-// }
-//}
+class RGBRoutine extends Routine {
+ int color_angle = 0;
+
+ void draw() {
+ background(0);
+
+ for (int row = 0; row < height; row++) {
+ for (int col = 0; col < width; col++) {
+ float r = (((row)*2 + 100.0*col/WIDTH + color_angle + 0)%100)*(255.0/100);
+ float g = (((row)*2 + 100.0*col/WIDTH + color_angle + 33)%100)*(255.0/100);
+ float b = (((row)*2 + 100.0*col/WIDTH + color_angle + 66)%100)*(255.0/100);
+
+ stroke(r,g,b);
+ point(col,row);
+ }
+ }
+
+ color_angle = (color_angle+1);//%255;
+
+
+ long frame = frameCount - modeFrameStart;
+ if (frame > FRAMERATE*TYPICAL_MODE_TIME) {
+ newMode();
+ }
+ }
+}
View
@@ -1,2 +0,0 @@
-class Swirl extends Routine {
-}

0 comments on commit b7ed14a

Please sign in to comment.