Sean Leo-Project 02-Variable Faces

sketch

//Sean B. Leo
//sleo@andrew.cmu.edu
//Section C
//Project_02

var eyeSize = 20;
var pupil = 10;
var faceWidth = 100;
var faceHeight = 150;
var red = ("red");
var green = ("green");
var blue = ("blue");
var r1 = 255;
var g1 = 255;
var b1 = 255;
var r2 = 255;
var g2 = 255;
var b2 = 255;
var A = 20;
var B = 40;
var C = 1;

function setup() {
    createCanvas(600, 500);
}
 
function draw() {
  background(red, green, blue);
  let c = color(255, 255, 255);
  
   //body
  fill(r2, g2, b2);
  ellipse(width/2, height/2 + faceHeight, faceWidth + (faceWidth/2), faceHeight + (faceHeight/2));
  //ellipse((width / 2) + faceWidth, (height / 2) + faceHieght, faceWidth * 2, faceHeight * 2);
  
  //head  
  fill(r1, g1, b1),
  ellipse(width / 2, height / 2, faceWidth,  faceHeight);


  //eyes  
  fill(255);
  var eyeHeightLX = (height/2);
  var eyeHeightRX = (height/2);
  var eyeLX = width / 2 - faceWidth * 0.25;
  var eyeRX = width / 2 + faceWidth * 0.25;
    ellipse(eyeLX, height / 2, eyeSize, eyeSize);
    ellipse(eyeRX, height / 2, eyeSize, eyeSize);
  
  //pupils
  fill(0);
    ellipse(eyeLX, eyeHeightLX, pupil, pupil);
    ellipse(eyeRX, eyeHeightRX, pupil, pupil);
  
  //eyebrows
  {strokeWeight(3);
   var eyeBrowLH1 = eyeHeightLX-pupil*2;
   var eyeBrowLH2 = eyeHeightLX-pupil*C;
   var eyeBrowRH1 = eyeHeightRX-pupil*C;
   var eyeBrowRH2 = eyeHeightRX-pupil*2;
  line(eyeLX-pupil, eyeBrowLH1, eyeLX+pupil, eyeBrowLH2);
  line(eyeRX-pupil, eyeBrowRH1, eyeRX+pupil, eyeBrowRH2);
  }
  //mouth
  fill(0);
  var mouthHeight=height/2 + faceHeight *.30;
  ellipse(width/2, mouthHeight, B, 20);
  
  //nose
  fill(r1, g1, b1);
  arc(width/2, height/2 + faceHeight*.09, A, A, C, PI + QUARTER_PI, OPEN);
  
  
}
 
function mousePressed() {
  red = random(0,255);
  green = random(0, 255);
  blue = random(0, 255);
  r1 = random(20, 255);
  g1 = random(20, 255);
  b1 = random(20, 255);
  r2 = random(0, 255);
  g2 = random(0, 255);
  b2 = random(0, 255);
  A = random(1,30);
  B = random(1,40);
  C = random(1,3);
  faceWidth = random(75, 250);
  faceHeight = random(75, 250);
  eyeSize = random(10, 30);
  pupil = random(7, 12);
}

A big part of figuring out this project was trying to wrap my head around what was spatially dependent on what. It was easier to think of things modularly; if the eyebrow is linked to the eye and if the eye is linked to the head, if the head changes everything else will follow.

lrchu – looking outwards – 02

Zaha Hadid was an Iraqi-British architect and also the first woman to receive the Pritzker Prize, one of the highest honors as an architect. Hadid is known for her masterful manipulation of curves and parametricism in her almost other-worldly designs. The Guardian of London even referred to Hadid as the “queen of the curve… who liberated architectural geometry, giving it a whole new expressive identity.”

al wakrah stadium

The Al Wakrah Stadium, designed by Zaha Hadid and Patrik Schumacher for the 2022 FIFA world cup, features an openable roof and cooled seating for all-year soccer play. The form of the building is derived from an abstraction of traditional boats, dhows, which can be found in Al Wakrah’s ports. The stadium not only applies a unique and beautiful form, but also modern solutions to conventional stadium issues like temperature regulation.

dhow boats

Sarah Kang – Looking Outwards – 02

“Unnumbered Sparks” by Janet Echelman x Aaron Koblin, March 2014 in downtown Vancouver, Canada

Unnumbered Sparks was an interactive installation project created through the collaboration generative artist Aaron Koblin and sculptor, Janet Echelman. This giant, floating canvas was installed in downtown Vancouver, Canada in March of 2014, generating through the real-time data sent through visitors’ mobile devices. I was first interested in this project by its striking visual quality, but then even more amazed by the rendering aspect of this artwork, as visitors directly painted magnified beams of colored light with just small movements on their phones. This project was entirely manifested on a giant, Google Chrome window and programmed using Go, a language that manages the visitor interactions and outputs the visuals to the light projectors. WebGL is a web technology that enables real-time graphics processing; with the WebSockets connection, when users make contact with their phones, the location data is transmitted to the server, allowing instant interaction with the giant canvas projections.

The Making of Unnumbered Sparks, from YouTube.

Aaron Koblin’s focus on data-based interactive digital art partnered with Janet Echelman’s beautiful, flowing sculptures creates a visual experience that users can directly experience and become a part of.

Timothy Liu — Project 02 — Variable Face

tcliu-OpenEnded-02

// Timothy Liu
// 15104 Section C
// Open Ended-02

// facial features (variables)
var eyeWidth = 25;
var eyeHeight = 15;
var pupilWidth = eyeWidth / 2;
var pupilHeight = 11 * eyeHeight / 16;
var noseWidth = 15;
var noseHeight = 40;
var earSize = 30;
var headWidth = 125;
var headHeight = 150;
var mouthWidth = 60;
var mouthHeight = 40;
var mouthStart;
var mouthEnd;
var skin1 = "#FFD3A1";
var eyeL;
var eyeR;

// body shape and size (variables)
var bodyWidth = 200;
var bodyHeight = 370;
var colorR = 105;
var colorG = 64;
var colorB = 122;

// hat dimensions and color (variables)
var hatR = 14;
var hatG = 28;
var hatB = 117;
var hatBottom;

// function time!
function setup() {
    
    createCanvas(600, 480);
    mouthStart = TWO_PI;
    mouthEnd = PI;
    eyeL = width / 2 - headWidth / 5;
    eyeR = width / 2 + headWidth / 5;
    hatBottom = height / 4 - headHeight / 6;
    // initializing P5.js functions in setup()

}
 
function draw() {

    // background color
    background(240, 196, 101);
    noStroke();

    // ears
    fill(skin1);
    ellipse(width / 2 - headWidth / 2, height / 4, headWidth / 8, headHeight / 6);
    ellipse(width / 2 + headWidth / 2, height / 4, headWidth / 8, headHeight / 6);

    // neck
    fill(skin1);
    rect(width / 2 - headWidth / 4, height / 4 + headHeight / 4, headWidth / 2, headHeight);

    // head and face
    fill(skin1);
    ellipse(width / 2, height / 4, headWidth, headHeight);

    // bucket hat
    fill(hatR, hatG, hatB);
    quad(width / 2 - headWidth / 2, hatBottom, width / 2 - headWidth / 3, height / 4 - headHeight / 2, 
    	width / 2 + headWidth / 3, height / 4 - headHeight / 2, width / 2 + headWidth / 2, hatBottom);
    rect(width / 2 - 2 * headWidth / 3, hatBottom, headWidth * 1.35, headWidth / 32);

    // eyeballs
    fill("white");
    ellipse(eyeL, height / 4 - height / 48, eyeWidth, eyeHeight);
    fill("white");
    ellipse(eyeR, height / 4 - height / 48, eyeWidth, eyeHeight);

    // pupils
    fill(59, 35, 18);
    ellipse(eyeL, height / 4 - height / 48, pupilWidth, pupilHeight);
    fill(59, 35, 18);
    ellipse(eyeR, height / 4 - height / 48, pupilWidth, pupilHeight);

    // nose
    fill("#D39972");
    arc(width / 2, height / 4 + headHeight / 8, noseWidth, noseHeight, PI, TWO_PI);

    // mouth
    fill(255, 150, 150);
    arc(width / 2, height / 3, mouthWidth, mouthHeight, mouthStart, mouthEnd, CHORD);

    // body and shirt
    fill(colorR, colorG, colorB);
    arc(width / 2, 5 * height / 6, bodyWidth, bodyHeight, PI, TWO_PI);

    // pants
    fill("#003366");
    rect(width / 2 - bodyWidth / 2, 5 * height / 6, bodyWidth, height / 6);

    // thigh gap
    fill(240, 196, 101);
    rect(width / 2 - bodyWidth / 8, 15 * height / 16, bodyWidth / 4, bodyWidth / 4)
}

function mousePressed() {

    // brackets to denote an array. The coinFlip variable helps determine whether it's a smile or frown.
    var coinFlip = random([0, 1]);

    // randomly generating head proportions including eyes, face size, pupil, nose, and mouth.
    headWidth = random(100, 200);
    headHeight = random(121, 180);
    eyeWidth = random(15, 40);
    eyeHeight = random(10, 20);
    eyeL = width / 2 - headWidth / 5;
    eyeR = width / 2 + headWidth / 5;
    pupilSize = 9 * eyeWidth / 16;
    noseWidth = random(10, 30);
    noseHeight = random(20, 50);
    mouthWidth = random(20, 60);
    mouthHeight = random(20, 60);

    // randomly generating body size and color.
    bodyWidth = random(170, 350);
    colorR = random(0, 255);
    colorG = random(0, 255);
    colorB = random(0, 255);

    // randomly generating hat color.
    hatR = random(0, 255);
    hatB = random(0, 255);
    hatG = random(0, 255);

    // this is an array of different hex values for skin tones.
    // the program randomly selects a skin tone every time the mouse is pressed.
    skin1 = random(["#FFD3A1", "#F5CB9A", "#C39582", "#FFCEB4", "#A57E6E", "#EABD9D", "#FFCEB4", "#DEAB7F", "#FFDCB1"]);
    
    // this if statement helps determine whether the character is smiling or frowning using the coinFlip variable defined above. 
    if (coinFlip == 0) {
        mouthStart = 6.28;
        mouthEnd = 3.14;
        // Smiley mouth
    } else {
    	mouthStart = 3.14;
    	mouthEnd = 6.28;
    	// Frowny mouth
    }

    // condition to ensure that the Smiley mouth never sticks out past the chin
    // note: this was originally an if-and statement, but the ampersand was causing issues with WordPress embedding.
    if (mouthStart == 6.28) {
        if ((height / 3 + mouthHeight) > (height / 4 + headHeight / 2)) {
            mouthHeight = mouthHeight / 2;
        }
    }

    // condition to ensure Frowny mouth never touches the nose
    if (mouthStart == 3.14) {
        if ((height / 3 - mouthHeight) < (height / 4 + headHeight / 8 + noseHeight)) {
            mouthHeight = mouthHeight / 2;
        }
    }

}

This project was a fun challenge for me because it required a heavy amount of step-by-step variable referencing, but it also encouraged me to think very logically. Every time I set up coordinates, I actively made sure to question if I could use a variable to simplify my code, and this made it significantly easier to randomize the face (as well as other features) later because all of my variables were already consolidated.

I enjoyed getting to play with an abstract art style, and I made my characters reflect that; they each have simplified features, but my program incorporates a wide array of body types and shapes. I’ve come away from this project with a much stronger understanding of how to utilize local and global variables, as well as how to use if-else statements to set up different conditions to ensure my faces didn’t distort in odd ways.

Austin Garcia – Looking Outwards – 02 – Section C

David Bollinger generative art piece D20160112A

Original maze developed with simple forms

This simple piece of art is created as a maze and features several basic graphical elements all in isometric view. A maze is generated by randomizing different vertical connections such as stairs and ladders. This interests me because of my work in game design and this is a simple yet effective example of randomly generated maze design. The algorithm that created this not only generated a complex maze, but also pieced together the different vertical movement elements to generate a unique visual complexity out of simple elements.

A maze following the same language as the previous image made larger / more dificult

Fanjie Jin– Looking Outwards – 02

The fins are responding to the intense solar radiation

The Al Bahr Tower is an architecture project in Abu Dhabi designed by Aedas Architects. The building’s facade features a dynamic outer screen that is programmed to respond to the sun’s movement, shielding the building from gaining too much solar radiation. As the input parameter for the algorithm that is controlling the openness of the screen is sun, when the sun is at different location of the day, the screen also becomes a large dynamic and installation. I think this project is really profound in that such computational installation has not only engaged in solving some urgent sustainable and ecological urban issues but also functions as a large scale installation that is visually appealing. Bryan Hamilton, director at the Aedas Architects has commented on this project: “ This project represents the perfect marriage of technology and design as it entirely fit for purpose and sympathetic to their environment.” 

interior view of the fins

lee chu – project 02 – variable face

lrchu

// lee chu
// section c
// lrchu@andrew.cmu.edu
// project - 02

var eyeSize = 20;
var eyeColor = 24;
var mouthWidth = 20;
var faceR = 60;
var faceH = 120;
var hairH = 20;
var R = 229;
var browL = 12;
var browT = 0;

function setup() {
    createCanvas(640, 480);
}

function draw() {
    background(color(R, 208, 227));
    fill(color(231, 229, 229));

    // head
    strokeWeight(0.7);
    beginShape();
    curveVertex(width/2 - 1.05 * faceR, 1.05 * height/2);
    curveVertex(width/2 - 1.05 * faceR, 1.05 * height/2);
    curveVertex(width/2 - faceR, height/2);
    curveVertex(width/2 - 0.8 * faceR, height/2 - 0.3 * faceH);
    curveVertex(width/2 - 0.3 * faceR, height/2 - 0.5 * faceH);
    curveVertex(width/2 + 0.3 * faceR, height/2 - 0.5 * faceH);
    curveVertex(width/2 + 0.8 * faceR, height/2 - 0.3 * faceH);
    curveVertex(width/2 + faceR, height/2);
    curveVertex(width/2 + 1.05 * faceR, 1.05 * height/2);
    curveVertex(width/2 + 1.05 * faceR, 1.05 * height/2);
    endShape();

    // cheeks
    beginShape();
    curveVertex(width/2 + 1.05 * faceR, 1.05 * height/2);
    curveVertex(width/2 + 1.05 * faceR, 1.05 * height/2);
    curveVertex(width/2 + 1.1 * faceR, 1.14 * height/2);
    curveVertex(width/2 + faceR, 1.2 * height/2);
    curveVertex(width/2 + 0.7 * faceR, 1.25 * height/2);
    curveVertex(width/2 + 0.35 * faceR, 1.28 * height/2);
    curveVertex(width/2 - 0.35 * faceR, 1.28 * height/2);
    curveVertex(width/2 - 0.7 * faceR, 1.25 * height/2);
    curveVertex(width/2 - faceR, 1.2 * height/2);
    curveVertex(width/2 - 1.1 * faceR, 1.14 * height/2);
    curveVertex(width/2 - 1.05 * faceR, 1.05 * height/2);
    curveVertex(width/2 - 1.05 * faceR, 1.05 * height/2);
    endShape();

    // eyes
    var eyeRX = width/2 + faceR * 0.5;
    var eyeLX = width/2 - faceR * 0.5;
    var eyeRH = height/2 + 0.05 * faceH;
    var eyeLH = height/2;
    strokeWeight(0);
    fill('black');
    ellipse(eyeRX, eyeRH, eyeSize, 0.9 * eyeSize);
    ellipse(eyeLX, eyeLH, eyeSize, 0.9 * eyeSize);
    fill(color(184, 24, eyeColor));
    ellipse(eyeRX, eyeRH + 0.1 * eyeSize, 0.8 * eyeSize, 0.7 * eyeSize);
    ellipse(eyeLX, eyeLH + 0.1 * eyeSize, 0.8 * eyeSize, 0.7 * eyeSize);
    fill('white');
    ellipse(eyeRX + 0.25 * eyeSize, eyeRH - 0.2 * eyeSize, 0.3 * eyeSize, 0.25 * eyeSize);
    ellipse(eyeLX + 0.25 * eyeSize, eyeLH - 0.2 * eyeSize, 0.3 * eyeSize, 0.25 * eyeSize);

    // eyebrows
    strokeWeight(0.7);
    beginShape();
    curveVertex(eyeRX - 0.5 * browL, eyeRH - 0.75 * eyeSize - browT);
    curveVertex(eyeRX - 0.5 * browL, eyeRH - 0.75 * eyeSize - browT);
    curveVertex(eyeRX, eyeRH - 0.85 * eyeSize);
    curveVertex(eyeRX + 0.5 * browL, eyeRH - 0.75 * eyeSize + browT);
    curveVertex(eyeRX + 0.5 * browL, eyeRH - 0.75 * eyeSize + browT);
    endShape();
    beginShape();
    curveVertex(eyeLX - 0.5 * browL, eyeLH - 0.75 * eyeSize + browT);
    curveVertex(eyeLX - 0.5 * browL, eyeLH - 0.75 * eyeSize + browT);
    curveVertex(eyeLX, eyeLH - 0.85 * eyeSize);
    curveVertex(eyeLX + 0.5 * browL, eyeLH - 0.75 * eyeSize - browT);
    curveVertex(eyeLX + 0.5 * browL, eyeLH - 0.75 * eyeSize - browT);
    endShape();

    // mouth
    strokeWeight(0);
    fill('gray');
    beginShape();
    curveVertex(width/2 - 0.5 * mouthWidth, height/2 + 0.2 * faceH);
    curveVertex(width/2 - 0.5 * mouthWidth, height/2 + 0.2 * faceH);
    curveVertex(width/2 - 0.3 * mouthWidth, height/2 + 0.15 * faceH);
    curveVertex(width/2 + 0.3 * mouthWidth, height/2 + 0.15 * faceH);
    curveVertex(width/2 + 0.5 * mouthWidth, height/2 + 0.2 * faceH);
    curveVertex(width/2 + 0.4 * mouthWidth, height/2 + 0.22 * faceH);
    curveVertex(width/2 + 0.4 * mouthWidth, height/2 + 0.22 * faceH);
    endShape();

    // hair
    strokeWeight(0.5);
    noFill();
    beginShape();
    curveVertex(width/2, height/2 - 0.45 * faceH);
    curveVertex(width/2, height/2 - 0.45 * faceH);
    curveVertex(width/2 - 0.1 * faceH, height/2 - 0.5 * faceH - 0.85 * hairH);
    curveVertex(width/2 - 0.2 * faceH, height/2 - 0.5 * faceH - hairH);
    curveVertex(width/2 - 0.2 * faceH, height/2 - 0.5 * faceH - hairH);
    endShape();

}

function mousePressed() {
    R = random(180, 255);
    faceR = random(30, 85);
    faceH = random(80, 170);
    eyeSize = random(8, 30);
    eyeColor = random(0, 255);
    mouthWidth = random(10, 40);
    hairH = random(10, 90);
    browT = random(-3, 3);
    browL = random(5, 14);
}

I experimented with curveVertex() to create a blob-like face with variable pupils, mouth, eyebrows, and hair.

Fanjie Jin – project 02 – variable face

sketch

// Fanjie Mike Jin
//Section
//fjin@andrew.cmu.edu
//Project-02 (Variable Faces)

var eyeSize = 25;
var skin = 76;
var faceWidth = 230;
var faceHeight = 200;
var colorPink = 230;
var eyeW = 20;
var eyeH = 50;
var eyeballX = 360;
var eyeballX2 = 183;
var mouseW = 70;
var mouseH = 80;

function setup (){
    createCanvas(640, 480);
}

function draw(){
    background(57,skin, 117);

//footleft
    noStroke();
    fill(163, 65, 67);
    ellipse(350 - 0.5 * faceWidth, 430 - 0.5 * faceHeight, 60, 60 );

//footright
    noStroke();
    fill(163, 65, 67)
    ellipse(290 + 0.5 * faceWidth, 430 - 0.5 * faceHeight, 60, 60 );

//body
    noStroke();
    fill(255, colorPink, 219);
    ellipse(320, 240,faceWidth, faceHeight);

//handleft
    noStroke();
    fill(255, colorPink, 219);
    ellipse(315 - 0.5 * faceWidth, 310 - 0.5 * faceHeight, 70, 50);

//handright
    noStroke();
    fill(255, colorPink, 219);
    ellipse(315 + 0.5 * faceWidth, 295 - 0.5 * faceHeight, 70, 50);

//cheekLeft
    noStroke();
    fill (255, 191, 205);
    ellipse(256, 245, 46, 20);

//cheekRight
    noStroke();
    fill (255, 191, 205);
    ellipse(386, 245, 46, 20);

//eyesleft
    noStroke();
    fill (0);
    ellipse(288, 194, eyeW, eyeH);

//eyesright
    noStroke();
    fill (0);
    ellipse(360, 194, eyeW, eyeH);

//eyeballleft
    noStroke();
    fill (255);
    ellipse(eyeballX, 183, 9, 20);

//eyeballright
    noStroke();
    fill (255);
    ellipse(eyeballX - 72, 183, 9, 20);

//mouse
    noStroke();
    fill (255, 120, 192);
    ellipse(320, 279, mouseW, mouseH);
}

function mousePressed(){
    colorPink = random(204, 150);
    faceWidth = random(230, 260);
    faceHeight = random(200, 230);
    eyeW = random(20, 30);
    eyeballX = random(355, 365);
    mouseW = random(70, 80);
    mouseH = random(80, 90);
    skin = random(50, 80);
    }

I decided to make a variable face of Kirby which is my favorite hero in super smash bros. The variable components for this project are the size of Kirby’s face, eyeball positions, eye sizes and the color of Kirby as well as the background.

Katrina Hu – Project 02 – Variable Face

sketch_project2

/*Katrina Hu
15104 C
kfh@andrew.cmu.edu
Project - 02 - Face*/


var eyeSize = 22;
var cheekWidth = 30;
var mouthWidth = 45;
var backgroundColor = 205
 
function setup() {
    createCanvas(640, 480);
    background(252, backgroundColor, 186);
    noStroke();
}
 
function draw() {
    background(252, backgroundColor, 186);
    //chopstick 1
    fill(158, 106, 68);
    rect(100, 270, 540, 7, 20, 0, 0, 20);
    triangle(640, 265, 100, 270, 640, 278);
    //bun shape
    fill(252, 232, 220);
    ellipse(220, 295, 200, 185);
    fill(255, 249, 242);
    ellipse(220, 275, 185, 165);
    triangle(222, 158, 134, 241, 305, 241);
    strokeWeight(2);
    line(250, 200, 250, 220);
    fill(252, 232, 220);
    ellipse(220, 195, 7, 20);
    ellipse(207, 190, 7, 20);
    ellipse(232, 190, 7, 20);
    //chopstick 2
    noStroke(0)
    fill(158, 106, 68);
    rect(100, 320, 540, 7, 20, 0, 0, 20);
    triangle(640, 315, 100, 320, 640, 328);
    //bun eyes
    fill(0, 0, 0)
    ellipse(180, 250, eyeSize);
    ellipse(270, 250, eyeSize);
    fill(255, 255, 255);
    ellipse(180, 245, eyeSize / 3);
    ellipse(270, 245, eyeSize / 3);
    //bun cheeks
    fill(255, 181, 176);
    ellipse(165, 275, cheekWidth, 10);
    ellipse(280, 275, cheekWidth, 10);
    //bun mouth
    fill(189, 100, 87);
    arc(220, 290, mouthWidth, 30, 0, PI, CHORD);
}
 
function mousePressed() {
    cheekWidth = random(25, 40);
    eyeSize = random(20, 30);
    mouthWidth = random(40, 55);
    backgroundColor = random(190, 210)
}

This was a very fun project to do, as I was able to play around with all the different variables and shapes.

Joanne Chui – Project 02 – Variable Face

variableface_jchui1

/*
Joanne Chui 
Section C
Project 2
*/
var chin = 2
var forehead = 2
var nose = 245
var nosetip = 250
var eyeWidth = 12
var eyeHeight = 2
var r = 10
var g = 10
var b = 10
var mood = 270
var glasses = 2

function setup(){
    createCanvas(480, 640);
}

function draw(){
    background(213, 219, 227);
    var xpt3 = width / 2;
    var ypt3 = height / 2;
    var xpt2 = xpt3 - 60
    var xpt4 = xpt3 + 60

    //face
    noFill();
    strokeWeight(1);
    stroke(r, g, b);
    beginShape();
    curveVertex(xpt2 + forehead, 150); //pt1 
    curveVertex(xpt2, ypt3 + chin);//pt2
    curveVertex(xpt3, ypt3);//pt3
    curveVertex(xpt4, ypt3 + chin);//pt4
    curveVertex(xpt4 - forehead, 150);//pt5
    curveVertex(xpt2 + forehead, 150);//pt6
    curveVertex(xpt2, ypt3 + chin);//pt7
    curveVertex(xpt2, ypt3 + chin);//pt7
    endShape();

    //nose
    strokeWeight(2);
    beginShape();
    curveVertex(200,190);
    curveVertex(200,190);//1
    curveVertex(235, 200);//2
    curveVertex(245, nose);//3
    curveVertex(nosetip, nose + 10);//4
    curveVertex(245, nose + 20);//5
    curveVertex(245, nose + 20);
    endShape();

    //eyes
    strokeWeight(1.5);
    fill("white");
    arc(210, 220, eyeWidth, eyeHeight, PI, 0);//left
    arc(210, 220, eyeWidth, eyeHeight / 2, 0, PI);
    arc(270, 220, eyeWidth, eyeHeight, PI, 0);//right
    arc(270, 220, eyeWidth, eyeHeight / 2, 0, PI);

    //pupil
    fill(r, g, b);
    ellipse(210, 220, eyeHeight / 4, eyeHeight / 4);
    ellipse(270, 220, eyeHeight / 4, eyeHeight / 4);

    //mouth
    triangle(220, 275, 230, 285, 270, mood);
    //hair
    beginShape();
    curveVertex(xpt4 - forehead, 150);
    curveVertex(xpt2 + forehead, 150); 
    curveVertex(xpt2, ypt3 + chin);
    curveVertex(xpt2 - 10, ypt3 + chin + 10);
    curveVertex(xpt2 - 10, ypt3 + chin);
    curveVertex(xpt2 + forehead - 10, 130);
    curveVertex(xpt4 - forehead, 142);
    curveVertex(xpt4 - forehead, 150);
    endShape();

}


function mousePressed(){
    chin = random(-80, 0);
    forehead = random(-30, 30);
    nose = random(225, 240);
    nosetip = random(250, 260);
    eyeWidth = random(15, 25);
    eyeHeight = random(5, 25);
    r = random(0, 225);
    g = random(0, 225);
    b = random(0, 225);
    mood = random(260, 300);
   glasses = random(1, 3);

}

I was inspired to do more of an abstract face in order to generate more unique results, and wanted as many elements as possible to vary to create interesting combinations. I experimented with the head shape especially because I thought it would impact the way the face would appear the most.