Ammar Hassonjee – Project 02 – Variable Face

Variable Face – Baby

/* Ammar Hassonjee
   Section C
   ahassonj@andrew.cmu.edu
   Project 02 - Generative Face
   */


//Declaring different variables of the face that will change when mouse is pressed

var earSize = 70;
var headWidth = 300;
var headHeight = 300;
var mouth1 = headHeight;
var mouth2 = 0
var mouth3 = 3.14;
var hairLength = 40;
var hairColor = 0;
var shirtColor = 250;
var eyeS = 50;
var tear = 'tan';

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

function draw() {
    background(200);
  // Creating the body
    noStroke();
    fill(shirtColor);
    arc(width / 2, height, 500, 450, PI, 0);

  // Strand of hair
    noStroke();
    fill(hairColor);
    triangle(width / 2 + 20, headHeight * .35, width / 2, hairLength, width / 2 - 20, headHeight * .35);

  // Drawing the head
    fill('tan');
    ellipse(width / 2, 255, headWidth, headHeight);

  // Drawing the ears
    ellipse(width - (headWidth + 1.1 * earSize), headHeight * .85, earSize, earSize * 1.4); // left

    ellipse(headWidth + 1.1 * earSize, headHeight * .85, earSize, earSize * 1.4); // right

    // Drawing a tear
    fill(tear);
    arc(width / 2 - headWidth / 6 - 10, headHeight * 2 / 3 + eyeS / 2, eyeS * .4, eyeS * .6, 1.04, 2.09);

  // Drawing the eyes
    fill('black');
    ellipse(width / 2 + headWidth / 6, headHeight * 2 / 3, eyeS, eyeS);
    fill(230);
    ellipse(width / 2 + headWidth / 6 - 10, headHeight * .63, eyeS * .2, eyeS * .2); // eye bubble

    fill('black');
    ellipse(width / 2 - headWidth / 6, headHeight * 2 / 3, eyeS, eyeS);
    fill(230);
    ellipse(width / 2 - headWidth / 6 - 10, headHeight * .63, eyeS * .2, eyeS * .2); // eye bubble

  // Drawing the nose
    fill(180, 160, 130);
    triangle(width / 2, 255, width / 2 + headWidth / 10, 275, width / 2 - headWidth / 10, 275);

  // Creating the mouth
    fill('grey');
    arc(width / 2, mouth1, 100, 50, mouth2, mouth3);


}

function mousePressed() {
    // when mouse is clicked, random values will generate, changing the facial features
    earSize = random(50, 100);
    hairLength = random(30, 200);
    hairColor = random(0, 100);
    headWidth = random(300, 350);
    headHeight = random(300, 350);
    shirtColor = random(210, 255);
    eyeS = random(30, 70);

    var x = round(random(0.5, 2.5));
    if (dist(mouseX, mouseY, width / 2, 275) < (headWidth / 10)) {
          mouth1 = headHeight * 1.1;
          mouth2 = 3.14;
          mouth3 = 0;
          tear = 'blue';
          
      }
    else {
          mouth1 = headHeight;
          mouth2 = 0;
          mouth3 = 3.14;
          tear = 'tan';
    }
}

My project was inspired by seeing how I apply the variables of face generation to the image of a baby. I also explored how making sure when the mouse was clicked in certain areas, it changed the variables of even more facial features.

Austin Garcia – Project 02 – Variable Face – 03


sketch

/*		Austin Garcia
		Section C
		aegarcia@andrew.cmu.edu
		Project - 02
*/
// Simple beginning template for variable face.
var eyeSize = 20;
var faceWidth = 60;
var faceHeight = 150;
var pupilSize = 5;
var randomColor = color(random(255),random(255),random(255));
//var eyebrowR = 225
//var eyebrowL = 115


function setup() {
    createCanvas(300, 300);
}

function draw() {
    background(180);
    fill(245, 245, 220)
    ellipse(width / 2, height / 2, faceWidth,  faceHeight);
    var eyeLX = width / 2 - faceWidth * 0.25;
    var eyeRX = width / 2 + faceWidth * 0.25;
    var pupilLX = width / 2 - faceWidth * .25;
    var pupilRX = width / 2 + faceWidth * .25;
    ellipse(eyeLX, height / 2, eyeSize, eyeSize);
    ellipse(eyeRX, height / 2, eyeSize, eyeSize);
//  eyebrows
  //  line (eyeLX + 10, height - 100, eyeLX - 5, eyebrowL)
    //line (eyeRX + 10, height - 100, eyeLX - 5, eyebrowR)
//  pupils
    var randomColor = color(random(255),random(255),random(255));
    fill(randomColor)
    if  (mouseY > 150)
    fill(0)
    ellipse(pupilLX, height / 2, pupilSize, pupilSize);
    ellipse(pupilRX, height / 2, pupilSize, pupilSize);



  }
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(50, 100);
    faceHeight = random(100, 200);
    eyeSize = random(10, 30);
    pupilSize = random(2, 8);
  //  eyebrowL = random(100 - 120)
  //  eyebrowR = random(210 - 230)



}

Ilona Altman- project 2- variable faces

sketch


var thetime = 1
var othetime = 1
var clr= 1


function setup() {
    createCanvas(200, 20);
    background(220);
    text("p5.js vers 0.9.0 test.", 10, 15);
}



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

function draw() {
    background(215,126,107);

    //variables

    var x = 1/5*width;
    var y = 1/8*height;

    //moon static 
    fill(130+clr,170+clr,170+clr);
    circle(2.5*x,y,100);

    //moon dynamic
    fill(215,126,107);
    circle(2*x+othetime,y,100);

    //face base
    fill(235,150,140);
    circle(2.5*x, 5*y, 300);
    
    //moon eyes static 1 green
    fill(100+clr,140+clr,100+clr);
    circle(1.75*x, 4.5*y, 50);

    //moon eyes dynamic 1
    fill(235,150,140);
    circle(1.5*x+thetime,4.5*y, 50);

    // moon eyes static 2 green
    fill(100+clr,140+clr,100+clr);
    circle(3.25*x, 4.5*y, 50);

    // moon eyes dynamic 2 
    fill(235,150,140);
    circle(3*x+thetime, 4.5*y, 50);

}

function mousePressed() {
    thetime=random(-20,60);
    clr= random(-50,150);
    othetime=random(-150,150)
}

I had trouble getting the image to load earlier for some reason! Here is my project

Zee Salman-Project-02-Various Faces


sketch

//Zee Salman
//SECTION E
//fawziyas@andrew.cmu.edu
//Project-02-Variable-Face

// Simple beginning template for variable face.

//color for backgroung and earrings
var color1 = 100;
var color2 = 10;
var color3 = 30;
var eyeSize = 20;

//starter face
var faceWidth = 280;
var faceHeight = 340;
var eyecolor1 = 150;
var eyecolor2= 200;
var eyecolor3= 20;
var faceColor1 = 168
var faceColor2 = 84
var faceColor3 = 29
var nose = 30

//skin color variation
var skin1 = [141, 85, 36];
var skin2 = [198, 134, 66];
var skin3 = [224, 172, 105];
var skin4 = [241, 194, 125];
var skin5 = [255, 219, 172];
var skin6 = [255, 237, 209];
let skinPicks = [skin1, skin2, skin3, skin4,skin5, skin6]

//nose color 

var noseColor1 = [92, 44, 22];
var noseColor2 = [173, 122, 83];
var noseColor3 = [196, 152, 84];
let noseColorPicks = [noseColor1, noseColor2, noseColor3]
var skinColor = skin3
var noseColor = noseColor1

//neck shadow color
var neckShadow1 = [87, 47, 21];
var neckShadow2 = [92, 44, 22];
var neckShadowPicks = [neckShadow1, neckShadow2]
var neckShadowColor = neckShadow1

//smile variation
var smile1 = faceWidth/2.1 
var smile2 = faceWidth/2.8 
var smile3 = faceWidth/3.2 
var smilePick = smile3
let smiles = [smile1, smile2, smile3]
var smileColor1 = [140,25,69];
var smileColor2 = [201,125,154];
let smileColorPicks = [smileColor1, smileColor2]
var smileColor = smileColor1
var eyebrowsize = 7


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

    background(color1, color2, color3)
   
//Hair
    
    fill('black')
    ellipse(width / 2.6, height / 2, faceWidth, faceHeight / 1);
    ellipse(width / 1.6, height / 2, faceWidth, faceHeight / 1);


//Neck
    fill(skinColor)
    noStroke()
    rect(width / 2.6, height / 2, faceWidth / 2, faceHeight / 1.6);

//Neck Shadow
    
    fill(neckShadowColor)
    ellipse(width / 2, height * .65, faceWidth / 1.7, faceHeight / 1.6);
//head
    fill(skinColor)
    strokeWeight(2)
    ellipse(width / 2, height / 2, faceWidth,  faceHeight);
 
//Ball on top of the Head   
    fill('black')
    arc(width/2, height/4.5, faceWidth / 2,faceHeight/4,180, PI, OPEN);
    
//eyes
    var eyeLX = width / 2 - faceWidth * 0.25;
    var eyeRX = width / 2 + faceWidth * 0.25;
    fill('white')

    var earLX = width / 2 - faceWidth * 0.5;
    var earRX = width / 2 + faceWidth * 0.5;

//Iris
    ellipse(eyeLX, height / 2, eyeSize * 2, eyeSize);
    ellipse(eyeRX, height / 2, eyeSize * 2, eyeSize);

    fill(eyecolor1,eyecolor2,eyecolor3)
    ellipse(eyeLX, height / 2, eyeSize, eyeSize);
    ellipse(eyeRX, height / 2, eyeSize, eyeSize);

//Pupil
    fill('black')
    ellipse(eyeLX, height / 2, eyeSize * .35, eyeSize * .35);
    ellipse(eyeRX, height / 2, eyeSize * .35, eyeSize * .35);


//EYEBROWS

    stroke('black');
    strokeWeight(eyebrowsize);
    noFill();
    beginShape();
    curveVertex(190, 350);
    curveVertex(200,265);
    curveVertex(260, 266);
    curveVertex(210, 296);
    endShape();
    
    stroke('black');
    strokeWeight(eyebrowsize);
    noFill();
    beginShape();
    curveVertex(330, 350);
    curveVertex(340,265);
    curveVertex(400, 266);
    curveVertex(350, 296);
    endShape();


 //Ears
    stroke(color2, color3, color1)
    noFill()
    ellipse(earLX, height / 1.7, eyeSize * .5, eyeSize * 1.3);
    ellipse(earRX, height / 1.7, eyeSize * .5, eyeSize * 1.3);
    
    noStroke()   
    fill(skinColor)
    ellipse(earLX, height / 1.9, eyeSize * .75, eyeSize * .9);
    ellipse(earRX, height / 1.9, eyeSize * .75, eyeSize * .9);


//nose
    noStroke()
    fill(noseColor)
    ellipse(295,340,nose,19)
    
//mouth

    fill(smileColor)
    arc(width/2, height/1.6, smilePick,faceHeight/5,0, PI, CHORD);
    
}
 
function mousePressed() {

	faceWidth = random(260, 300);
	faceHeight = random(320, 400);
	eyeSize = random(20, 50);
	eyecolor1 = random(100,200);
    eyecolor2 = random(90,150);
    eyecolor3 = random(10,50);
    nose= random(10,60)
    skinColor = random(skinPicks);
    neckShadowColor = random(neckShadowPicks);

    noseColor = random(noseColorPicks);
    smilePick = random(smiles);
    smileColor = random(smileColorPicks);
    
//background/earring color
    color1 = random(1,200);
    color2 = random(1,150);
    color3 = random(1, 200);
    eyebrowsize = random(3,8);
   
    
}

In doing this project, I wanted to make the faces look sort of like mt self portrait but with more details. It took a while to get what I wanted but Im really happy with what came out. I also got really comfortable with using lists and Im really excited to advance it even more.

Rachel Shin – Project 02 – Face Variables

I based this project off of my favorite Disney character – Baymax. I thought it’d be both interesting and fun to take on a quirky spin as I code to modify my favorite character.

Rachel Shin – Baymax

// Rachel Shin
// Section B
// Project 2 - Face Variable


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

   
}



var backgroundR = 200;
var backgroundG = 150;
var backgroundB = 100;
var bodyW = 300;
var bodyH = 450;
var faceW = 500;
var faceH = 400;
var eyeS = 25;
var blushR = 209;
var blushG = 117;
var blushB = 135;



function draw() {
	//background
    background(backgroundR, backgroundG, backgroundB);
    text ("Hello, I am Baymax, your personal healthcare companion.", 130, 80, 400, 20);

    //body
    fill("white");
    ellipse(200, 550, bodyW, bodyH);

    //face
    noStroke();
    fill("white");
    ellipse(200, 310, faceW, faceH);

    noStroke();
    fill(blushR, blushG, blushB);
    ellipse(140, 340, 50, 10);

    noStroke();
    fill(blushR, blushG, blushB);
    ellipse (260, 340, 50, 10);



    //eyes
    fill("black");
    rect(150, 310, 100, 5);

    fill("black");
    ellipse (140, 310, eyeS, eyeS);

    fill("black");
    ellipse (260, 310, eyeS, eyeS);
	
	//blush
	noStroke();
	fill(209, 117, 135);

}

function mousePressed () {
	backgroundR = random (0, 200);
	backgroundG = random (0, 200);
	bodyW = random (250, 300);
	bodyH = random (400, 550);
	backgroundB = random (0, 200);
	faceW = random (200, 400);
	faceH = random (200, 300);
	eyeS = random (25, 50);
	blushR = random (0,209);
	blushB = random (0, 117);
	blushB = random (0,135);
}

Julia Nishizaki – Project 02 – Variable Face

For this project, I decided to create different monsters/creatures, and focussed on conveying both their physical characteristics as well as their emotions or personalities. When approaching this project, I struggled with deciding on a concept, and kept it fairly simple, changing more of the facial aspects of the creatures, rather than adding arms or tails.

sketch

//Julia Nishizaki
//Section B
//jnishiza@andrew.cmu.edu
//Section B, Project 02 Variable Face

// starting variables
var eyeSize = 20;
var faceWidth = 150;
var faceHeight = 200;
var CornerT = 30;
var CornerB = 15;
var toothExistence1 = 0;
var toothExistence2 = 0;
var faceY = 340;
var bodyWidth = 250;
var mouthWidth = 100;
var mouthHeight = 50;
var eyebrowY = 320;
var r = 243;
var g = 179;
var b = 174;
var pupilDX = 6;
var pupilDY = 5;
var w = 5
 
function setup() {
    createCanvas(480, 640);
}
 
function draw() {
    background('white');
    noStroke();
    
    //background color
    fill(r, g, b, 55);
    rect(width / 2, height / 2, width, height);

    //body
    fill('white');
    rectMode(CORNERS);
    var faceX = width / 2;
    rect(faceX - bodyWidth / 2, faceY + faceHeight / 2, faceX + bodyWidth / 2, height, CornerT, CornerT, 0, 0);
    //stomach   
    fill(r, g, b, 100);
    rect(faceX - bodyWidth * 0.25, faceY + faceHeight * 0.75, faceX + bodyWidth * 0.25, height, 50, 50, 0, 0);
    
    //face
    fill('white');
    rectMode(CENTER);
    rect(faceX, faceY, faceWidth, faceHeight + 1, CornerT, CornerT, CornerB, CornerB);
    
    //mouth
    noStroke();
    fill(r, g, b);
    var mouthY = faceY + faceHeight * 0.25
    rect(faceX, mouthY, mouthWidth, mouthHeight, 50, 50, 50, 50);

    //tooth and teeth
    fill('white');
    triangle(faceX * toothExistence1, (mouthY - mouthHeight / 2 - 1) * toothExistence1, (faceX + mouthWidth * 0.5) * toothExistence1, (mouthY - mouthHeight / 2 - 1) * toothExistence1, (faceX + mouthWidth * 0.25) * toothExistence1, mouthY * toothExistence1);
    triangle(faceX * toothExistence2, (mouthY - mouthHeight / 2 - 1) * toothExistence2, (faceX - mouthWidth * 0.5) * toothExistence2, (mouthY - mouthHeight / 2 - 1) * toothExistence2, (faceX - mouthWidth * 0.25) * toothExistence2, mouthY * toothExistence2);

    //eyes
    var eyeLX = faceX - faceWidth * 0.25;
    var eyeRX = faceX + faceWidth * 0.25;
    stroke('black');
    noFill();
    strokeWeight(5);
    ellipse(eyeLX, faceY, eyeSize, eyeSize);
    ellipse(eyeRX, faceY, eyeSize, eyeSize);
    //eye pupils
    noStroke();
    fill('black');
    var pupilLX = eyeLX + eyeSize * 0.125;
    var pupilRX = eyeRX + eyeSize * 0.125;
    var pupilY = faceY + eyeSize * 0.125;
    ellipse(pupilLX - pupilDX, pupilY - pupilDY, eyeSize * 0.625, eyeSize * 0.625);
    ellipse(pupilRX - pupilDX, pupilY - pupilDY, eyeSize * 0.625, eyeSize * 0.625);
   
    //eyebrows
    stroke('black');
    strokeWeight(w);
    line(eyeLX - eyeSize / 2, faceY - eyeSize, eyeLX + eyeSize / 2, eyebrowY);
    line(eyeRX + eyeSize / 2, faceY - eyeSize, eyeRX - eyeSize / 2, eyebrowY);
}

function mousePressed() {
    //color of background and mouth
    r = random(255);
    g = random(255);
    b = random(255);

    //face and body proportions
    faceY = random(200, 350);
    faceWidth = random(100, 250);
    faceHeight = random(150, 300);
    bodyWidth = random(50, 300);
    //roundness of face and body
    CornerT = random(10, 50);
    CornerB = random(10, 50);

    //size of eyes, angle of eyebrows, and location of pupils
    eyeSize = random(15, 40);
    let existence1 = ['0', '1'];
    eyebrowY = random(faceY - eyeSize * 0.5, faceY - eyeSize * 1.5);
    pupilDX = random(eyeSize * 0.25);
    pupilDY = random(eyeSize * 0.25);

    //stroke weight for eyebrows
    w = random(1, 15);

    //proportions of mouth and how many teeth
    mouthWidth = random(15, 100);
    mouthHeight = random(15, 50);
    toothExistence1 = random(existence1);
    let existence2 = ['0', '1'];
    toothExistence2 = random(existence2);
}

Sydney Salamy: Project-02-Variable-Face

I wanted my project to react and change as the mouse of the viewer moved, so I played around with if statements, which was an interesting challenge. I wanted my project to have a cute aspect to it. Originally, there was supposed to be a fruit with a face reacting, but then it turned into a baby who didn’t want others touching its candy.

sketchsydney

//Dont Touch The Lolipop!

var pi = 3.14159;
var mainX = 320;
var headY = 220;
var bodyY = 360;
var iEyeBrowY = 212;

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

function draw() {
    background(163, 210, 267);//baby blue
    noStroke();
    //baby base
    fill(233, 185, 122);//darker tan
    ellipse(mainX,bodyY, 170,170);//baby body
    fill(237, 189, 126);//tan
    ellipse(mainX,headY, 150,150);//baby head
    //arcs
    fill(255);
    arc(mainX,bodyY, 172, 172, 0, pi, CHORD);//baby diaper
    fill(255, 163, 195);
    arc(mainX,headY, 152, 152, pi, 0, CHORD);//baby hat
    //limbs
    fill(229,181,118);//darker tan 2
    ellipse(440,307, 150,40);//right arm
    ellipse(200,307, 150,40);//left arm 
    ellipse(355,475, 45,145);//right leg
    ellipse(285,475, 45,145);//left leg
    //lolipop
    fill(245);
    rect(490,245, 6, 100);//stick
    frameRate(.7);
    fill(random(230),random(200),random(220));//candy color
    ellipse(493,220, 106,100);//candy part   
    //facial features
    frameRate(10);
    fill(0);
    ellipse(343,225, 8,8);//right eye
    ellipse(297,225, 8,8);//left eye
    strokeWeight(4);
    stroke(0);
    line(336,iEyeBrowY, 355,218);//right eyebrow
    line(285,218, 304,iEyeBrowY);//left eyebrow
    //movement
    if(mouseX > 365){
        iEyeBrowY = 218;//stern
        line(315,256, 325,256);//flat mouth
        fill(128, 17, 17);
        ellipse(343,225, 8,8);//right eye
        ellipse(297,225, 8,8);//left eye
    }
    if(mouseX > 440){
        iEyeBrowY = 223;//angry
        arc(mainX,256, 20, 20, pi, 0, CHORD);//sad mouth
        fill("red");
        ellipse(343,225, 8,8);//right eye
        ellipse(297,225, 8,8);//left eye
    }
    if(mouseX > 545){
        iEyeBrowY = 218;//stern
        line(315,256, 325,256);//flat mouth
        fill(128, 17, 17);
        ellipse(343,225, 8,8);//right eye
        ellipse(297,225, 8,8);//left eye
    }
    if(mouseX < 365){
        iEyeBrowY = 212;//happy
        arc(mainX,256, 20, 20, 0, pi, CHORD);//happy mouth
        fill(0);
        ellipse(343,225, 8,8);//right eye
        ellipse(297,225, 8,8);//left eye
    }
    if(mouseX > 621){
        iEyeBrowY = 212;//happy
        arc(mainX,256, 20, 20, 0, pi, CHORD);//happy mouth
        fill(0);
        ellipse(343,225, 8,8);//right eye
        ellipse(297,225, 8,8);//left eye
    }
}

Kimberlyn Cho- Project 02- Variable Face

I decided to draw a hotdog because of a sudden late night craving. After a few iterations of different hotdogs, I focused on varying the droopiness of the eyelids to portray a sleepy hotdog. 

variable

/* Kimberlyn Cho
Section C
ycho2@andrew.cmu.edu
Assignment-02 */

//background
var R = 179;
var G = 236;
var faceHeight = 700;
var droop = 180;
var mouthW = 60;
var mouthH = 10;

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

function draw() {
    //background
    background(R, G, 255);

    //face
    strokeWeight(5);
    fill(255, 121, 92);
    ellipse(320, 480, 350, faceHeight);

    //hands
    fill(255, 204, 102);
    ellipse(320 - 175, 225 + faceHeight * 0.4, 150, 200);
    ellipse(320 + 175, 225 + faceHeight * 0.4, 150, 200);

    //eyes
    strokeWeight(0);
    fill("white");
    var eyeLX = width / 2 - 350 * 0.15;
    var eyeRX = width / 2 + 350 * 0.15;
    var eyeLY = 480 - faceHeight * 0.3;
    ellipse(eyeLX, eyeLY, 40, 60);
    ellipse(eyeRX, eyeLY, 40, 60);
    fill("black");
    ellipse(eyeLX, eyeLY, 25, 50);
    ellipse(eyeRX, eyeLY, 25, 50);

    //eyelids
    strokeWeight(3);
    fill("green");
    arc(eyeLX, eyeLY, 45, 70, droop, 0, OPEN);
    arc(eyeRX, eyeLY, 45, 70, droop, 0, OPEN);

    //mouth
    strokeWeight(0);
    fill("yellow");
    ellipse(320, 480 - faceHeight * 0.15, mouthW * 3, mouthH * 6);
    fill("red");
    ellipse(320, 480 - faceHeight * 0.15, mouthW * 2, mouthH * 4);
    fill("white");
    ellipse(320, 480 - faceHeight * 0.15, mouthW, mouthH);


}

function mousePressed() {
    //background
    R = random(150, 200);
    G = random(200, 250);
    faceHeight = random(600, 780);
    droop = random(HALF_PI + QUARTER_PI, PI + QUARTER_PI);
    mouthW = random(50, 70);
    mouthH = random(5, 15);

}

 

Jasmine Lee – Project 02 – Variable Face

bear

//Jasmine Lee
//Section C
//jasmine4@andrew.cmu.edu
//Project-02 (Variable Faces)

var wind = 10;
var windv = 10;
var r = 210;
var g = 134;
var b = 50;
var bodyx = 250;
var bodyy= 300;
var underbelly = 60;
var earx = 100;
var eary = 100;
var headx = 220;
var heady = 220;
var eyesize = 5;
var browtilt = 10;

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

function draw() {
    background (189, 238, 255);

    //cloud-left
    noStroke();
    fill(255, 255, 255);
    ellipse(140 + wind, 230 + windv, 230, 60);
    ellipse(60 + wind, 210 + windv, 45, 40);
    ellipse(100 + wind, 210 + windv, 60, 80);
    ellipse(150 + wind, 210 + windv, 80, 95);
    ellipse(190 + wind, 210 + windv, 60, 65);
    ellipse(230 + wind, 210 + windv, 30, 20);
    ellipse(75 + wind, 247 + windv, 70, 30);
    ellipse(150 + wind, 253 + windv, 100, 32);
    ellipse(215 + wind, 245 + windv, 50, 23);

    //cloud-right
    noStroke();
    fill(255, 255, 255);
    ellipse(540 - wind, 230 - windv, 230, 60);
    ellipse(460 - wind, 210 - windv, 45, 40);
    ellipse(500 - wind, 210 - windv, 60, 80);
    ellipse(550 - wind, 210 - windv, 80, 95);
    ellipse(590 - wind, 210 - windv, 60, 65);
    ellipse(630 - wind, 210 - windv, 30, 20);
    ellipse(475 - wind, 247 - windv, 70, 30);
    ellipse(550 - wind, 253 - windv, 100, 32);
    ellipse(615 - wind, 245 - windv, 50, 23);

    //body
    noStroke();
    fill(r, g, b);
    ellipse(320, 470, bodyx, bodyy);

    //bodywhite
    noStroke();
    fill(255, 255, 255);
    ellipse(320, 470, bodyx - underbelly, bodyy - underbelly);

    //ears
    noStroke();
    fill(r, g, b);
    ellipse(220, 200, earx, eary);
    ellipse(420, 200, earx, eary);

    //earwhites
    noStroke();
    fill(255, 255, 255);
    ellipse(215, 215, earx / 2, eary / 2);
    ellipse(435, 215, earx / 2, eary / 2);

    //head
    noStroke();
    fill(r, g, b);
    ellipse(320, 270, headx, heady);

    //eyes
    noStroke();
    fill(0);
    ellipse(250, 280, 35 + eyesize, 35 - eyesize);
    ellipse(390, 280, 35 + eyesize, 35 - eyesize);
    
    //eyeshine
    noStroke();
    fill(255, 255, 255);
    ellipse(260, 270, 15, 15);
    ellipse(400, 270, 15, 15);
    ellipse(265, 280, 5, 5);
    ellipse(405, 280, 5, 5);

    //nose
    noStroke()
    fill(255, 209, 216);
    ellipse(320, 300, 30, 5);

    //mouth
    stroke(1);
    fill(0);
    line(310, 340, 330, 330);
    line(330, 340, 310, 330);

    //eyebrows
    stroke(1);
    fill(0);
    line(230, 245, 280, 245 + browtilt);
    line(410, 245, 360, 245 + browtilt);
}

function mousePressed() {
    wind = random(10, 100);
    windv = random(10, 100);
    r = random(210, 180);
    g = random(134, 150);
    b = random(33, 112);
    bodyx = random(250, 300);
    bodyy = random(330, 350);
    underbelly = random(80, 120);
    earx = random(120, 140);
    eary = random(100, 120);
    headx = random(235, 270);
    heady = random(220, 250);
    eyesize = random(1, 5);
    browtilt = random(-15, 15);
}

For this assignment, I had fun creating a teddy bear. I think they’re very cute as stuffed animals and wanted to recreate one whose expressions could change from angry to sad.