Mihika Bansal-Project 02-Variable Face

sketch

/*
Mihika Bansal 
Section E 
mbansal@andrew.cmu.edu
Project-01
*/

var faceWidth=120; 
var faceHeight=150; 
var faceColorR=234; 
var faceColorG=213; 
var faceColorB=200; 
var hairLength=200; 
var neckLength=100; 
var neckWidth= 75; 
var noseY= 220;
var eyeWidth=15; 
var mouthX=20; 
var mouthY=10; 
var earWidth= 15; 
var earHeight= 17; 
var colorR= 230; 
var colorG=211; 
var colorB=152; 

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

function draw() {
    background(231, 231, 253); 
  
    //neck
    fill(faceColorR, faceColorG, faceColorB); 
    rectMode(CENTER); 
    rect(width/2, (height / 2 - 50)+(0.5*faceHeight)+0.2*neckLength, neckWidth, neckLength);
    
    //hair 
    fill("black");
    arc(width/2+0.68*(0.5*faceWidth), height/2-20, 100, hairLength, 3*PI/2, PI/2);
    arc(width/2-0.68*(0.5*faceWidth), height/2-20, 100, hairLength, PI/2, 3*PI/2);
    
     //face +ears 
    fill(faceColorR, faceColorG, faceColorB);
    ellipse(width / 2, height / 2 - 50, faceWidth,  faceHeight);
    arc(width/2+(0.5*faceWidth), height/2-0.20*faceHeight, earWidth, earHeight, 3*PI/2, PI/2);
    arc(width/2-(0.5*faceWidth), height/2-0.20*faceHeight, earWidth, earHeight, PI/2, 3*PI/2);
    //hair 
    fill("black");
    arc(width/2, height/2-65, faceWidth*1.3, faceHeight, PI-0.40, QUARTER_PI-0.45 , PIE);
    //nose 
    fill(faceColorR, faceColorG, faceColorB);
    triangle(width/2, noseY, width/2-5, noseY*0.97, width/2+5, noseY*0.97);

    //eyes 
    fill("white"); 
    ellipse(width/2-20, height/2-40, eyeWidth, eyeWidth*0.65);
    ellipse(width/2+20, height/2-40, eyeWidth, eyeWidth*0.65);
    fill("black"); 
    ellipse(width/2-18, height/2-42, eyeWidth*0.45, eyeWidth*0.45);
    ellipse(width/2+22, height/2-42, eyeWidth*0.45, eyeWidth*0.45);

    //mouth
    fill(123, 30, 30); 
    arc(width/2, height/2+faceHeight*0.04, mouthX, mouthY, 0, PI,OPEN);

    //earrings 
    fill(colorR, colorG, colorB); 
    ellipse(width/2+(0.52*faceWidth), height/2-0.18*faceHeight, 5, 5);
    ellipse(width/2-(0.52*faceWidth), height/2-0.18*faceHeight, 5, 5);
    fill(colorR*1.2, colorB*1.2, colorG*1.2);
    rect(width/2+(0.52*faceWidth), height/2+0.04*faceHeight, 5, hairLength*0.2);
    rect(width/2-(0.52*faceWidth), height/2+0.04*faceHeight, 5, hairLength*0.2);
     
}

function mousePressed() {
    faceWidth = random(100, 150);
    faceHeight = random(140, 180);
    eyeWidth = random(10, 25);
    faceColorR= random(150, 250);
    faceColorG= random(102, 245);
    faceColorB= random(55, 236);
    hairLength= random(100, 250);
    neckLength= random(85, 150); 
    neckWidth= random(50, 120);
    noseY=random(215, 230);
    mouthY=random(5,20); 
    mouthX=random(15, 30);
    earWidth=random(10, 25);
    earHeight=random(13, 30);
    colorR=random(0,255); 
    colorG=random(0,255);
    colorB=random(0,255);

}

For this project, I worked with the same style of my self portrait to create faces that changed multiple facets. I changed the eye size, skin color, face width and height, neck size and length, hair length, earring size and color, etc, to create unique faces with a distinct style. It was interesting to see faces that were made that I typically would not have made, but still worked visually.

Nadia Susanto – Project 02 – Variable Face

sketch

/*  Nadia Susanto
    Section B
    nsusanto@andrew.cmu.edu
    Project - 02 - Variable Face */

var mouthW = 70
var mouthH = 70
var bodyW = 205
var bodyY = 205
var greenColor = 104
var blueColor = 149
var armXL = 190
var armXR = 430
var armYL = 210
var eyeBW = 25 //black eye part width
var eyeBH = 60
var eyeWW = 20 //white eye part width
var eyeWH = 40

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

function draw() {
    background(100, 105, 200);
    fill(235, greenColor, blueColor);
    //body
    ellipse(310, 185, bodyW, bodyY);
    //arms
    ellipse(armXL, armYL, 50, 45);
    ellipse(armXR, armYL, 50, 45);
    //cheeks
    fill(235, 104, 149);
    ellipse(250, 175, 25, 15);
    ellipse(370, 175, 25, 15);
    //mouth
    fill(190, 3, 89);
    circle(310, 225, mouthW, mouthH);
    //legs
    fill(221, 3, 89);
    ellipse(235, 295, 40, 70);
    ellipse(385, 295, 40, 70);
    //eyes
    fill("black");
    ellipse(280, 130, eyeBW, eyeBH);
    ellipse(345, 130, eyeBW, eyeBH);
    fill("white")
    ellipse(345, 120, eyeWW, eyeWH);
    ellipse(280, 120, eyeWW, eyeWH);


}

function mousePressed() {
    bodyW = random(200, 270);
    bodyY = random(205, 230);
    greenColor = random(50, 255);
    blueColor = random(0, 255);
    armXL = random(190, 210);
    armXR = random(370, 430);
    armYL = random(140, 210);
    mouthW = random(0, 100);
    mouthH = random(0, 100);

}

This project was definitely a lot of fun to do as my inspiration to do Kirby came from Super Smash Bros. I used adobe illustrator to first sketch out the initial image of what I wanted to do. I animated Kirby to change colors, change how big his suction is, change his body size, and change his arm placements to make it look like he is dancing.

Bo Yang-Project-02-Variable Face

sketch

/*
    Bo Yang
    Section A
    byang2@andrew.cmu.edu
    Project-02-Variable-Face
*/

    var eyeSize = 25;
    var faceWidth = 120;
    var faceHeight = 180;
    var mouth = 55;
    let color = "#86592d";
    let colors = ["#33cccc", "#ccccff", "#cc6600", "##993333"];


function setup() {
    createCanvas(640, 480);
}
 
function draw() {
    var eyeL = width / 2 - faceWidth * 0.25;
    var eyeR = width / 2 + faceWidth * 0.25;
    background(color);
 

    //face
    noStroke();
    fill("#006622");
    ellipse(width / 2, height / 2, faceWidth, faceHeight);
    ellipse(width / 2, height * 0.6, faceWidth * 1.5, faceHeight);

    //black eyes
    fill("black");
    ellipse(eyeL, height / 3, eyeSize / 3, eyeSize / 3);
    ellipse(eyeR,height / 3, eyeSize / 3, eyeSize /3);

    //eyes
    ellipse(eyeL, height / 3, eyeSize, eyeSize);
    ellipse(eyeR, height / 3, eyeSize, eyeSize);

    //pupil
    fill(255);
    ellipse(eyeL, height / 3, eyeSize / 2, eyeSize / 2);
    ellipse(eyeR, height / 3, eyeSize / 2, eyeSize / 2);

    //cheeks
    fill("#ff99bb");
    ellipse(eyeL - 8, (height / 3) + 40, eyeSize * 1.2, eyeSize * 1.2);
    ellipse(eyeR + 8, (height / 3) + 40, eyeSize * 1.2, eyeSize * 1.2);

    //mouth
    fill("#ff4d4d"); 
    arc(width / 2, height * 0.6, mouth, mouth, TWO_PI, PI);

    
}
 
function mousePressed() {
    
    faceWidth = random(30, 120);
    faceHeight = random(100, 200);
    eyeSize = random(15, 35);
    mouth = random(25, 60);
    color = random(colors);
    eyeL = random(width / 2, width / 2 - faceWidth * 0.25);
}

In this program, I draw a frog in the different background color. The frog’s body shape and eyes size will change when you click it. Before I draw it, I just noticed the face shape is more like a frog’s body shape. It use variables on the face, eyes, mouth and background.

Paul Greenway – Project – 02

sketch

// Simple beginning template for variable face.
var eyeSize = 20;
var eyeLocation = -70;
var noseSize = 40;
var mouth = 60;
var shirtColor = 10;
var hairColor = 10;
 
function setup() {
    createCanvas(480, 640);
}
 
function draw() {
   
    background(255);
  
     //hair
     fill(hairColor);
     arc(240, 300, 350, 350, PI, TWO_PI);
  
     //hair
     fill(hairColor);
     arc(230, 240, 340, 290, PI, 180 + HALF_PI, OPEN);
  
  
  translate(250, 300);
  fill(200); 
  
  //body
  noStroke();
  fill(shirtColor,100,30);
  rect(-100,150,200,300);
  arc(0, 150, 200, 100, PI, TWO_PI,PIE);


  
  //face
  beginShape();
  fill(200);
  curveVertex(-113,-120);
  curveVertex(-3,-150);
  curveVertex(83,-98);
  curveVertex(80,-6);
  curveVertex(95,101);
  curveVertex(3,130);
  curveVertex(-106,88);
  curveVertex(-110,-6);
  curveVertex(-113,-120);
  curveVertex(-3,-150);
  curveVertex(83,-98); 

endShape();
  
  //eyes
  fill(255);
  circle(50,eyeLocation,eyeSize);
  circle(eyeLocation,eyeLocation,eyeSize);
  
  
  //nose
  fill(180);
  ellipse(0,0,30,noseSize);
  
  //mouth
  fill(80);
  arc(-5, 60, 120, mouth, 0, PI, PIE);
  
  
}
 
function mousePressed() {
    // when the user clicks, these variables are reassigned
    // to random values within specified ranges. For example,
    // 'faceWidth' gets a random value between 75 and 150.

    eyeSize = random(10, 30);
    eyeLocation = random(-70, -40);
    noseSize = random(30, 70);
    mouth = random(30, 120);
    shirtColor = random(10,255);
    hairColor = random(10,100);
}

Variable Face

For this project I wanted to create a simple, cartoonish face that could look different as the dimensions of the facial features shift. The elements of the face that I used variables on are the mouth, nose, eyes, as well as shirt and hair colors.

Caroline Song – Project 02 – Variable Face

sketch

/*  Caroline Song
    Section E
    chsong@andrew.cmu.edu
    Assignment-02 */


var eyeSize = 25
var faceWidth = 50
var faceHeight = 50
var pupilSize = 20
var noseSize = 50
var mouth = 30
var bodyHeight = 250
var bodyWidth = 250

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

function draw(){
    background(134, 227, 219);

    //face shape
    noStroke(0); 
    fill(254, 217, 255);
    ellipse(width/2, height/2, faceWidth*4, faceHeight*5);

    //eyes
    fill(250);
    var eyeLX = width/2 - faceWidth*0.75;
    var eyeRX = width/2 + faceWidth*0.75;
    ellipse(eyeLX, height/2, eyeSize*3, eyeSize*3);
    ellipse(eyeRX, height/2, eyeSize*3, eyeSize*3);

    //pupils
    fill(0);
    var pupilLX = width/2 - faceWidth*0.75;
    var pupilRX = width/2 + faceWidth*0.75;
    ellipse(pupilLX, height/2, pupilSize, pupilSize);
    ellipse(pupilRX, height/2, pupilSize, pupilSize);

    //nose
    fill(214, 0, 0);
    ellipse(width/2, height/2 + faceHeight*0.65, noseSize, noseSize);

    //mouth
    fill(245, 135, 170);
    arc(width/2, height/2 + faceHeight*1.5, mouth*2, mouth, 0, PI);

    //body
    fill(255, 243, 168);
    var faceH = faceHeight*5
    ellipse(width/2, height/2 + faceH/2 + bodyHeight/2, bodyWidth, bodyHeight);
}

    function mousePressed() {
    eyeSize = random(25, 50);
    faceWidth = random(50, 75);
    faceHeight = random(50, 75);
    mouth = random(60, 85);
    bodyHeight = random(250, 400);
    bodyWidth = random(250, 400);
}

This project was interesting in terms of using variables and math to find the coordinates to my shapes, as opposed to using Illustrator and/or Photoshop to do it for me. At first, I found this project to be challenging, but as I kept adding more objects to the face, I started to understand and familiarize myself with the process of creating this variable face.

Monica Chang – Project-02

sketch


//Monica Chang
//Section D
//mjchang@andrew.cmu.edu
//Project-02
var eyeSize = 40;
var faceWidth = 200;
var faceHeight = 250;
var wow = 50;
var pupil = 30;
var hairY = 100;
var body = 40
var colorChange = 0;


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

function draw() {
    noStroke(0)
    background("tan");
  
  //body
    fill(141- colorChange,180- colorChange,180- colorChange);
   	quad(body,height,width/4.5,height*.72,width-170,height*.72,width-body,height);
  
  //face
    fill(251,197,177);
    ellipse(width / 2, height / 2, faceWidth,  faceHeight);
  
   //eyes
    var eyeLX = width / 2 - faceWidth * 0.25;
    var eyeRX = width / 2 + faceWidth * 0.25;
    fill("peach");
    ellipse(eyeLX, height / 2.15, eyeSize, eyeSize);
    ellipse(eyeRX, height / 2.15, eyeSize, eyeSize);
  
  //mouth  
    fill("red");
    arc(width / 2, height / 2, wow, wow, TWO_PI, PI); 
  
  //pupil
    fill("blue");
    ellipse(eyeLX, height / 2.15, pupil, pupil);
    ellipse(eyeRX, height / 2.15, pupil, pupil);
  

      
  //hair
    fill("black");
    strokeWeight(3);
    stroke (254);
    line( width / 2, height/ 3.5 , width / 2 , hairY );
    line( (width / 2)/1.1, height/ 3.5 , (width / 2)/1.1 , hairY + 10 );
    line( (width / 2)*1.1, height/ 3.5 , (width / 2)*1.1 , hairY + 10 ); 
  

}

function mousePressed() {
    // when the user clicks, these variables are reassigned
    // to random values within specified ranges. For example,
    // 'faceWidth' gets a random value between 75 and 150.
    faceWidth = random(200, 350);
    faceHeight = random(200, 250);
    eyeSize = random(40, 60);
    wow = random(10,50);
    pupil = random(10,30);
    hairY = random(100,180);
    colorChange = random (0,180);
}

This was a very entertaining project to do, I noticed that variables do make it easier to organize the values in such a way that I would not get confused. A whole field of numbers would, indeed, give me a headache so it was interesting to play around with variables and get used to how they can simplify code.

Chelsea Fan-Project-02

VariableFaces

/* Chelsea Fan
Section 1B
chelseaf@andrew.cmu.edu
Project-02
*/

var eyeSize = 20;
var faceWidth = 100;
var faceHeight = 150;
var earWidth = 20;
var earHeight = 100;
var bodyWidth = 100;

 
function setup() {
    createCanvas(640, 480);
    noStroke(0);
}
 
function draw() {
    background(205, 92, 92);
    // Head
    fill(250, 250, 250);
    ellipse(width / 2, height / 2, faceWidth,  faceHeight);
    //body
    fill(250, 250 , 250);
    var bodyHeight = 200;
    ellipse(width/2, height/2+150, bodyWidth, bodyHeight);
    //Ear
    ellipse(width/2 + 25, height/2-100, earWidth, earHeight);
    ellipse(width/2 - 25, height/2-100, earWidth, earHeight);
    // Eyes
    fill(173, 216, 230);
    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);
    //nose
    fill(255, 182, 193);
    triangle(310, 250, 330, 250, 320, 260);
}
 
function mousePressed() {
    // when mouse is pressed, variability occurs in eyesize, earsize, and headsize
    faceWidth = random(75, 150);
    faceHeight = random(100, 200);
    eyeSize = random(10, 30);
    earHeight = random(100, 200);
    bodyWidth = random(100, 300);

    if (faceWidth>=120||faceHeight>=170) {
    	eyeSize = random(20, 30);
    }  else {
    	eyeSize = random(10, 20);
    }
    if (faceWidth>=120||faceHeight>=170) {
    	earHeight = random(150, 250);
    }  else {
    	earHeight = random(100, 175);
    }

}

I spent quite a bit of time deciding what character to draw and I finally decided on a bunny. I enjoyed playing around with the random sizes for the bunny’s ears, eyes, and head shape.

Emma Nicklas-Morris Project-02 (Variable Face)

Emma’s Variable Faces

/* 
Emma Nicklas-Morris
Section B
enicklas@andrew.cmu.edu
Variable Faces
*/

var faceShapeX = 280;
var faceShapeY = 330;
var hairLen = 300;
var mouthW = 120;
var mouthH = 80;
var noseX1 = 215;
var noseY1 = 255;
var noseX2 = 240;
var noseY2 = 205;
var noseX3 = 265;
var noseY3 = 255;
let colors = ['blue', 'black', 'green', 'brown', 'grey'];
let color = 'black';
var bodyX = 200;
var bodyY = 400;
let bodColor = "red";
let bodColors = ['orange', 'yellow', 'navy', 'purple', 'pink'];

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

function draw() {
    background("lightblue");

    // Body
	fill(bodColor);
	ellipse(width/2, height - 50, bodyX, bodyY);

	// Face shape
	strokeWeight(0);
	fill('#E0AC69');
	ellipse(width / 2, width / 2, faceShapeX, faceShapeY);
	var eyeLX = width / 2 - faceShapeX * 0.25;
    var eyeRX = width / 2 + faceShapeX * 0.25;

	// Mouth
	fill('#E77471');
	strokeWeight(1);
	arc(width / 2, height/2, mouthW, mouthH, 0, PI); 

	// Nose 
	fill('#C58917');
	strokeWeight(0);
	triangle(noseX1, noseY1, noseX2, noseY2, noseX3, noseY1); 

	// White of eyes
	strokeWeight(2);
	fill('white');
	ellipse(eyeLX, height/4, 50, 25);  
	ellipse(eyeRX, height/4, 50, 25);

	// Pupils
	fill(color);
	ellipse(eyeLX, height/4, 20, 20);  
	ellipse(eyeRX, height/4, 20, 20);

	// Hair
	strokeWeight(0);
	arc(300, 155, 250, 230, PI + QUARTER_PI, TWO_PI + QUARTER_PI); 
	arc(260, 200, 340, 290, PI, PI + HALF_PI, OPEN);
	rect(360, 180, 65, hairLen);
	rect(80, 140, 45, hairLen + 40);

}

function mousePressed() {
	faceShapeX = random(230, 300);
	faceShapeY = random(320, 370);
	hairLen = random(100, 500);
	mouthW = random(10, 100);
	mouthH = random(10, 50);
	noseX1 = random(210, 220);
    noseY1 = random(250,260);
    noseX2 = random(235, 245);
    noseY2 = random(200, 210);
    noseX3 = random(260, 270);
    color = random(colors);
    bodColor = random(bodColors);
    bodyX = random(200, 300);
}

My process was to start with a hard coded face and then define variables and change them slightly. I think my final product is pretty good for someone who struggles with making illustrations AND faces. I struggled with trying to figure out how to change the hair more drastically as the facial shape changes than just changing the hair length.

Taisei Manheim – Project – 02 – Variable – Face


sketch

When coding this project, at first I had difficulty controlling the different variables in order to make them work in the way that I wanted them to, such as the color of the face and body.  However, once I got the hang of it I was able to have multiple elements of the face changing at the same time without the face becoming too distorted.

//Taisei Manheim
//Section C
//tmanheim@andrew.cmu.edu
//Assignment-02

var eyeSize = 10;
var faceWidth = 100;
var faceHeight = 200;
var mouthWidth = 10;
var mouthHeight = 10;
var bodyWidth = 300;
var bodyHeight = 200;
var color = 100;
var armWidth = 20;
var armHeight = 100;

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

function draw() {
    background('pink');

    fill(50, 155, 255);
    fill(50, 155 - color, 255 - color);

    var armLx = width / 2 - bodyWidth / 4 - armWidth / 2
    var armRx = width / 2 + bodyWidth / 4 - armWidth / 2
    var armLy = height / 2 + faceHeight / 2 - armHeight + 40
    var armRy = height / 2 + faceHeight / 2 - armHeight + 40
    rect(armLx, armLy, armWidth, armHeight);
    rect(armRx, armRy, armWidth, armHeight);
    //arms

    ellipse(armLx + armWidth / 2, armLy, 40, 60);
    ellipse(armRx + armWidth / 2, armRy, 40, 60);
    //hands

    var bodyPos = height / 2 + faceHeight / 2 + bodyHeight / 2 - 10
    ellipse(width / 2, bodyPos, bodyWidth, bodyHeight);
    //body

    ellipse(width / 2, height / 2, faceWidth, faceHeight);
    //face

    fill('white')
    var eyeLX = width / 2 - faceWidth * 0.25;
    var eyeRX = width / 2 + faceWidth * 0.25;
    arc(eyeLX, height / 2, 2.5 * eyeSize, eyeSize, 0, PI);
    arc(eyeLX, height / 2 + 2, 2.5 * eyeSize, eyeSize, PI, PI + PI, OPEN);
    arc(eyeRX, height / 2, 2.5 * eyeSize, eyeSize, 0, PI);
    arc(eyeRX, height / 2 + 2, 2.5 * eyeSize, eyeSize, PI, PI + PI, OPEN);
    //eyes

    fill('black');
    ellipse(eyeLX, height / 2 + 1, eyeSize - 2, eyeSize - 2);
    ellipse(eyeRX, height / 2 + 1, eyeSize - 2, eyeSize - 2);
    //pupils

    fill('black');
    rect(eyeLX - 15, height / 2 - faceHeight / 4, 30, 8);
    rect(eyeRX - 15, height / 2 - faceHeight / 4, 30, 8);
    //eyebrows

    fill(255, 0, 0);
    ellipse(width / 2, height / 2 + faceHeight / 4, mouthWidth, mouthHeight);
    //mouth

    fill('orange');
    rect(width / 2 - 60, height / 2 - 10 - faceHeight / 2, 120, 30);
    rect(width / 2 - 25, height / 2 - 110 - faceHeight / 2, 50, 100);
    //top hat
}

function mousePressed() {
    faceWidth = random(100, 150);
    faceHeight = random(100, 200);
    eyeSize = random(10, 20);
    mouthWidth = random(5, 30);
    mouthHeight = random(5, 30);
    bodyWidth = random(300, 500);
    bodyHeight = random(200, 400);
    color = random(0,155);  
    armWidth = random(20, 30);
    armHeight = random(80, 120);
}

Sewon Park – PO-2

sketch

// Sewon Park
// sewonp
// Section B

var eyeSize = 8;
var faceWidth = 220;
var faceHeight = 230;
var bodyc = 192;
var earc = 192;
var umbrellac = 150;


 
function setup() {
    createCanvas(600, 480);
}
 
function draw() {
    background(0);
    fill(bodyc,200,200)
    ellipse(width / 2, height / 2, faceWidth,faceHeight) // body (Gray)
    var eyeLX = width / 2 - faceWidth * 0.25;
    
    fill(255,255,255)
    var eyeRX = width / 2 + faceWidth * 0.25; 
    ellipse(eyeLX,height/2.8,eyeSize,eyeSize); // left eye
    ellipse(eyeRX,height/2.8,eyeSize,eyeSize); // right eye
    
    fill(0,0,0)
    ellipse(eyeLX,height/2.8,eyeSize/2,eyeSize/2); // left pupil
    ellipse(eyeRX,height/2.8,eyeSize/2,eyeSize/2); // right pupil
    
    fill(0,0,0)
    ellipse(width/2,height/2.6,eyeSize+1,eyeSize-3) //nose
    line(width/2,height/2.6,width/1.8,height/2.65)
    line(width/2,height/2.6,width/1.8,height/2.55)
    line(width/2,height/2.6,width/2.2,height/2.65)
    line(width/2,height/2.6,width/2.2,height/2.55) //whiskers

    fill(umbrellac,100,50)
    triangle(width/2,0,width/2.3,30,width/1.7,30)
    rect(200,30,10,140)
    arc(width/2,30,200,40,PI,0) // umbrella
    
    fill(255,250,250)
    ellipse(width/2,height/1.65,faceWidth/1.3,faceHeight/1.6) // body (White)

    fill(180,180,180)
    arc(width/2,height/2+5,eyeSize,eyeSize,0,PI) 
    arc(width/2.2,height/2+5,eyeSize,eyeSize,0,PI)
    arc(width/1.85,height/2+5,eyeSize,eyeSize,0,PI) //stomach patterns

    fill(earc,earc,255)
    triangle(width/2.5,height/3.4,width/2.4,height/6,width/2.3,height/3.4) //left ear
    triangle(width/1.8,height/3.4,width/1.7,height/6,width/1.68,height/3.4) //right ear

}
 
function mousePressed() {
    // when the user clicks, these variables are reassigned
    // to random values within specified ranges. For example,
    // 'faceWidth' gets a random value between 75 and 150.
    faceWidth = random(200, 240); //face width changing
    faceHeight = random(230, 270); //face height changing
    eyeSize = random(5, 15); // eye size changing
    bodyc = random(100,300) //body color changing
    earc = random(100,300) //ear color changing
    umbrellac = random(0,150) // umbrella color changing 
    }

For this project, I wanted to experiment with my spirit animal Totoro. I wanted its body and umbrella to stand out, so I made the colors change with every click. Because Totoro has a leaf umbrella, I set the colors to change around green and brown.