The tunnel Link Just hit 'r' and it will take off
float i=0;
float k=0;
int x0 = 300;
int y0 = 300;
int x1 = 400;
int y1 = 100 ;
int x2 = 500 ;
int y2 = 300 ;
void setup() {
size(700, 700);
background(0);
} // end setup
void draw() {
frameRate(1999999999);
fill(random(0,255),random(0,255), random(0,255));
keyPressed();
}
void keyPressed(){
if (key == 'r'){
i -=.17;
k +=1;
translate(width/2,height/2);
rotate(PI*i);
triangle(x0-k,y0-k,x0-k,y1-k,0,0);
}
}
float k=0;
int x0 = 300;
int y0 = 300;
int x1 = 400;
int y1 = 100 ;
int x2 = 500 ;
int y2 = 300 ;
void setup() {
size(700, 700);
background(0);
} // end setup
void draw() {
frameRate(1999999999);
fill(random(0,255),random(0,255), random(0,255));
keyPressed();
}
void keyPressed(){
if (key == 'r'){
i -=.17;
k +=1;
translate(width/2,height/2);
rotate(PI*i);
triangle(x0-k,y0-k,x0-k,y1-k,0,0);
}
}
No comments:
Post a Comment