We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › perlian trails
Page Index Toggle Pages: 1
perlian trails (Read 865 times)
perlian trails
May 12th, 2009, 7:07pm
 
hey,

here's my first attempt at some perlian noise trails. please comment and give me tips on interesting additions to the code!

(it's messy, i know!)

- klive

//úlfur makes his first processing program...!
//perlian noise curve.
//move mouse to change color.
//mouseclick to purge.
//zed for heavier strokes.
//ex for lighter strokes.

float xplus = 0.01;
float yplus = 0.01;

float xx = random(0, 0.05);
float yy = random(0, 10);

int rfiller = 0;
int gfiller = 0;
int bfiller = 0;

float esize = 2;

void setup(){
 size(600, 400);
 background(0);
 smooth();
 noStroke();
 frameRate(60);
}

void draw(){

 float x = noise(xx)*width;
 float y = noise(yy)*height;

 rfiller = mouseX/3+55%255;
 gfiller = mouseY/2+55%255;
 bfiller = mouseX+mouseY%255;

 xx += xplus;
 yy += yplus;

 fill(rfiller, gfiller, bfiller);
 ellipse(x, y, esize, esize);

 if (keyPressed) {
   if (key == 'z'){
     esize += 0.2;
   }
 }
 if (keyPressed) {
   if (key == 'x'){
     esize -= 0.2;
   }
 }
}
void mousePressed(){
 fill(0);
 rect(0, 0, width, height);
}
Re: perlian trails
Reply #1 - May 16th, 2009, 11:27am
 
I like the color set chosen here. This is a pleasant little diddy. Maybe you can program a mouseclick burst, where instead of just clearing the palate, it breaks all the colors up and sends them flying.

probably just as hard as it sounds! I haven't processed anything yet, just  got it.
Page Index Toggle Pages: 1