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);
}

Leave a Reply