Jaclyn’s Variable Face

jsaik

/* Jaclyn Saik 
Project-02 
Section E 
*/


//face and hair variables 
var eyeSize = 20;
var pupilSize = 10
var faceWidth = 150;
var faceHeight = 170;
var bunWidth = 100
var bunHeight = 100
var armLW = 160
var armRW = 480
var toungeL = 40
var toothL = 10
var eyebrowH = 155
var bluehair = 50
var redskin = 238




    

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

function draw() {
    background(140, 120, 170);
    noStroke();

    //colors
    s = color(redskin, 216, 193) //skin
    r = color(206, 20, 110)
    b = color(223, 140, bluehair)

    //body
    fill(s)
    //arms
    
    triangle(245, (height / 2) + 20, 240, 380, armLW, 600);
    triangle(235 + (width / 4), (height / 2) + 20, 235 + (width / 4), 380, armRW, 600);
    fill(r)
    rect(240, height / 2, width / 4, height*(2/3), 20)

    //hair
    fill(b)
    ellipse(width / 2, height / 3 + 5, faceWidth + 20, faceHeight + 40)
    ellipse(width / 2 - faceWidth * .6, height / 3 + 50, bunWidth, bunHeight)
    ellipse(width / 2 + faceWidth * .6, height / 3 + 50, bunWidth, bunHeight)


    //face
    fill(s)
    ellipse(width / 2, height / 3 + 25, faceWidth,  faceHeight);
    //eyes
    var eyeLX = width / 2 - faceWidth * 0.25;
    var eyeRX = width / 2 + faceWidth * 0.25;
    var pupilLX = width / 2 - faceWidth * 0.25;
    var pupilRX = width / 2 + faceWidth * 0.25;
    fill(255);
    ellipse(eyeLX, height / 3 + 15, eyeSize, eyeSize); 
    ellipse(eyeRX, height / 3 + 15, eyeSize, eyeSize);
    fill(0)
    //pupils
    ellipse(eyeLX, height / 3 + 15, pupilSize, pupilSize); 
    ellipse(eyeRX, height / 3 + 15, pupilSize, pupilSize);
    
    
    //tounge
    fill(237, 106, 169)
    ellipse(width / 2, height / 3 + 65, 30, toungeL)
    //teeth
    fill(255)
    rect(width / 2 - 5, height / 3 + 60, 15, toothL)
    //mouth
    fill(s)
    rect(width / 2 - 25, height / 3 + 50, 50, 10)

    //nose
    var noseWL = 300
    var noseWR = 340
    fill(247, 208, 95)
    triangle(width / 2, height / 3 + 10, noseWL, height / 3 + 50, noseWR, height / 3 + 50);

    //eyebrows
    noFill();
    strokeWeight(3)
    stroke(218, 130, 55)
    arc(eyeLX, eyebrowH, 40, 25, PI*1.2, 0, OPEN)
    arc(eyeRX, eyebrowH, 40, 25, PI, TWO_PI*.9, OPEN)


    

}

function mousePressed() {
    
    faceWidth = random(125, 150);
    eyeSize = random(20, 50);
    pupilSize = random(10, 15)
    bunHeight = random(60, 120);
    bunWidth = random(60, 120);
    armLW = random(120, 200);
    armRW = random(440, 520);
    toungeL = random(30, 90);
    toothL = random(10, 17)
    eyebrowH = random(160, 145)
    bluehair = random(20, 200)
    redskin = random(100, 255)


 
}

This was an interesting task, and definitely very fun to research. I especially liked looking into how artists like Moka create algoritm-generated faces, and how the randomization tools of computers really highlight the odd ways our brains look and recognize facial expressions. Instead of working in a sketchbook, my main method of “sketching” for this project was first creating the static elements of my figure, so originally the arms and torso, and then playing with different features layered on top of each other to see what type of expressions come out. I found it especially interesting how much power the pupils and eyebrows have over a person’s expression.

Project – 02 Min Lee

sketch

/* 
Min Lee
Section A
mslee@andrew.cmu.edu
Project-02
*/

//face
var faceWidth = 150
var faceHeight = 150

//use for nose and mouth color 
var faceColorR = 255 
var faceColorG = 216
var faceColorB = 209

//eyes
var eyeWidth = 25
var eyeHeight = 15
var eyeColor = 255

//eye positioning
var eyeX = 20
var eyeY = 15

//nose positioning
var noseY = 5
var noseHeight = 60

//mouth shape
var mouthWidth = 25
var mouthHeight = 15
var distance = 30

//font
var textPlacement = 0

//stars
var a = 50


function setup() {
    createCanvas(640, 480);
    background(141,189,193);
}


function draw() {
	background(141,189,193);
	noStroke();
	//face shape
	fill(faceColorR, faceColorG, faceColorB);
	ellipse(width/2 ,height/2 , faceWidth, faceHeight);
	rect(width/2 - faceWidth/2, height/2, faceWidth, height);
	//eyebrows
	fill(faceColorR/2, faceColorG/2, faceColorB/2);
	ellipse(width/2 - eyeX, height/2 - eyeY, eyeWidth, eyeHeight);
	ellipse(width/2 + eyeX, height/2 - eyeY, eyeWidth, eyeHeight);
	//eyes
	fill(0);
	ellipse(width/2 - eyeX, height/2 - eyeY + 20, 10, 8);
	ellipse(width/2 + eyeX, height/2 - eyeY + 20, 10, 8);
	//nose
	fill(faceColorR/4*3, faceColorG/4*3, faceColorB/4*3);
	ellipse(width/2 - 7.5, height/2 + noseY/3*2, 10, 10);
	ellipse(width/2 + 7.5, height/2 + noseY/3*2, 10, 10);
	arc(width/2, height/2 + noseY, 15, noseHeight, PI, TWO_PI);
	arc(width/2, height/2 + noseY - 1, 15, 10, 0, PI);
	//mouth
	fill(faceColorR/4*3, faceColorG/4*3, faceColorB/4*3);
	arc(width/2, height/2 + noseY + distance, mouthWidth, mouthHeight, 0, PI);
	fill(faceColorR/2, faceColorG/2, faceColorB/2);
	arc(width/2 - mouthWidth/4, height/2 + noseY + distance, mouthWidth/2 + 5, mouthHeight, PI, TWO_PI);
	arc(width/2 + mouthWidth/4, height/2 + noseY + distance, mouthWidth/2 + 5, mouthHeight, PI, TWO_PI);
	//ears
	fill(faceColorR, faceColorG, faceColorB);
	arc(width/2 - faceWidth/2 + 1, height/2 + noseY/3* 4 + 5, 30, 40, HALF_PI, PI + HALF_PI);
	arc(width/2 + faceWidth/2 - 1, height/2 + noseY/3* 4 + 5, 30, 40, PI + HALF_PI, HALF_PI);
	fill(faceColorR/4*3, faceColorG/4*3, faceColorB/4*3);
	arc(width/2 - faceWidth/2 + 1, height/2 + noseY/3* 4 + 5, 15, 20, HALF_PI, PI + HALF_PI);
	arc(width/2 + faceWidth/2 - 1, height/2 + noseY/3* 4 + 5, 15, 20, PI + HALF_PI, HALF_PI);
	//chin
	stroke(faceColorR/4*3, faceColorG/4*3, faceColorB/4*3);
	strokeWeight(2);
	noFill();
	beginShape();
	curveVertex(width/2 - 10, height/2 + 50 + noseY + distance);
	curveVertex(width/2 - 10, height/2 + 50 + noseY + distance);
	curveVertex(width/2 - 5, height/2 + 55 + noseY + distance);
	curveVertex(width/2 + 5, height/2 + 55 + noseY + distance);
	curveVertex(width/2 + 10, height/2 + 50 + noseY + distance);
	curveVertex(width/2 + 10, height/2 + 50 + noseY + distance);
	endShape();
	//shirt
	fill(0);
	strokeWeight(1);
	rect(width/2-faceWidth/2, height - 60, faceWidth, 60);
	fill(faceColorR, faceColorG, faceColorB);
	arc(width/2, height - 60, faceWidth, 40, 0, PI);
	//moving text 
	noStroke();
	fill('DarkCyan');
	textSize(50);
	textFont('Helvetica');
	text('bald is beautiful.', textPlacement, 100);
	textPlacement = textPlacement + 2
	if (textPlacement > 640) {
	textPlacement = -350
	};
	//stars
	fill(255,215,0);
	rect(width/4, height/4 * 3, 50, 50);
	rect(width/2 + 100, height/4 + 20, 50, 50);
	fill(141,189,193);
		//bottom left star
	arc(width/4, height/4 * 3, a, a, 0, HALF_PI);
	arc(width/4 + 50, height/4 * 3, a, a, HALF_PI, PI);
	arc(width/4, height/4 * 3 + 50, a, a, PI + HALF_PI, TWO_PI);
	arc(width/4 + 50, height/4 * 3 + 50, a, a, PI, PI + HALF_PI);
		//top right star
	arc(width/2 + 100, height/4 + 20, a + 2.5, a + 2.5, 0, HALF_PI);
	arc(width/2 + 150, height/4 + 20, a + 2.5, a + 2.5, HALF_PI, PI);
	arc(width/2 + 100, height/4 + 70, a + 2.5, a + 2.5, PI + HALF_PI, TWO_PI);
	arc(width/2 + 150, height/4 + 70, a + 2.5, a + 2.5, PI, PI + HALF_PI);

}

function mousePressed() {
	faceWidth = random(130,170);
	faceHeight = random(110,190);
	faceColorR = random(141,255);
	faceColorG = random(80,255);
	faceColorB = random(36,170);
	eyeX = random(20,30);
	eyeY = random(20,30);
	eyeWidth = random(15,25);
	eyeHeight = random(10,15);
	noseY = random(0, 20);
	mouthWidth = random(20, 25);
	mouthHeight = random(15,20);
	distance = random(20,35);
	a = random(50,60);

}

preliminary sketch

For my project, I wanted to create a message that resonates in my heart. While the variability in the faces that I created is not significant, I went for this effect to show that being a bald, green-skinned person does not make one any different than being a bald, orange-skinned person. Bald is beautiful, folks.

Tanvi Harkare – Project 02 – Variable Face

tanvi_facevariable

/* Tanvi Harkare
Section B
tharkare@andrew.cmu.edu
Project-02-Face Variables */

var eyeSize = 20;
var faceWidth = 100;
var faceHeight = 150;
var eyeColorR = 150
var eyeColorG = 250
var eyeColorB = 5;
var mouthWidth = 50;
var mouthHeight = 30; 
var mouthY = 340; 
var browHeight = 300;
var eyeHeight = 320;

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

function draw() {
    background(150);

    //hair
    stroke(0);
    strokeWeight(150);
    line(width/2, height/2 - 20, width/2, height - 225);

    //face
    fill(255, 220, 177);
    noStroke(); 
    ellipse(width / 2, height / 2, faceWidth,  faceHeight);

    //eyes
    noStroke();
    var eyeLX = width / 2 - faceWidth * 0.25;
    var eyeRX = width / 2 + faceWidth * 0.25;
    fill(255);
    ellipse(eyeLX, eyeHeight, eyeSize, eyeSize); //left eye
    ellipse(eyeRX, eyeHeight, eyeSize, eyeSize); //right eye
    //pupils
    fill(eyeColorR, eyeColorG, eyeColorB);
    ellipse(eyeLX, eyeHeight, eyeSize/2, eyeSize/2); //left pupil
    ellipse(eyeRX, eyeHeight, eyeSize/2, eyeSize/2); //right pupil

    //mouth
    noFill();
    strokeWeight(2);
    stroke(100, 75, 80);
    arc(240, mouthY, mouthWidth, mouthHeight, 0, 3.14, OPEN);

    //eyebrows
    strokeWeight(2);
    stroke(0);
    line(eyeLX - 10, eyeHeight - 10 - eyeSize, eyeLX + 10, eyeHeight - 10 - eyeSize);
    line(eyeRX - 10, eyeHeight - 10 - eyeSize, eyeRX + 10, eyeHeight - 10 - eyeSize);

    //nose
    noStroke();
    fill(198, 171, 137);
    ellipse(width/2, height/2 + eyeSize, 10, 8);
}

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(100, 130);
    faceHeight = random(110, 160);
    eyeSize = random(10, 20);
    eyeColorR = random(0, 255);
    eyeColorG = random(0, 255);
    eyeColorB = random(0, 255);
    mouthWidth = random(30, 60);
    mouthHeight = random(20, 40);
    mouthY = random(335, 350);
    browHeight = random(290, 305);
    eyeHeight = random(315, 325);
}

For this project, I created a face from simple shapes such as ellipses, arcs, and lines. My favorite part of the project was coming up with different ways to create a unique face with colors, size, and position on the face. At first I had a difficult time dealing with facial features that were overlapping, but was able to solve that by changing the values of the random integers near the end .

Audrey Zheng Looking Outwards-02

Felipe Pantone’s “Transformable Systems” at Joshua Liner Gallery.

I think it’s cool how Pantone’s medium of choice is technology. All of his work depicts mechanized processes. I can see his sense of composition and balance throughout his work. The work examines our digital age and the way we process visual information. In this era, we are constantly assaulted with digital information, which can lead to information overload. Pantone shows this by placing jumbo pixels and CMYK printing in the foreground, calling attention to the underlying framework for digital imagery. Yet, there are aspects that stand out in this image-saturated world. Flat aluminum pieces balance the large interactive sculptures and installations.

Liz Maday looking outwards 2

“Waves” (2016) by Austrian software artist LIA.

The work I chose to examine was “Waves” by Austrian software artist LIA. i was quickly drawn to this work by its peacefulness and calming nature. the sine wave patterns in this work are randomly generated, and don’t repeat, and upon learning this I associated something other than human with its beauty. Humans lack the ability to replicate random patterns, and tend to have flawed conceptions of what is truly “random.” The fact that this consistently random motion could only have been produced by a computer adds an additional level of awe and admiration for the program and artist that produced this installation. It is so enjoyable to just stare at this work and let it mesmerize you, in a way that is only possible through generative code.

 

 

Xindi Lyu-Project-02-Variable-faces

sketch

/*Xindi Lyu
Section A
xindil@andrew.cmu.edu
Project-02-Face Variables */

//face
var faceWidth = 100;
var faceHeight =95;

var skinR = 250;
var skinG = 180;
var skinB = 150;
//eyes

var color1 = 0;
var color2 = 0;
var color3 = 0;


//hair
var hairR = 200;
var hairG = 40;
var hairB = 210;





function setup() {
    createCanvas(640, 480);
    background(200);
    text("p5.js vers 0.5.12 test.", 10, 15);
}

function draw(){
createCanvas(640, 480);
noStroke();
background(skinR*(1/5),skinG*(1/5), skinB);

//hair
fill(hairR, hairG, hairB);
rect(320-faceWidth/2-20, 240-faceHeight/2-30, faceWidth+40, faceHeight+60, 150,150,10,10);

//face
fill(skinR,skinG,skinB);
rect(320-faceWidth/2, 240-faceHeight*7/24, faceWidth, faceHeight, 10,10, 70,70);

//eyes
fill(color1, color2, color3);
rect(320-faceWidth/2+15, 240-faceHeight/2+50, 10, faceHeight*1/4);
rect(320+faceWidth/2-25, 240-faceHeight/2+50, 10, faceHeight*1/4);

//mouth
noFill();
stroke(skinR*1/2, skinG*1/2, skinB*1/2);
arc(320,240-faceHeight/2+80,12,6,0,PI);
}

function mousePressed() {
faceWidth = random(95,110);
faceHeight = random(90, 140);
skinR = random(220,280);
skinG = random(150,210);
skinB = random(120,170);
color1 = random(0,255);
color2 = random(0,255);
color3 = random(0,255);
hairR = random(150,250);
hairG = random(0,90);
hairB = random(160,270);




}
 

For this project I played with color variations and light changes of face length and width.

Katherine Hua – Project 02 – Variable Face

sketch

/*
Katherine Hua
Section A
khua@andrew.cmu.edu
Project-02
*/

var x = 60;
var y = 120;
var z = 180;
var a = 240;
var b = 300;
var c = 360;
var d = 420;
var e = 3;
var f = 477;
var speed = 1;
var backgroundColorR = 250;
var backgroundColorG = 250;
var backgroundColorB = 250;
var eyeWidth = 30;
var eyeHeight = 30;
var pupilWidth = 5;
var pupilHeight = 5;
var skin = 30;
var lips = 0;
var hair = 0;
var brows = 0;
var cheekColorR = 245;
var cheekColorG = 195;
var cheekColorB = 194;



 
function setup() {
    createCanvas(480, 640);
    background(backgroundColorR, backgroundColorG, backgroundColorB);
}
 
function draw() {

	//background
	background(backgroundColorR, backgroundColorG, backgroundColorB);
	
	ellipse(x, 80, 50, 50);
 	x += speed;
 	if (x > width + 25) {
 		x = -25;
 	}
	ellipse(x, 160, 50, 50);
 	x += speed;
 	if (x > width + 25) {
 		x = -25;
 	}
	ellipse(x, 240, 50, 50);
 	x += speed;
 	if (x > width + 25) {
 		x = -25;
 	}
	ellipse(x, 320, 50, 50);
 	x += speed;
 	if (x > width + 25) {
 		x = -25;
 	}
	ellipse(x, 400, 50, 50);
 	x += speed;
 	if (x > width + 25) {
 		x = -25;
 	}
	ellipse(x, 480, 50, 50);
 	x += speed;
 	if (x > width + 25) {
 		x = -25;
 	}
 	ellipse(x, 560, 50, 50);
 	x += speed;
 	if (x > width + 25) {
 		x = -25;
 	}
 	//y
 	ellipse(y, 80, 50, 50);
 	y += speed;
 	if (y > width + 25) {
 		y = -25;
 	}
	ellipse(y, 160, 50, 50);
 	y += speed;
 	if (y > width + 25) {
 		y = -25;
 	}
	ellipse(y, 240, 50, 50);
 	y += speed;
 	if (y > width + 25) {
 		y = -25;
 	}
	ellipse(y, 320, 50, 50);
 	y += speed;
 	if (y > width + 25) {
 		y = -25;
 	}
	ellipse(y, 400, 50, 50);
 	y += speed;
 	if (y > width + 25) {
 		y = -25;
 	}
	ellipse(y, 480, 50, 50);
 	y += speed;
 	if (y > width + 25) {
 		y = -25;
 	}
 	ellipse(y, 560, 50, 50);
 	y += speed;
 	if (y > width + 25) {
 		y = -25;
 	}
 	//z
 	ellipse(z, 80, 50, 50);
 	z += speed;
 	if (z > width + 25) {
 		z = -25;
 	}
	ellipse(z, 160, 50, 50);
 	z += speed;
 	if (z > width + 25) {
 		z = -25;
 	}
	ellipse(z, 240, 50, 50);
 	z += speed;
 	if (z > width + 25) {
 		z = -25;
 	}
	ellipse(z, 320, 50, 50);
 	z += speed;
 	if (z > width + 25) {
 		z = -25;
 	}
	ellipse(z, 400, 50, 50);
 	z += speed;
 	if (z > width + 25) {
 		z = -25;
 	}
	ellipse(z, 480, 50, 50);
 	z += speed;
 	if (z > width + 25) {
 		z = -25;
 	}
 	ellipse(z, 560, 50, 50);
 	z += speed;
 	if (z > width + 25) {
 		z = -25;
 	}
 	//a
 	ellipse(a, 80, 50, 50);
 	a += speed;
 	if (a > width + 25) {
 		a = -25;
 	}
	ellipse(a, 160, 50, 50);
 	a += speed;
 	if (a > width + 25) {
 		a = -25;
 	}
	ellipse(a, 240, 50, 50);
 	a += speed;
 	if (a > width + 25) {
 		a = -25;
 	}
	ellipse(a, 320, 50, 50);
  	a += speed;
 	if (a > width + 25) {
 		a = -25;
 	}
	ellipse(a, 400, 50, 50);
 	a += speed;
 	if (a > width + 25) {
 		a = -25;
 	}
	ellipse(a, 480, 50, 50);
 	a += speed;
 	if (a > width + 25) {
 		a = -25;
 	}
 	ellipse(a, 560, 50, 50);
 	a += speed;
 	if (a > width + 25) {
 		a = -25;
 	}
 	//b
 	ellipse(b, 80, 50, 50);
 	b += speed;
 	if (b > width + 25) {
 		b = -25;
 	}
	ellipse(b, 160, 50, 50);
 	b += speed;
 	if (b > width + 25) {
 		b = -25;
 	}
	ellipse(b, 240, 50, 50);
 	b += speed;
 	if (b > width + 25) {
 		b = -25;
 	}
	ellipse(b, 320, 50, 50);
  	b += speed;
 	if (b > width + 25) {
 		b = -25;
 	}
	ellipse(b, 400, 50, 50);
 	b += speed;
 	if (b > width + 25) {
 		b = -25;
 	}
	ellipse(b, 480, 50, 50);
 	b += speed;
 	if (b > width + 25) {
 		b = -25;
 	}
 	ellipse(b, 560, 50, 50);
 	b += speed;
 	if (b > width + 25) {
 		b = -25;
 	}
	//c
 	ellipse(c, 80, 50, 50);
 	c += speed;
 	if (c > width + 25) {
 		c = -25;
 	}
	ellipse(c, 160, 50, 50);
 	c += speed;
 	if (c > width + 25) {
 		c = -25;
 	}
	ellipse(c, 240, 50, 50);
 	c += speed;
 	if (c > width + 25) {
 		c = -25;
 	}
	ellipse(c, 320, 50, 50);
  	c += speed;
 	if (c > width + 25) {
 		c = -25;
 	}
	ellipse(c, 400, 50, 50);
 	c += speed;
 	if (c > width + 25) {
 		c = -25;
 	}
	ellipse(c, 480, 50, 50);
 	c += speed;
 	if (c > width + 25) {
 		c = -25;
 	}
 	ellipse(c, 560, 50, 50);
 	c += speed;
 	if (c > width + 25) {
 		c = -25;
 	}
	//d
 	ellipse(d, 80, 50, 50);
 	d += speed;
 	if (d > width + 25) {
 		d = -25;
 	}
	ellipse(d, 160, 50, 50);
 	d += speed;
 	if (d > width + 25) {
 		d = -25;
 	}
	ellipse(d, 240, 50, 50);
 	d += speed;
 	if (d > width + 25) {
 		d = -25;
 	}
	ellipse(d, 320, 50, 50);
  	d += speed;
 	if (d > width + 25) {
 		d = -25;
 	}
	ellipse(d, 400, 50, 50);
 	d += speed;
 	if (d > width + 25) {
 		d = -25;
 	}
	ellipse(d, 480, 50, 50);
 	d += speed;
 	if (d > width + 25) {
 		d = -25;
 	}
 	ellipse(d, 560, 50, 50);
 	d += speed;
 	if (d > width + 25) {
 		d = -25;
 	}
	//e
	ellipse(e, 80, 50, 50);
 	e += speed;
 	if (e > width + 25) {
 		e = -25;
 	}
	ellipse(e, 160, 50, 50);
 	e += speed;
 	if (e > width + 25) {
 		e = -25;
 	}
	ellipse(e, 240, 50, 50);
 	e += speed;
 	if (e > width + 25) {
 		e = -25;
 	}
	ellipse(e, 320, 50, 50);
  	e += speed;
 	if (e > width + 25) {
 		e = -25;
 	}
	ellipse(e, 400, 50, 50);
 	e += speed;
 	if (e > width + 25) {
 		e = -25;
 	}
	ellipse(e, 480, 50, 50);
 	e += speed;
 	if (e > width + 25) {
 		e = -25;
 	}
 	ellipse(e, 560, 50, 50);
 	e += speed;
 	if (e > width + 25) {
 		e = -25;
 	}
	//f
	ellipse(f, 80, 50, 50);
 	f += speed;
 	if (f > width + 25) {
 		f = -25;
 	}
	ellipse(f, 160, 50, 50);
 	f += speed;
 	if (f > width + 25) {
 		f = -25;
 	}
	ellipse(f, 240, 50, 50);
 	f += speed;
 	if (f > width + 25) {
 		f = -25;
 	}
	ellipse(f, 320, 50, 50);
  	f += speed;
 	if (f > width + 25) {
 		f = -25;
 	}
	ellipse(f, 400, 50, 50);
 	f += speed;
 	if (f > width + 25) {
 		f = -25;
 	}
	ellipse(f, 480, 50, 50);
 	f += speed;
 	if (f > width + 25) {
 		f = -25;
 	}
 	ellipse(f, 560, 50, 50);
 	f += speed;
 	if (f > width + 25) {
 		f = -25;
 	}

    //character shape
    strokeWeight(5);
    point(0, 640);
    point(40, 440);
    point(70,320);
    point(150, 160);
    point(300, 160);
    point(380, 300);
    point(420, 440);
    point(480, 640);
    strokeWeight(5);
    fill(250-skin, 223-skin, 198-skin);
    beginShape();
    curveVertex(0, 640);
    curveVertex(0, 640);
    curveVertex(40, 440);
    curveVertex(70, 320);
    curveVertex(150, 160);
    curveVertex(300, 160);
    curveVertex(380, 300);
    curveVertex(420, 440);
    curveVertex(480, 640);
    curveVertex(480, 640);
    endShape();
    beginShape();
    curveVertex(120, 500);
    curveVertex(120, 500);
    curveVertex(170, 560);
    curveVertex(210, 565);
    curveVertex(170, 440);
    curveVertex(150, 400);
    curveVertex(150, 440);
    endShape();
    beginShape();
    curveVertex(360, 500);
    curveVertex(360, 500);
    curveVertex(310, 560);
    curveVertex(270, 565);
    curveVertex(310, 440);
    curveVertex(330, 400);
    curveVertex(330, 440);
    endShape();

//hair
    if (hair < 1) {
    	fill(0, 0, 0)
   		arc(230, 280, 300, 300, PI, 0);
   		fill(250-skin, 223-skin, 198-skin);
   		noStroke();
   		quad(100, 280, 120, 230, 340, 230, 360, 280);
   	}
   	else if (hair < 2) {
   		fill(0, 0, 0)
   		arc(230, 280, 350, 300, PI, 0);
   		fill(250-skin, 223-skin, 198-skin);
   		noStroke();
   		quad(100, 280, 120, 230, 340, 230, 360, 280);
   		fill(0,0,0);
   		rect(52, 275, 50, 125, 5);
   		rect(358, 275, 50, 125 ,5);
   	}
   	else if (hair < 3) {
   		fill(0, 0, 0)
   		arc(230, 280, 290, 350, PI, 0);
   		ellipse(120, 120, 75, 75);
   		ellipse(340, 120, 75, 75);
   		fill(250-skin, 223-skin, 198-skin);
   		noStroke();
   		quad(100, 280, 120, 230, 340, 230, 360, 280);
   	}
   	else if (hair < 4) {
   		fill(0, 0, 0)
   		arc(230, 280, 290, 350, PI, 0);
   		ellipse(57, 280, 80, 50);
   		ellipse(403, 280, 80, 50);
   		fill(250-skin, 223-skin, 198-skin);
   		noStroke();
   		quad(100, 280, 120, 230, 340, 230, 360, 280);
   	}

 //brows
 	if (brows < 1) {
 		stroke(0,0,0);
    	noFill();
    	arc(180, 275, 30, 30, PI+QUARTER_PI, -QUARTER_PI);
    	arc(270, 275, 30, 30, PI+QUARTER_PI, -QUARTER_PI);
 	}
 	else if (brows < 2) {
		stroke(0,0,0);
    	noFill();
    	arc(180, 275, 30, 30, PI, PI+HALF_PI);
    	arc(270, 275, 30, 30, PI+HALF_PI, 0);
 	}
    else if (brows < 3) {
    	stroke(0,0,0);
    	noFill();
    	arc(180, 275, 30, 30, PI+HALF_PI, 0);
    	arc(270, 275, 30, 30, PI, PI+HALF_PI);
    }
    else if (brows < 4) {
    	stroke(0,0,0);
    	noFill();
    	arc(180, 250, 30, 30, QUARTER_PI, HALF_PI+QUARTER_PI);
    	arc(270, 250, 30, 30, QUARTER_PI, HALF_PI+QUARTER_PI);
    }


    //eyes
    //whites
    fill(255);
    ellipse(180, 300, eyeWidth, eyeHeight);
    ellipse(270, 300, eyeWidth, eyeHeight);
    //pupil
    fill(0);
    ellipse(180, 300, pupilWidth, pupilHeight);
    ellipse(270, 300, pupilWidth, pupilHeight);


    //lips
    if (lips < 1) {
    	fill(244, 49, 33);
    	ellipse(225, 310, 40, 20);
    	ellipse(225, 300, 40, 15);
    }
    else if (lips < 2) {
    	fill(244, 49, 33);
    	ellipse(225, 310, 40, 20);
    	ellipse(225, 300, 40, 15);
    	fill(0);
    	ellipse(225, 307, 20, 5);
    }
    else if (lips < 3) {
    	fill(244, 49, 33);
    	ellipse(225, 310, 40, 20);
   		ellipse(225, 300, 40, 15);
   		fill(0);
    	ellipse(225, 307, 20, 5);
   		noFill();
   		arc(190, 310, 30, 30, PI+HALF_PI+QUARTER_PI, QUARTER_PI);
   		arc(260, 310, 30, 30, HALF_PI+QUARTER_PI, PI+QUARTER_PI);
   	}
   	else if (lips < 4) {
   		fill(244, 49, 33);
    	ellipse(225, 310, 40, 20);
    	ellipse(225, 300, 40, 15);
    	noFill();
   		arc(190, 310, 30, 30, PI+HALF_PI+QUARTER_PI, QUARTER_PI);
   		arc(260, 310, 30, 30, HALF_PI+QUARTER_PI, PI+QUARTER_PI);
   	}

   	//cheeks
   	fill(cheekColorR, cheekColorG, cheekColorB);
   	noStroke();
   	ellipse(140, 320, 40, 20);
   	ellipse(320, 320, 40, 20);

   	stroke(0,0,0);
}

function mousePressed() {
	backgroundColorR = random(200, 255);
	backgroundColorG = random(137, 255);
	backgroundColorB = random(175, 255);
	eyeWidth = random (30, 40);
	eyeHeight = random(15, 30);
	pupilWidth = random(1,7);
	pupilHeight = random(1,7);
	skin = random(1, 150);
	lips = random(4);
	hair = random(4);
	brows = random(4);
	cheekColorR = random(220, 255);
	cheekColorG = random(180, 255);
	cheekColorB = random(139, 255);
}



This character is inspired by one of my favorite visual artists, Ton Mak’s character, flabjacks. At first, I had a difficult time figuring out how to randomize characteristics such as the mouth, hair, and eyebrows because the it was not simply randomizing components such as width, height, and color. Finally, after a lot of trial and error, I figured out I could use the if, else if functions to accomplish what I wanted. This project also allowed me to become more familiar with the arc and curveshape functions.

Sketch of my character design

 

Romi Jin – Looking Outwards 02

For this week’s Looking Outward blog post, I was curious about the correlation between architecture and algorithmic systems and discovered an a computational architect named Michael Hansmeyer. He initiated a project that overlays a 1960s theory (founded by a biologist named Aristid Lindenmayer) with the field of architecture. This theory is called L-Systems, which follows a string-rewriting algorithm to model plants and how they grow. This system is now being applied to architectural practices in two steps: first, by further analyzing the theory of L-Systems using mapping schemes and turtle graphics, and the second, expanding the system to include parametrics that would allow architectural design to benefit from the algorithms.

Parametric L-System

In this link, a step-by-step interpretation of an example of an L-Systems string is shown, based on algorithmic processes that are still being developed and further improved. It is fascinating to see how math, science and architecture can weave together to create something so beautiful. Though the product is astounding, the process itself is even more intriguing.

ChristineSeo-Project-02-SectionC

sketch

// Christine Seo
// Section C
// mseo1@andrew.cmu.edu
// Project-02
var xPos;
var yPos;
var xR;
var scale;
var eyeScale;
var curve;
var shirtH;
var shirtW;
var hatR;
var earSize;
var eyeW;
var eyeH;
var earringS;
var mouthH;
var headS;
var faceS;
var circleG;
var circleB;
var skinR;
var skinG;
var skinB;
var neckR;
var neckG;
var neckB;
var faceWidth = 100;
var faceHeight = 160;
var hairLength= 155;
 
function setup() {
  createCanvas(480, 640);
  xPos = random(0,width); 
  yPos = random(0,height);
  xR = random(10,width);
  scale=random(10,height);
  shirtR=random(10,width);
  harR=random(10,width);
  eyeScale=random(10,20);
  earSize=random(25,45);
  curve=20
  shirtH=80
  shirtW=185
  eyeW=140
  eyeH=210
  earringS=210
  mouthH=240
  headS=180
  faceS=80
  circleG=90;
  circleB=80;
  skinR=247;
  skinG=225;
  skinB=200;
  neckR=231;
  neckG=195;
  neckB=156;

}

 
function draw() {

  background(46, 47, 69);
  noStroke(0);

  //circles
  fill(xR,circleG,circleB);
  ellipse(xPos, yPos, scale,scale); 
  

  //neck
  fill(neckR, neckG, neckB);
  rect(width/2-80, height/3, faceWidth/2-15, width/4.2, curve/2);


  //shirt
  fill(shirtR,circleG,circleB);
  rect(width/3.84, height/2.1, shirtH, shirtW, curve);

  //shoulders
  fill(skinR, skinG, skinB);        
  rect(height/3.5, height/2.2, shirtH-35, shirtW+40, curve);
  rect(width/3.84, height/2.1, shirtH-70, shirtW+10, curve);

  //hair
  fill (141, 114, 41);
  ellipse(width/2.91,height/3.6,width/3.2,height/3.8);
  rect(height/7, width/2.6, width/7, hairLength);

  //ears
  fill(neckR, neckG, neckB);
  ellipse(width/3.84,earringS,height/18,earSize);

  //earring
  fill(1);
  rect(width/4.5,earringS,earringS/30,earringS/30);

  //face
  fill (skinR, skinG, skinB);
  ellipse(width / 3, height /3, faceWidth,  faceHeight);

  //eyes
  fill(1);
  ellipse(eyeW,eyeH,eyeW/7,eyeScale);
  fill(990);
  ellipse(eyeW,eyeH,eyeW/17,eyeScale);

  //nose
  stroke(1);
  line(eyeW, eyeH+30, width/2.5, width/3);
  line(eyeW,eyeH+30,width/3.2,mouthH);
  ellipse(width/3,mouthH,width/160);

  //mouth
  noStroke(0);
  fill(236, 185, 248);
  triangle(width/2.5,mouthH,width/2.8,width/2,width/3.2,height/2.5);

  //bangs
  noStroke(0);
  fill(141, 114, 41);
  translate(width/-9, height/2.95);
  rotate(PI/0.6);
  ellipse(width/3,headS,faceS,width/4);

  //hat
  fill(1);
  translate(width/1.6, height/35);
  rotate(PI/2);
  ellipse(height/4,width/4-3,height/2.5,width/20);
  rect(faceS,height/48,headS,width/4.8);
  fill(hatR, circleG,circleB);
  rect(faceS,height/9,headS,width/24);

}
function mousePressed() {

  xPos = random(0,width); 
  yPos = random(0,height);
  xR = random(10,width);
  scale= random(10,height);
  eyeScale= random(10,20);
  shirtR= random(10,width);
  hatR=random(10,width);
  faceWidth = random(75, 100);
  faceHeight = random(110, 150);
  hairLength = random(120,255);
  earSize= random(25,45);



}

Although I had difficulties in the beginning of using variables, I was able to find the convenience of them! I experimented with different shapes and sizes. It was great to learn about how much I could play around with the software; it makes everything so much more dynamic!

Liz Maday Project 2

sketch lizm

//Elizabeth Maday
//Section A
//emaday@andrew.cmu.edu
//Project-02

var eyeSize = 20;
var faceWidth = 100;
var faceHeight = 100;
var eyeBrowHeight = 0;
var mouthWidth = 27;
var bodySize = 114; 

var a = 3;
var b = 20;
var c = 17;
var d = 15;
var e = 28;

var r = 203;
var g = 129;
var B = 51;



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

function draw() {
    background(255, 173, 184);
    ellipseMode(CENTER);

    //grass
    strokeWeight(2);
    fill(0, 182, 15);
    ellipse(width/2, 480, 900, 250);

    //tail
    strokeWeight(7);
    noFill();
    bezier(width/2 + bodySize/4, height/2 + bodySize/1.4, width/2 + bodySize/1.45, height/2 + bodySize/2.1, width/2 + bodySize/1.3, height/2 + bodySize/4.5, width/2 + bodySize/1.3, height/2 - bodySize/6);

    //body
    strokeWeight(3);
    fill(r, g, B);
    ellipse(width / 2, 340, bodySize, bodySize);

    //front feet
    fill(r, g, B);
    line(width / 2, 397, width / 2, 368);
    line(width / 2 - 15, 397, width / 2 - 15, 368);
    line(width / 2 + 15, 397, width / 2 + 15, 368);
    arc(width / 2 - 15, 397, 30, 30, PI, 0, CHORD);
    arc(width / 2 + 15, 397, 30, 30, PI, 0, CHORD);

    //ears
    fill(r, g, B);
    triangle(width / 2 + (faceWidth * 0.20), height / 2 - (faceHeight * 0.4), width / 2 + (faceWidth * 0.40), height / 2 - (faceWidth * 0.2), width / 2 + (faceWidth * 0.45), height / 2 - (faceHeight * 0.60));
    triangle(width / 2 - (faceWidth * 0.20), height / 2 - (faceHeight * 0.4), width / 2 - (faceWidth * 0.40), height / 2 - (faceWidth * 0.2), width / 2 - (faceWidth * 0.45), height / 2 - (faceHeight * 0.60));

    //head
    fill(r, g, B);
    ellipse(width / 2, height / 2, faceWidth, faceHeight);

    //stripes
    line(width/2, height/2 - faceHeight/2, width/2, height/2 - faceHeight/2.6);
    line(width/2 - 8, height/2 - faceHeight/2, width/2 - 8, height/2 - faceHeight/2.45);
    line(width/2 + 8, height/2 - faceHeight/2, width/2 + 8, height/2 - faceHeight/2.45);

    //eyebrows
    line(width/2 + faceWidth/6, height/2 - eyeSize + eyeBrowHeight, width/2 + faceWidth/3.4, height/2 - eyeSize + eyeBrowHeight);
    line(width/2 - faceWidth/6, height/2 - eyeSize + eyeBrowHeight, width/2 - faceWidth/3.4, height/2 - eyeSize + eyeBrowHeight);

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

    //pupil
    fill(0);
    ellipse(eyeLX, height / 2, eyeSize / 4, eyeSize / 4);
    ellipse(eyeRX, height / 2, eyeSize / 4, eyeSize / 4);

    //nose
    triangle((width / 2) - a, (height / 2) + c, width / 2, (height / 2) + b, (width / 2) + a, (height / 2) + c);

    //whiskers 
    strokeWeight(2);
    line((width / 2) - faceWidth * 0.6, (height / 2) + d, (width / 2) - 9, (height / 2) + 20);
    line((width / 2) - faceWidth * 0.6, (height / 2) + e, (width / 2) - 9, (height / 2) + 23);
    line((width / 2) + 9, (height / 2) + 20, (width / 2) + faceWidth * 0.6, (height / 2) + d);
    line((width / 2) + 9, (height / 2) + 23, (width / 2) + faceWidth * 0.6, (height / 2) + e);

    //mouth
    ellipseMode(CORNER);
    noFill();
    arc(width / 2, (height / 2) + b - 13, mouthWidth, mouthWidth, 0, PI);
    arc((width / 2) - mouthWidth, (height / 2) + b - 13, mouthWidth, mouthWidth, 0, PI);    

    //twitching whiskers
    if (mouseIsPressed) {
        d = 10;
        e = 33;
    } else {
        d = 15;
        e = 28;
    }
}

function mousePressed() {
    faceWidth = random(75, 165);
    faceHeight = random(100, 200);
    eyeSize = random(10, 40);
    mouthWidth = random(18, 34);
    bodySize = random(85, 140);
    eyeBrowHeight = random(-5, 5);

    a = random(1, 5);
    b = random(18, 23);
    c = random(13, 19);
    d = random(10, 15);

    r = random(18, 215);
    g = random(110, 160);
    B = random(35, 265);
}

This project was really fun for me to work on because I had to figure out how to do a lot of new commands. Being successful after working on it for a long time was really satisfying. It was also interesting for me to start using more difficult things to work with such as ‘bezier’.