Become Ghalya’s Hair Stylist

sketch

//Ghalya Alsanea
//Section B
//galsanea@andrew.cmu.edu
//Project-01

function setup() {
    
    createCanvas(600, 600);
    background(200,160,200);
    angleMode(DEGREES);
    text('oh no! Ghalya is bald! Help draw her hair..', 200, 50);

    /*I originally created a canvas of 800x800,
    but had to rescale the protrait proportionally
    to fit the 600 constraint on WordPress*/
    scale(0.75);
    
    //neck
    strokeWeight(1);
    stroke(0);
    fill (175, 150, 130);
    rect(325, 600, 150, 200);

    //face
    fill (185, 150, 130);
    ellipse(400, 400, 500, 650);

    //eyeRight
    fill ("white");
    ellipse(300, 300, 100, 65);

    fill (130, 90, 60);
    circle(300, 300, 65);

    //eyeLeft
    fill ("white");
    ellipse(500, 300, 100, 65);

    fill (130, 90, 60);
    circle(500, 300, 65);

    //nose
    fill (175, 150, 130);
    triangle(400, 380, 450, 480, 350, 480);

    //mouth
    fill ("black");
    arc(400, 550, 200, 150, 0, 180, OPEN);


    //eyebrows
    noFill();
    strokeWeight (5);
    arc(300, 260, 100, 50, 200, 340, OPEN);
    arc(500, 260, 100, 50, 200, 340, OPEN);

    //pupils
    fill (0);
    strokeWeight(3);
    stroke(255);
    circle(300, 300, 30);
    circle(500, 300, 30);


}

function draw() {
    //hair 
    strokeWeight(1);
    stroke(0);
    a = random(200);
    fill(130, 90, 60, a);
    circle(mouseX, mouseY, 80);
}

Project 01 – Self-Portrait

For this project, we were asked to create a self portrait using p5.js. I chose to emphasize my curly hair because I believe it is a big part of who I am and how people perceive me.

Leave a Reply