void setup() { size(600, 500); } void draw(){ color my_color=color(random(50),random(150),random(250)); int timer= 1000; int wait = 1000; float bh=(width/2); //body horizontal position float vh=(height/2); //body vertical position float hv=(height/6);//head vertical position float rn= random(90); background(my_color); println("1.caseback"); noFill(); stroke(153); strokeWeight(2); rectMode(CENTER); rect(bh, vh-35, rn, 207.5); println("2.head"); noStroke(); fill(255, 228, 182); ellipse(bh, hv, rn, 100); println("3.Body"); fill(255, 228, 182); ellipse(300, vh, rn, 300); println("4.Feet"); fill(255, 228, 182); ellipse(bh-50, vh*1.5, rn, 60); ellipse(bh+50, vh*1.5, rn, 60); println("5.Hands"); ellipse(bh-90, vh-30, rn, 60); ellipse(bh+90, vh-30, rn, random(60)); println("6.ears"); ellipse(375, hv/2, random(50), 50); ellipse(225, hv/2, 50, rn); fill(0, 0, 0); println("7.Case"); noFill(); stroke(153); strokeWeight(2); rectMode(CENTER); rect(bh, 215, rn, 415); println("8.caselines-left"); line(bh/3, random(8), bh/1.5, 112); line(bh/3, random(422), bh/1.5, 318); println("9.caselines-right"); line(500, random(8), 400, 112); line(500, random(422), 400, 318); println("11.Eyes"); point(bh-40, 60); point(bh+40, 60); println("12.nose"); fill (my_color); triangle(290, 75, 300, 90, 310, 75); println("paws"); noStroke(); fill(166, 108, 15); ellipse(bh-110, vh-30, rn, 30); ellipse(bh+110, vh-30, rn, 30); println("label"); fill(bh, random (255), 255); rectMode(CENTER); stroke(153); strokeWeight(1); rect(bh, 450, 400, 50); noFill(); fill(my_color); rect(bh, 450, 380, 15); noFill(); save ("bear2.jpg"); }
by Nathalia Tello