xxxxxxxxxx
106
function setup() {
createCanvas(400,400); //w,h
noStroke();
angleMode(DEGREES);
}
function draw() {
background(1, 42, 131); //r,g,b
/* window */
fill(14, 75, 167);
ellipse(200,200,279,270);
/* window lines */
fill(1, 42, 131);
rect(100,0,7,400);
rect(120,0,7,400);
rect(140,0,7,400);
rect(160,0,7,400);
rect(180,0,7,400);
/* table - long side */
push(); //start blend mode
blendMode(OVERLAY);
fill(76, 201, 240);
rect(50,250,220,20);
/* table - short side */
fill(67, 97, 238);
rect(270,250,80,20);
pop(); //stop blend mode
/* shelves */
push(); //start using stroke
stroke(67, 97, 238);
strokeWeight(1);
noFill();
rect(-10,90,95,10);
translate(350,70);
rect(0,90,95,10);
pop(); //stop using strokes
push();
blendMode(ADD);
/* purple book - upper shelf */
fill(58, 12, 163);
rect(15,34,10,55);
/* blue book - upper shelf*/
fill(67, 97, 238);
rect(26,34,10,55);
/* magenta book - upper shelf */
push(); //start translate
translate(5,15);
rotate(-23);
fill(114, 9, 183);
rect(20,34,5,55);
pop(); //stop translate
/* purple book - lower shelf */
fill(58, 12, 163);
rect(358,104,20,55);
/* magenta book - lower shelf */
fill(114, 9, 183);
rect(379,104,10,55);
/* blue book - lower shelf*/
fill(67, 97, 238);
rect(390,104,10,55);
pop();
/* macbook keyboard */
fill(175, 175, 175);
rect(220,245,68,5,0,1,4,0);
/* macbook screen*/
push(); //start shear
shearX(20);
fill(212, 212, 212);
rect(-10,170,145,80,4.5);
fill(255);
/* Apple logo - apple */
circle(60,215,15);
circle(65,215,15);
/*Apple logo - bite */
fill(212, 212, 212);
circle(72,213,10);
pop(); //stop shear
/* Apple logo - leaf */
fill(255);
arc(138,200,10,10,0,90,CHORD);
arc(143,205,10,10,180,270,CHORD);
/* mug */
fill(114, 9, 183);
rect(300,220,25,30,0,0,5,5);
fill(58, 12, 163);
rect(312.5,220,12.5,30,0,0,5,0);
/* mug handle */
fill(58, 12, 163);
rect(322,225,9,2);
rect(329,225,2,14);
rect(322,239,9,2);
}