My imaginary self portrait
portrait
// Stefanie Suk
// 15-104 Section D
function setup() {
createCanvas(600, 600);
background(208, 233, 254);
frameRate(10);
// text("p5.js vers 0.9.0 test.", 10, 15);
}
function draw() {
// random circle background
fill(random(255), random(255), random(255));
ellipse(random(600), random(600), random(100), random(100));
noFill();
stroke(0);
strokeWeight(10);
rect(100, 100, 400, 400);
// head and body
noStroke();
fill(255);
ellipse(300, 680, 400, 600);
fill(240);
ellipse(305, 332, 305, 250);
fill(255, 255, 255);
ellipse(300, 300, 300, 300);
ellipse(345, 350, 250, 200);
ellipse(200, 200, 120, 120);
ellipse(400, 205, 120, 120);
// eyes
stroke(0);
strokeWeight(17);
point(265, 320);
point(370, 320);
// mouth
strokeWeight(5);
fill(255, 0, 0);
arc(320, 345, 50, 50, 0, PI, CHORD);
// necktie and button
fill(0);
triangle(276, 465, 276, 503, 319, 484.5);
triangle(361, 465, 361, 503, 319, 484.5);
ellipse(319, 510, 5, 5);
ellipse(319, 525, 5, 5);
ellipse(319, 540, 5, 5);
// blush
noStroke();
fill(249, 203, 203);
ellipse(200, 350, 30, 30);
ellipse(420, 350, 30, 30);
fill(32, 69, 140);
quad(264, 173, 280, 130, 324, 130, 343, 173);
}