Jai Sawkar – Project 01 – Self Portrait

Click to Change My Wardrobe

Portrait_Jai

//Jai Sawkar
//Section C
//jsawkar@andrew.cmu.edu
//Project-01


var b = 0;

function setup() {
    createCanvas(400, 450);
}

function draw() {

    rectMode(CENTER)
    ellipseMode(CENTER)
    angleMode(DEGREES)
    noStroke();
    background("#ccb0a7");

//Body
  
    fill(b);
    rect(201.7, 431.9, 268.2, 35.7);
    ellipse(123.7, 346.8, 113.2, 199.4);
    ellipse(281.1, 344.3, 113.2, 199.4);
    rect(202.4, 384.3, 270.2, 60.3);
    rect(202.5, 431.9, 270.1, 50.7);
    ellipse(205.4, 272.1, 220.2, 87.2);
    rect(201.6, 338.7, 74.9, 76.4);

//face
  
    fill(167, 136, 105);
    ellipse(202.3, 239.9, 76.3, 22.3);
    quad(164.6, 237.7, 240.8, 239.6, 231.9, 201.8, 172.1, 198.6);
    ellipse(162.1, 114.9, 34.1, 117.1);
    ellipse(248.5, 116.2, 34.5, 113.2);

//shadow
  
    fill(99, 95, 85);
    ellipse(216.4, 226.9, 40.2, 9.2);
    quad(172.4, 200.8, 196.2, 226.9, 236.5, 226.9, 233.2, 206.6);

//Face Infront of Shadow
  
    fill(167, 136, 105);
    ellipse(205.9, 133.1, 117.3, 165.3);

//hair
  
    fill(41, 35, 17);
    quad(143.9, 118.2, 147.0, 115.5, 147.9, 107.8, 143.7, 109.9);
    ellipse(146.1, 89.7, 6.9, 52.4);
    ellipse(179.8, 65.9, 69.3, 27.3);
    quad(266.3, 121.1, 263.6, 119.2, 261.8, 111.7, 265.7, 111.8);
    ellipse(190.1, 76.4, 89.4, 25.5);
    ellipse(199.6, 64.4, 80.4, 27.3);
    ellipse(223.7, 68, 69.3, 27.3);
    ellipse(231.8, 66.1, 69.3, 27.3);
    ellipse(262.9, 87.0, 6.9, 52.3);
    ellipse(264.4, 87.9, 6.9, 52.3);

}

function mousePressed() {
  
    b = random(0, 255)
  
}

I aimed to create a slightly abstract self-portrait that added a little flair. I began by using a series of shapes to create the body, and then mostly ellipses to create the rest of the face, and finally, used a variable to change my shirt color on each click.

Leave a Reply