/*
Aaron Lee
//Section C
//sangwon2@andrew.cmu.edu
Project-01-self portrait
*/
//canvas
function setup() {
createCanvas(600,600);
}
function draw() {
//background
if (mouseX < width*0.33) {
background("red");
} else if (mouseX > width*0.66) {
background("blue");
} else {
background("white");
}
//hat
fill(255);
noStroke();
quad(249,213,355,213,390,284,220,266);
fill(0);
triangle(195,266,266,249,390,284);
//eyebrow
stroke(100);
line(213,309,231,302);
line(258,294,292,284);
//nose
stroke(50);
strokeWeight(4);
line(249,277,266,373);
line(266,373,280,364);
line(280,364,281,383);
//book
line(188,367,274,385);
line(274,385,360,366);
line(360,366,367,498);
line(274,385,270,460);
line(188,367,193,502);
//sunglasses
noStroke();
fill(0)
quad(208,329,240,314,247,342,225,348);
quad(263,310,295,300,297,326,272,333);
quad(242,326,359,293,357,302,245,336);
//hand
stroke(0);
strokeWeight(1);
line(257,564,248,532);
line(248,532,225,505);
line(225,505,233,500);
line(240,507,222,487);
line(222,487,228,482);
line(243,498,221,469);
line(221,469,228,461);
line(221,469,228,461);
line(221,454,248,487);
line(221,454,231,447);
line(231,447,268,497);
line(268,497,292,482);
line(292,482,300,493);
line(300,493,285,508);
line(285,508,304,552);
}
Instead of avoiding rigid curves, I decided to design them intentionally with different lineweights.