Permalink
Browse files

fix waves

  • Loading branch information...
1 parent 6f1f119 commit 9517a7e257ad84dea208c2ea1c2bc3bb07d32258 @cibomahto cibomahto committed Aug 29, 2012
Showing with 6 additions and 5 deletions.
  1. +1 −1 ColorDrop.pde
  2. +5 −4 Waves.pde
View
@@ -11,7 +11,7 @@ class ColorDrop extends Routine {
for(int row = 0; row < height; row++) {
- float phase = sin((float)((row+frame*frame_mult)%height)/height*3.146);
+ float phase = sin((float)((row+frame*frame_mult)%height)/height*3.146 + random(0,.6));
float r = 0;
float g = 0;
View
@@ -50,10 +50,10 @@ class Wave {
}
public void init() {
- r = 40;//random(TWO_PI);
- f = PI/32 + random(PI/32);
- a = HEIGHT/4 + random(HEIGHT/4);
- y = HEIGHT/8 + int(random(HEIGHT - HEIGHT/8));
+ r = random(TWO_PI);
+ f = 2*PI/40;
+ a = HEIGHT/6 + random(HEIGHT/4);
+ y = HEIGHT/16 + int(random(HEIGHT - HEIGHT/16));
s = PI/128 + random(PI/16);
if (random(10)<5) {
@@ -86,6 +86,7 @@ class Wave {
g.background(0);
float bright_mult = .5 + (1+sin(step))/4;
+
g.stroke(color(red(c)*bright_mult, green(c)*bright_mult, blue(c)*bright_mult));
for (int x=0; x<WIDTH; x++) {

0 comments on commit 9517a7e

Please sign in to comment.