float x=0; int y=0; void setup(){ size(400,400); background(201,203,242); } void draw_grass (int x) { fill(65,198,36); triangle(60+x,310, 50+x,360, 70+x,360); //middle one triangle(30+x,330, 35+x,360, 50+x,360); //left one triangle(90+x,330, 85+x,360, 70+x,360); //right one } void draw(){ x=x+0.5; y=y+1; //SUN background(201,203,242); noStroke(); fill(252,94,41); //set color to red ellipse(60+x,50,50,50); //center of sun triangle(20+x,10, 50+x,50, 70+x,50); //triangle on the NW triangle(60+x,0, 50+x,50, 70+x,50); //triangle on the N triangle(100+x,10, 70+x,50, 50+x,50); //triangle on the NE triangle(60+x,100, 50+x,50, 70+x,50); //triangle on the S triangle(20+x,90, 50+x,50, 70+x,50); //triangle on the SW triangle(100+x,90, 70+x,50, 50+x,50); //triangle on the SE triangle(5+x,50, 50+x,43, 50+x,58); //triangle on the W triangle(120+x,48, 50+x,40, 50+x,60); //triangle on the E //Ground fill(167,96,54); //set color to brown rect(0,360,400,40); //ground //Grass draw_grass( 0); draw_grass( 100); draw_grass( 200); draw_grass( 300); //Head noStroke(); fill(255); ellipse(200,180,50,50); //head fill(0); ellipse(210,180,7,7); //right eye ellipse(190,180,7,7); //left eye stroke(0); line(196,200, 210,197); //neck noStroke(); fill(255); rect(196,205,10,11); //neck //body fill(255); quad(181,239, 181, 249, 140,270, 140,260); //left arm rect(221,239, 38,10); //right arm fill(255,0,0); ellipse(140,265,11,11); //left hand ellipse(254,243,11,11); //right hand fill(255,0,0); rect(181,216,40,80); //body rect triangle(181,236, 221,296, 171,296); //left side of dress triangle(221,236, 221,296, 231,296); //right side of dress fill(255); rect(185,296,11,60); //left leg rect(207,296,11,60); //right leg fill(255,0,0); ellipse(189,356,13,13); //left shoe ellipse(212,356,13,13); //right shoe //Hat stroke(153); fill(255); ellipse(200,129,10,10); //circle on the hat fill(255,0,0); triangle(200,130, 170,160, 230,160); //body of hat fill(255); rect(170,160,60,8); //bottom of hat //balloon stroke(0); line(255+y,254, 255+y,90); //slope fill(179,54,198); ellipse(255+y,50,60,120); //balloon fill(0); triangle(255+y,110, 250+y,115, 260+y,115); }