float h;
float p;
void setup(){
size(500,500);
background(255);
}
void draw(){
noStroke();
strokeWeight(0);
//sunset
fill(50,50,70);
rect(0,0,65,500);
fill(120,90,130);
rect(62.5,0,65,500);
fill(190,100,140);
rect(125,0,65,500);
fill(255,90,120);
rect(187.5,0,65,500);
//sunset
fill(250,227,98);
rect(250,0,65,500);
fill(250,220,121);
rect(312.5,0,65,500);
fill(242,250,144);
rect(375,0,65,500);
fill(89,209,165);
rect(437.5,0,65,500);
h -= hour() + (float(minute())/60) + ((float(second())/60)/10);
if(h < -1){
h = 1;
float p = map(h,0,23,0,width-(width/8));
}
println(hour() + (float(minute())/60) + ((float(second())/60)/10));
sunflower(width/2,height/2);
}
void sunflower(int x,int y){
//x = location
//y = location
//pedals
pushMatrix();
translate(x,y);
scale(h,1);
fill(240,255,36);
for(int i = 0; i <= 10; i ++){
rotate(radians(360/10));
ellipse(0,-50,35,100);
}
fill(193,148,62);
ellipse(0,0,75,75);
popMatrix();
}

No comments:
Post a Comment