NatalieKS-Project-02-Variable-Face

sketch

//Natalie Schmidt
//nkschmid@andrew.cmu.edu
//Section D
//Project-02

function setup() {
    createCanvas(640, 480);
    background(126, 204, 213);
    angleMode(DEGREES);
    noStroke();
}

//variables for the color of the fish
var r = 222
var g = 157
var b = 207
//variables for tail and eye size
var tail1 = 60
var tail2 = 130
var eyeB = 20 //for black part of eye
var eyeW1 = 8 //for large white part of eye
var eyeW2 = 5 //for small white part of eye


function draw() {
    fill(170, 220, 234);
//bubbles
    ellipse(480, 20, 40, 40);
    ellipse(450, 100, 50, 50);
    ellipse(480, 165, 30, 30);
    ellipse(440, 200, 10, 10);
//fish body
    fill(r, g ,b);
    ellipse(width/2, height/2, 160, 120);
//fish black eye
    fill(0);
    ellipse(380, 240, eyeB, eyeB);
//fish white eye
    fill(255);
    ellipse(377, 235, eyeW1, eyeW1); // large
    ellipse(385, 245, eyeW2, eyeW2); //small
//mouth
    fill(r, g, b);
    ellipse(403, 238, 12, 12); //top
    ellipse(403, 249, 12, 12); //bottom
//fish tails
    rotate(-45);
    translate(-210, -40);
    ellipse(width/3, 320, tail1, tail2); //top
    rotate(90);
    translate(170, -400);
    ellipse(width/3, 250, tail1, tail2); //bottom
}

function mousePressed() {
//when the mouse is pressed, the color changes
    r = random(0, 255);
    g = random(0, 255);
    b = random(0, 255);
//when mouse is pressed, tail and eye size changes
    tail1 = random(35, 125);
    tail2 = random(90, 175);
    eyeB = random(10, 35);
    eyeW1 = random(3, 20);
    eyeW2 = random(1, 15);
    clear();
    background(126, 204, 213);
}

sketch

For this project, the first thing that came to mind was a fish. I knew I wanted the color, eyes, and tail size to change, but the difficult part was getting the right proportions and the right angles. The initial shapes were pretty simple, because I figured experimenting with curves and rotate at the same time would be a little too complicated for me right now. I didn’t do any initial sketches, since the fish was only going to be a couple of ellipses. The image of the fish kept overlapping each other instead of replacing when I clicked my mouse, so I had to use the clear function to fix the problem; however, after THAT a chunk of the background was getting cleared too, so I filled in the background again at the very end to make it the way I wanted it to appear. I’m not sure if there was any other (better?) way to fix that problem, but this way seemed to work. All in all, I’m pretty proud of the final product!

monicah1-project-02

sketch


var eyeSize = 20;
var circWidth = 160;
var circHeight = 200;
var earYcord = 190
var midx = 320 //x cordinate middle of the face
var midy = 200 //y cordinate middle of the face



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

function draw() {
	background (250,65,180);
	noStroke (0);
	fill (250,185,185);
	ellipse (midx,midy,circWidth,circHeight);
	ellipse (midx-80,earYcord,circWidth-120,circHeight-120);
	ellipse (midx+80,earYcord,circWidth-120,circHeight-120);
	fill (230,50,50);
	arc (midx,midy+50,50,80,0,PI+QUARTER_PI,OPEN);
	fill (0);
	ellipse (midx-18,midy+33,circWidth-145,circWidth-145);// mole

	fill (130,10,170);
	ellipse (midx-18,midy-30,circWidth-94,circWidth-94);//dark circle
	
    fill (250);
	ellipse (midx-18,midy-30,circWidth-120,circWidth-120);// left eyeball white
	ellipse (midx+18,midy-31,circWidth-110,circWidth-110);

	fill (0);
	ellipse (midx+7,midy-25,circWidth-130,circWidth-130);// right eyeball 
	ellipse (midx-16,midy-25,circWidth-130,circWidth-130);// left eyeball 
}

function mousePressed(){
	circWidth = random(100,200);
	circHeight = random(150,300);
	eyeSize = random(10,30);
}

I tried to use as much same variables as I can to simplify the code. I found it fun to use one x,y point to base on and finish the variable faces.

 

ctv-Project-02-someFaces

ctv-project-02

//Ty Van de Zande
//Section B @ 10:30 AM
//ctv@andrew.cmu.edu
//Project-02



//document variables
var ht = 480;
var wd = 640;
var cenY = ht / 2;
var cenX = wd / 2;



//setting up the document
function setup() {
    createCanvas(wd, ht);
    frameRate(1);
}


function draw() {
background(230);    
    
var r = random(400);

//variables for heads
var headW = random(r);
var headH = random(r);

//variables for eyes
var eyePosX = random(headW);
var eyePosY = random(headH);
var eyeSize = random(50);

//variables for brows
var bPosX = random(r);
var bPosY = random(200);
var bTop = bPosY + random(r);
var bLength = random(r);
var bRot = random(r);

//mouth
var mX = random(r);
var mY = random(r);
var mTop = random(r);
var mBottom = random(r);
    
    ellipseMode(CENTER);
    rectMode(CENTER);
    fill(255);
    noStroke();
    
    //draws head
    ellipse(cenX, cenY, headW, headH);
    
    
    //daws eyes
    fill(100)
    noStroke();
    ellipse(cenX - eyePosX, cenY , eyeSize, eyeSize);
    ellipse(cenX + eyePosX, cenY , eyeSize, eyeSize);
    
    
    //draws mouth
    strokeWeight(5);
    stroke(120,0,0);
    beginShape();
    vertex(cenX-mX, cenY+mY);
    bezierVertex(cenX, cenY-mTop, cenX, cenY-mTop, cenX+mX, cenY+mY );
    bezierVertex(cenX+mX, cenY+mY, cenX, cenY-mBottom, cenX-mX, cenY+mY);
    endShape();
    
    
    //draws eyebrows
    
    p1 = {x: cenX-bLength, y: cenY - bPosY}, 
    p2 = {x: cenX-(bLength/2), y: cenY - bTop}, 
    p3 = {x: cenX, y:cenY - bPosY}
    
    p4 = {x: cenX+bLength, y: cenY - bPosY}, 
    p5 = {x: cenX+(bLength/2), y: cenY - bTop}, 
    p6 = {x: cenX, y:cenY - bPosY}
    
    noFill();
    strokeWeight(2);
    stroke(255, 150, 0);
    curve(p1.x, p1.y, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y);
    curve(p4.x, p4.y, p4.x, p4.y, p5.x, p5.y, p6.x, p6.y);
    

}

For someFaces, I structured each component to act on the center point of the canvas. (Is there a better way to use the center point as a shape starting point?) A random number generator is included in the draw() function, and all of the components generate randos with that local rando as the ceiling. The eyes and head (or sometimes nose) always stays on the centerline of the y-axis. The frameRate() is set to 1 so the image refreshes to show a new face! the eyebrows are pretty crazy.

hyt-Project-02: Minion Faces

hyt-02-Minions

// helen tsui
// 15-104 section d
// hyt@andrew.cmu.edu
// project-02-minions-variation

var eyeSize = 50;
var mouthSize = 30; 
var bodyWidth = 140;
var bodyHeight = 130;
var eyeballSize = 40; 
var mouthAngle = 100;
var x = 0; //rgb value randomization


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

function draw() {
    angleMode(DEGREES); // angle unit change
    background(x, 194, 239); // blue and pink-ish backgrounds randomizing
    
// body
    stroke(0);
    strokeWeight(4.5);
    fill(255, 221, 119); // yellow
    arc(width / 2, height / 2, bodyWidth, bodyHeight, 180, 360, OPEN); // bald head part
    rect(width / 2 - bodyWidth / 2, height / 2, bodyWidth, bodyHeight); // actual body

//pants?
    fill(68, 100, 133); // denim blue
    arc(width / 2, height / 2 + bodyHeight, bodyWidth, bodyHeight - 30, 0, 180, OPEN);

// eyes    
    var eyeLX = width / 2 - bodyWidth * 0.23; // Left eye's x position
    var eyeRX = width / 2 + bodyWidth * 0.23; // Right eye's x position
    fill(256); // white
    ellipse(eyeLX, height / 2, eyeSize, eyeSize); // 
    ellipse(eyeRX, height / 2, eyeSize, eyeSize);

// eyeballs
    fill(60, 40, 40); // brown
    noStroke();
    ellipse(eyeLX, height / 2, eyeballSize, eyeballSize);
    ellipse(eyeRX, height / 2, eyeballSize, eyeballSize);

// mouth
    fill(0);
    arc(width / 2, height / 2 + bodyHeight - 50, mouthSize, mouthSize, 0, mouthAngle);

// hands (referenced from p5.js angleMode)
    var a = atan2(mouseY - height / 2, mouseX - width / 2);
    fill(255, 221, 119); // yellow
    
// left hand rotate! 
    translate(width / 2 - bodyWidth / 2, height / 2 + bodyHeight);
    push();
    rotate(a);
    rect(0, - bodyHeight / 12, bodyHeight / 3, bodyHeight / 6); // arms
    fill(0); // black
    ellipse(bodyHeight / 3, 0, bodyHeight / 5, bodyHeight / 5); // black hands
    pop();

// right hand rotate! 
    translate(bodyWidth, 0);
    push();
    rotate(a);
    rect(0, - bodyHeight / 12, bodyHeight / 3, bodyHeight / 6); // arms
    fill(0); // black
    ellipse(bodyHeight / 3, 0, bodyHeight / 5, bodyHeight / 5); // black hands
    pop();

 }


// randomization when mouse clicks on the canvas
function mousePressed() {
    bodyWidth = random(100, 180);
    bodyHeight = random(90, 180);
    eyeSize = random(30, 50);
    eyeballSize = eyeSize - 12; 
    mouthSize = eyeSize; 
    mouthAngle = random(10, 220); 
    x = random(81, 225); // background rgb value change
}

Now that we have entered week 2, there are many more functions and attributes that I have began to explore in p5.js, and based on those I decided to make a minion with animation-like facial features for my program. I didn’t particularly plan out the sketches on Illustrator, but rather drew out primitive shapes like ellipses and rectangles through trial and error. One of the more difficult process was the moving hands when the mouse hovers over, but once I figured out the coordinates and center for rotation it became much easier. Overall, I really enjoyed creating the project!

eeryan-Looking-Outwards-02

chronomops from Tina Frank on Vimeo.

This generative art, created in 2005 by Tina Frank interested me because of the combination of flashing images and jarring music engaging and thought provoking. It reminded me of the randomized animations we looked at in class, but used in a way that was visually appealing and planned. The neon colored lines, rapidly reappearing in parallel and perpendiculat sequences, in combination with the increasingly fast and nonsensical music combine in a way that is jarring, yet still visually compelling. Occasionally your eyes will try to find sense in the rapidly appearing lines and shapes – for example the appearance of the rotating cubic form in the midst of linear chaos around the 40 second mark. The ability to generate these patterns and shapes rapidly and randomly allow an artistic interpretation of chaos using digitally generated images and sound.

creyes1-LookingOutwards-02

IBM’s The Cognitive Photobooth from Justin Au on Vimeo.

Back in April 2017, IBM hosted an “Art with Watson” exhibit in New York City, featuring a photobooth powered by the eponymous AI that would create a data visualization of the user’s personality in the form of a portrait. With IBM being a large company, I’m surprised that this is the first time I’m seeing this project, but there’s something charming and admirable about creating a warm, human experience with artificial intelligence.

The photobooth asks questions such as the user’s favorite artist or to tell them about their childhood friend, then using text-to-speech and tone analyzers, figures out the user’s personality traits to then be integrated into their portrait. While the personality analysis is entirely up to the AI, the portraits do bear the mark of their creators – icons representing each traits are premade, it’s the algorithm that determines where to place them, in what quantity, and at what size.

Usually personality tests feel somewhat arbitrary, requiring to choose between bubbles that say “Agree” or “Somewhat Agree,” but IBM’s Cognitive Photobooth seems to encourage its users to speak freely on topics that one wouldn’t expect a computer to understand, and it’s admirable to see that human element being worked into technology for an experience that’s not only wonderful, but welcoming.

Check out the project on Behance.

Shots of IBM’s Cognitive Photobooth

rkondrup-project-02

face.js

/*Ryu Kondrup
rkondrup@andrew.cmu.edu
Section D
project-02*/
//feature variables

var eyeHeight = 30;
var eyeWidth = 15;
var noseyLiars = 50;
var mouthAgape = 30;
var hatHeight = 120;
var rightShadow = 15;
var downShadow = 10;
var mouthWidth = 30;
var r, g, b;

function setup() {
    createCanvas(640, 480);
    r = random(150, 255);
    g = random(150, 255);
    b = random(150, 255);
  }

function draw() {
  background(26, 83, 92);
  //colors
    var darkDarkBlue = color(22, 74, 82);
    var darkBlue = color(26, 83, 92);
    var blue = color(78, 205, 196);
    var white = color(248, 255, 247);
    var red = color(255, 107, 107);
    var yellow = color(255, 231, 109);



noStroke();


//shirt SHADOW
fill(darkDarkBlue);
rectMode(CENTER);
rect(150+rightShadow, 390+downShadow, 150, 200, 75);

//collar SHADOW
fill(darkDarkBlue);
ellipse(150+rightShadow, 320+downShadow, 160, 50);

//hat top SHADOW
fill(darkDarkBlue);
rectMode(CENTER);
rect(150+rightShadow, 145+downShadow, 120, hatHeight, 60);

//brim of hat SHADOW
fill(darkDarkBlue);
rectMode(CENTER);
rect(150+rightShadow, 190+downShadow, 150, 30, 15);

//head SHADOW
fill(darkDarkBlue);
ellipse(150+rightShadow, 250+downShadow, 150, 150);

//hat wrap SHADOW
fill(darkDarkBlue);
rect(150+rightShadow, 160+downShadow, 120, 30);

//noooose SHADOW
fill(darkDarkBlue);
rectMode(CORNER);
rect(190+rightShadow, 230+downShadow, noseyLiars, 30, 15);



//shirt
fill(yellow);
rectMode(CENTER);
rect(150, 390, 150, 200, 75);

//collar
fill(white);
ellipse(150, 320, 160, 50);

//hat top
fill(yellow);
rectMode(CENTER);
rect(150, 145, 120, hatHeight, 60);

//head
fill(blue);
ellipse(150, 250, 150, 150);

//eyeball
fill(white);
ellipse(140, 240, eyeWidth, eyeHeight);

//brim of hat
fill(yellow);
rectMode(CENTER);
rect(150, 190, 150, 30, 15);

//hat wrap
fill(blue);
rect(150, 160, 120, 30);

//bow CENTER
fill(blue);
ellipse(160, 355, 40);
//bow right
ellipse(195, 355, 40, 60);
//bow right
ellipse(125, 355, 40, 60);

//mouth
fill(red);
rectMode(CORNER);
rect(170, 270, 30, mouthAgape, 15);

//noooose
fill(r, g, b);
rectMode(CORNER);
rect(190, 230, noseyLiars, 30, 15);





}

function mousePressed() {
    eyeHeight = random(30, 70);
    eyeWidth = random(15, 30);
    noseyLiars = random(50, 500);
    mouthAgape = random(30,90);
    hatHeight = random(120, 300);
    r = random(200, 255);
    g = random(100, 255);
    b = random(100, 255);

}

Creating this interactive image was lots of fun.  I wanted to have a concept that made sense with the aim of the assignment, so I settled on a wooden boy as a subject. I also wanted to explore how facial expressions change with different sized facial features. I would like to further explore how features can be changed in ways other than through clicking that can add more depth and complexity to the image.

Project-02-Variable-Face

sketch

//Hanna Jang 
//hannajan@andrew.cmu.edu 
//Section B 
//Project 2: Variable Faces

var BGcircleSize=250;
var BGcircleSize2=280;
var UpperFaceWidth=100; 
var UpperFaceHeight=80; 
var SmileX=300; 
var SmileY=245;
var Smilewidth=15; 
var SmileHeight=15; 
var anglestart=0; 
var LowerFaceWidth=150; 
var LowerFaceHeight=100;
var EyeSize=27;
var PupilSize=7;
var NostrilWidth=5;
var NostrilHeight=15; 
var EarSize=25;
var InnerEarSize=13;

function setup() {
    createCanvas(640, 480);
    background(245, 196, 224);
}

function draw() {
	//Background Circles
	fill(27, 71, 128);
	ellipse(width/2, height/2-45, BGcircleSize2, BGcircleSize2);
	fill(255);
	noStroke();
	ellipse(width/2, height/2-45, BGcircleSize, BGcircleSize);
	
	//ears 
	fill(202, 197, 245);
	var LXear =width/2-UpperFaceWidth*0.40; 
	var RXear =width/2+UpperFaceWidth*0.40; 
	ellipse(LXear, height/2-105, EarSize, EarSize);
	ellipse(RXear, height/2-105, EarSize, EarSize);
	
	//innerears
	fill(157, 141, 187); 
	var LXear =width/2-UpperFaceWidth*0.40; 
	var RXear =width/2+UpperFaceWidth*0.40; 
	ellipse(LXear, height/2-105, InnerEarSize, InnerEarSize);
	ellipse(RXear, height/2-105, InnerEarSize, InnerEarSize);
	
	//UpperFace
	fill(202, 197, 245); 
	ellipse(width/2, height/2-75, UpperFaceWidth, UpperFaceHeight);
	
	//LowerFace 
	fill(202, 197, 245);
	ellipse(width/2, height/2-20, LowerFaceWidth, LowerFaceHeight);

	//eyes 
	var LXeye =width/2-UpperFaceWidth*0.27;
	var RXeye =width/2+UpperFaceWidth*0.27;
	fill(255);
	noStroke();
	ellipse(LXeye, height/2-83, EyeSize, EyeSize);
	ellipse(RXeye, height/2-83, EyeSize, EyeSize);
	
	//pupils
	var LXpupil =width/2-UpperFaceWidth*0.27; 
	var RXpupil =width/2+UpperFaceWidth*0.27;
	fill(0);
	ellipse(LXpupil, height/2-81, PupilSize, PupilSize);
	ellipse(RXpupil, height/2-81, PupilSize, PupilSize);
	
	//nostrils
	var LXnostril =width/2-LowerFaceWidth*0.30;
	var RXnostril =width/2+LowerFaceWidth*0.30;
	ellipse(LXnostril, height/2-30, NostrilWidth, NostrilHeight);
	ellipse(RXnostril, height/2-30, NostrilWidth, NostrilHeight);
	
	//smile 
	fill(198, 73, 59);
	arc(SmileX, SmileY, Smilewidth, SmileHeight, anglestart, PI+QUARTER_PI, OPEN);
	}
	
function mousePressed() {
	//when the user's mouse clicks, these variables are reassigned
	//to random variables within specified ranges 
	
	BGcircleSize2=random(270, 350);
	EyeSize=random(20, 35);
	LowerFaceWidth=random(100, 180);
	LowerFaceHeight=random(90, 120);
	NostrilWidth=random(5, 15);
	NostrilHeight=random(15, 30);
	SmileX=random(280, 330);
	SmileY=random(240, 250);
	EarSize=random(25, 35); 
	
}
	
	

When I first saw the project assignment, I knew I wanted to make my character a hippo, one of my favorite animals. I then sketched up different ideas to make different changes on the hippo’s face when the mouse was clicked. This included variations in eyes, nostrils, ears, and the lower mouth area.

I then experimented with the different variations of sizes and movement of face structures. I was pleased to see that each time the mouse was clicked, a completely new hippo identity appeared, by random variation.

amui1-LookingOutwards-02

For this Looking Outwards, I was inspired by this project called “Human After All,” created by a photographer, Jan Kriwol, and a digital artist, Markos Kay. This generative art piece showcased 3D renderings of virtual blood vessels with particle simulations. They stripped down the human body to just the essentials, and placed them in the context of everyday situations. This project aimed to battle social barriers, caused by race or gender, in various environmental contexts.

I really admire this project because of its creative collaboration of 2 mediums and because of the message the artists work to convey. I admire this project because it is completely new and not like anything I have seen before. Also, this combination of digital and real is extremely creative, and I aspire to create something one day that does the same. “Human After All” inspires me because the artists use such a creative way to demonstrate equality.

Link to full project here

 

gyueunp – Project-02: Variable Faces

variable face

// GyuEun Park
// 15-104 E
// gyueunp@andrew.cmu.edu
// Project-02

var eyeSize = 14;
var blushTransp = 0;
var colorR = 112;
var colorG = 104;
var colorB = 104;
var eyebrowTransp = 0;

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

function draw() {
	background(colorR,colorG,colorB);

	// ears
	fill(0);
	noStroke();
	ellipse(175,125,20,30);
	ellipse(305,125,20,30);

	// head and neck
	fill(252,252,248);
	ellipse(width/2,320,280,440);
	
	// face
	fill(240,234,227);
	ellipse(width/2,230,170,200);

	// eyes
	fill(70);
	ellipse(200,230,eyeSize,eyeSize);
	ellipse(280,230,eyeSize,eyeSize);

	//blush
	fill(246,179,167,blushTransp);
	ellipse(190,245,15,6);
	ellipse(290,245,15,6);

	// nose
	stroke(100);
	strokeWeight(2);
	line(235,255,240,260);
	line(245,255,240,260);

	//philtrum
	stroke(100);
	strokeWeight(2);
	line(width/2,260,width/2,275);

	//eyebrows
	stroke(100,eyebrowTransp)
	line(200,215,210,218);
	line(280,215,270,218);

	fill(178,191,199);
	noStroke(0);
	ellipse(230,282,4,4);

	fill(255);
	noStroke(0);
	ellipse(229,281.4,1.5,1.5);
}

function mousePressed() {
	// when the user clicks, these variables are reassigned to random values within specified ranges.
	eyeSize = random(10,20);
	blushTransp = random(0,100);
	colorR = random(100,112);
	colorG = random(100,104);
	colorB = random(100,104);
	eyebrowTransp = random(0,100);
}

I made a face of my new stuffed alpaca. Although the random changes were interesting, I wanted to avoid drastic alterations. Therefore, I focused on creating subtle color and transparency changes in the background and its facial features.