- Show Sketch
/** @peep sketchcode */
float i;
float x;
boolean first;
void setup(){
size(400,400);
background(0);
noStroke();
fill(110,205,252, 40);
i = 2.0;
x= 2.0;
frameRate(10);
first = true;
}
void draw(){
translate(width/2, height/2);
if(first){
if(i < 15.0){
pushMatrix();
scale(1.0/i);
for(int j = 0; j < 20; j ++){
rect(width,height, 400,400);
rotate(radians(180/10));
}
popMatrix();
}
i ++;
if(x < 50.0){
pushMatrix();
scale(1.0/i);
for(int j = 0; j < 10; j ++){
ellipse(width,height, 400,400);
rotate(radians(360/10));
}
popMatrix();
}
x = x + 0.5;
if(i > 14.0 && x < 50.0){
first = false;
i = 2.0;
x = 2.0;
}
}else{
fill(0, 20);
if(i < 15.0){
pushMatrix();
scale(1.0/i);
for(int j = 0; j < 20; j ++){
rect(width,height, 400,400);
rotate(radians(180/10));
}
popMatrix();
}
i ++;
if(x < 50.0){
pushMatrix();
scale(1.0/i);
for(int j = 0; j < 10; j ++){
ellipse(width,height, 400,400);
rotate(radians(360/10));
}
popMatrix();
}
x = x + 0.5;
if(i > 14.0 && x < 50.0){
first = false;
i = 2.0;
x = 2.0;
}else{
//setup();
}
}
rotate(radians(360/10)+ x);
}
Nothing in the gallery yet!
Comments
Nobody has said anything yet.