Wednesday, January 29, 2014
aurora
// from an example in Learning Process by Daniel Shiffman
int [] xpos = new int[30];
int [] ypos = new int[30];
void setup(){
size (400,400);
smooth();
for (int i = 0; i < xpos.length; i++) {
xpos[i] = 0;
ypos[i] = 0;
}
}
void draw(){
fill(50,4);
noStroke();
rect(0,0,width,height);
xpos[xpos.length-1] = mouseX;
ypos[ypos.length-1] = mouseY;
for (int i = 0; i < xpos.length-1; i++) {
xpos [i] = xpos [i+1];
ypos[i] = ypos [i+1];
}
for (int i = 0; i < xpos.length; i++) {
stroke(i*5,205, i*5);
strokeWeight(3);
// fill();
line(xpos [i]+random(2,10), ypos [i]+random(2,30), xpos [i], ypos [i]+random(250,300));
}
fill(255);
noStroke();
ellipse(random(0,300),random(0,300),random(1,2),random(1,2));
}
int [] xpos = new int[30];
int [] ypos = new int[30];
void setup(){
size (400,400);
smooth();
for (int i = 0; i < xpos.length; i++) {
xpos[i] = 0;
ypos[i] = 0;
}
}
void draw(){
fill(50,4);
noStroke();
rect(0,0,width,height);
xpos[xpos.length-1] = mouseX;
ypos[ypos.length-1] = mouseY;
for (int i = 0; i < xpos.length-1; i++) {
xpos [i] = xpos [i+1];
ypos[i] = ypos [i+1];
}
for (int i = 0; i < xpos.length; i++) {
stroke(i*5,205, i*5);
strokeWeight(3);
// fill();
line(xpos [i]+random(2,10), ypos [i]+random(2,30), xpos [i], ypos [i]+random(250,300));
}
fill(255);
noStroke();
ellipse(random(0,300),random(0,300),random(1,2),random(1,2));
}
info
submitted by: sophie_mcdonaldviews: 40
from an example in Learning Process by Daniel Shiffman
This sketch has a parent
comments
loading...
Add a comment: