xxxxxxxxxx
63
/*
self portrait v1*/
function setup() {
createCanvas(400, 600);
background("rgb(17,171,171)");
//the fifth number gives it a rounded edge
//rectMode(CENTER);
//rect(200, 300, 300, 400, 50);
//head
fill("rgb(118,217,154)");
noStroke();
circle(200, 300, 400);
//eyes
fill("#795548");
circle(200 + 80, 300 - 50, 40);
circle(200 - 80, 300 - 50, 40);
//glasses lens
noStroke();
fill(231, 207, 207, 100); //4th number is transparency
circle(200 + 80, 300 - 50, 100);
circle(200 - 80, 300 - 50, 100);
//glasses frames
stroke("black");
strokeWeight(10);
noFill();
circle(200 + 80, 300 - 50, 100);
circle(200 - 80, 300 - 50, 100);
//glasses connector
stroke("black");
strokeWeight(10);
noFill();
line(170, 250, 230, 250);
//smile
stroke("brown");
strokeWeight(13);
arc(200, 400, 80, 80, 0, PI + QUARTER_PI, CHORD);
textSize(20);
stroke("black");
strokeWeight(1);
line(0, 9, width, 9);
textAlign(CENTER, TOP);
text("How's the water today?", 25, 12, width);
line(0, 37, width, 37);
line(0, 59, width, 59);
textAlign(CENTER, BASELINE);
text("What's water?", 25, 62, width);
line(0, 87, width, 87);
//save('selfportrait1.png');
}