float f;
void setup(){
size(500,500);
background(255);
}
void draw(){
background(255);
f -= .01;
if(f < -1){
f = 1;
}
sunflower(width/2,height/2);
}
void sunflower(int x,int y){
//x = location
//y = location
//pedals
pushMatrix();
translate(x,y);
scale(f,1);
fill(240,255,36);
for(int i = 0; i <= 10; i ++){
rotate(radians(360/10));
ellipse(0,-50,35,100);
}
fill(0);
ellipse(0,0,75,75);
popMatrix();
}

No comments:
Post a Comment