Monday, September 28, 2009
Throwing lines around v0
// just type here
// and click "submit" when done
int frameCount = 0;
void setup(){
background(255);
size(600,600);
fill(125,125,125,90);
stroke(0,0,0,90);
}
void draw() {
frameCount++;
int x = sin(frameCount*2+2)* width/2;
int y = cos(frameCount*3/2)* height/2;
int xOld = sin((frameCount-10)*2+2)* width/2;
int yOld = cos((frameCount-10)*3/2)* height/2;
translate(width/2,height/2);
ellipse(x,y,2,2);
ellipse(xOld,yOld,2,2);
line(x,y,xOld,yOld);
}
// and click "submit" when done
int frameCount = 0;
void setup(){
background(255);
size(600,600);
fill(125,125,125,90);
stroke(0,0,0,90);
}
void draw() {
frameCount++;
int x = sin(frameCount*2+2)* width/2;
int y = cos(frameCount*3/2)* height/2;
int xOld = sin((frameCount-10)*2+2)* width/2;
int yOld = cos((frameCount-10)*3/2)* height/2;
translate(width/2,height/2);
ellipse(x,y,2,2);
ellipse(xOld,yOld,2,2);
line(x,y,xOld,yOld);
}
comments
loading...
Add a comment: