Judy Li-Project-02-Variable-Face

judyli:Face Project 02

/*
Judy Li
Section A
judyli@andrew.cmu.edu
Project-02
*/

var eyeSize = 30;
var ballSize = 8;
var ellfaceWidth = 100;
var ellfaceHeight = 150;
var recfaceWidth = 100;
var recfaceHeight = 150;
var noseSize = 5;
var mouthWidth = 10;
var mouthHeight = 5;
var hatWidth = 200;
var hatHeight = 15;
 
function setup() {
    createCanvas(640, 480);
    stroke(0);
    strokeWeight(1.5);
    r = random(255);
    g = random(255);
    b = random(255);
}

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.
    ellfaceWidth = random(125, 250);
    ellfaceHeight = random(125, 250);
    eyeSize = random(10, 30);
    recfaceWidth = random(125, 250);
    recfaceHeight = random(125, 250);
    noseSize = random(1, 5);
    mouthWidth = random(10, 50);
    mouthHeight = random(1, 10);
    recnoseWidth = random(10, 50);
    recnoseHeight = random(10, 50);
    hatWidth = random(250,300);
    hatHeight = random(5,25);
    fill(r,g,b,);
    r = random(255);
    g = random(255);
    b = random(255);
}

function draw() {
    scale(7/8);
    background(218,175,32);
    if (mouseX < (width / 2)) {
        //Round Head
        ellipse(width / 4, height / 2, ellfaceWidth,  ellfaceHeight);
        var eyeLX = width / 4 - ellfaceWidth * 0.25;
        var eyeRX = width / 4 + ellfaceWidth * 0.25;
        var ballLX = width/4 - ellfaceWidth * 0.25;
        var ballRX = width/4 + ellfaceWidth * 0.25;
        //Glasses
        push();
        strokeWeight(5);
        stroke(255);
        ellipse(eyeLX, height / 2, eyeSize/2, eyeSize/2);
        ellipse(eyeRX, height / 2, eyeSize/2, eyeSize/2);
        pop();
        //Eyes
        strokeWeight(5);
        ellipse(ballLX, height / 2, ballSize/4, ballSize/4);
        ellipse(ballRX, height / 2, ballSize/4, ballSize/4);
        //Nose
        push();
        stroke(0);
        strokeWeight(5);
        ellipse(width / 4, (height / 2)+20, noseSize, noseSize);
        //Mouth
        strokeWeight(10);
        ellipse(width / 4, (height / 2)+50, mouthWidth, mouthHeight);
        pop();
    }

    if (mouseX >(width / 2)) {
        //Rectangular Head
        rect(3*(width / 5), (height / 3), recfaceWidth,  recfaceHeight);
        var eyeLX = (3*(width / 5)) + 1.75*(recfaceWidth * 0.2);
        var eyeRX = (3*(width / 5)) + 3.25*(recfaceWidth * 0.2);
        var ballLX = (3*(width / 5)) + 1.75*(recfaceWidth * 0.2);
        var ballRX = (3*(width / 5)) + 3.25*(recfaceWidth * 0.2);
        //Glasses
        push();
        strokeWeight(5);
        stroke(255);
        ellipse(eyeLX, (height / 3)+50, eyeSize, eyeSize);
        ellipse(eyeRX, (height / 3)+50, eyeSize, eyeSize);
        pop();
        //Eyes
        strokeWeight(5);
        ellipse(ballLX, (height / 3)+50, ballSize/2, ballSize/2);
        ellipse(ballRX, (height / 3)+50, ballSize/2, ballSize/2);
        //Nose
        push();
        stroke(255);
        strokeWeight(5);
        ellipse(3*(width / 5) + (recfaceWidth/2), (height / 2), noseSize, noseSize);
        //Mouth
        strokeWeight(10);
        ellipse(3*(width / 5) + (recfaceWidth/2), (height / 2)+30, mouthWidth, mouthHeight);
        pop();
    }
}
         

This project was a challenging one at first. I think I had some trouble with some overlaps in terms of what was supposed to show up first, second, and etc. But, I enjoyed writing up the codes for this project because it was fun and I was satisfied with my end results.

Looking Outwards – 02

Something From Nothing From Nothing Series (2014) – Elephant Hide Paper Photo by Erik Demaine and Martin Demaine

Origami is the art of paper folding. Erik Demaine is a MIT professor and he has been super fascinated by origami folding and now curved paper structures. Under a collaboration with Tomohiro Tachi, Demaine incorporated his algorithms into Tachi’s Origamizer (2008), a freeware that generates origami to innovate new methods to create more complex origami that hadn’t been done before. They had a concept that proved any 3D object can be made from a single piece of paper. The computational process of turning that concept into reality took about 10 years since there were a lot of holes to patch and improvements to be made. Testing out the origami in reality was also a challenge since they had to take materials into account. These studies had a lot of future potential that can be applied to architecture on how complex buildings can be built using cheaper sheet material. I thought this project was interesting because I had to do a studio project that used origami folding and it was hard for me to visualize certain folds/shapes onto the software I was using. I also had a lot of problems with making the models from them because it wouldn’t bend the way I wanted it to. From what I learned, I can probably tell that the algorithm that he used, had to do with a lot of the adjacent vertices, edges, and also the movement along the folds.

Origami – Frederick Blichert on This Computer Scientist Can Turn Anything into Origami 

 

Judy Li-Project-01-Face

judyli:Face Project

/*
Judy Li
Section A
judyli@andrew.cmu.edu
Assignment-01
*/

function setup() {
    createCanvas(500, 500);
    background(218,165,32);
}

function draw() {
	drawBackgroun();
	drawFace();
	drawBrows();
	drawEyes();
	drawLashes();
	drawNose();
	drawMouth();
	drawHat();
}

function drawBackgroun() {
	strokeWeight(0);
	fill(218,175,32);
	rect(50,50,400,400);
	fill(218,165,32);
	rect(100,100,300,300);
	fill(218,175,32);
	rect(150,150,200,200);

}

function drawFace() {
	strokeWeight(0);
	fill(239,219,178);
	rect(200,225,100,50);
	ellipseMode(CENTER);
	ellipse(250,225,100,50);
	ellipse(250,280,100,75);
}

function drawBrows() {
	fill(77,55,39);
	ellipse(225,240,30,5);
	ellipse(275,240,30,5);
	fill(239,219,178);
	ellipse(225,242.5,30,3);
	ellipse(275,242.5,30,3);
}

function drawEyes() {
	fill(239,200,150);
	ellipseMode(CENTER);
	ellipse(225,250,25,10);
	ellipse(275,250,25,10);
}

function drawLashes() {
	strokeWeight(1);
	line(225,255,225,257.5);
	line(220,255,217.5,257.5);
	line(230,255,232.5,257.5); 
	line(275,255,275,257.5);
	line(270,255,267.5,257.5); 
	line(280,255,282.5,257.5); 
}

function drawNose() {
	strokeWeight(0.5);
	fill(239,200,150);
	ellipse(248,280,10,5);
}

function drawMouth() {
	strokeWeight(0);
	fill(230,141,139);
	ellipse(245,298,10,5);
	ellipse(255,298,10,5);
	fill(225,120,118);
	ellipse(250,300,20,2.5);
	ellipse(250,300.5,17.5,4.5);
}

function drawHat() {
	strokeWeight(0);
	fill(108,108,108);
	rect(200,215,100,5);
	fill(0,0,0);
	rect(200,215,100,-30);
	ellipse(250,185,100,25);
	ellipse(250,225,185,15);
}

A lot of the people around me tell me that I love to sleep, wear hats quite often, and love the color golden yellow. Hence, I used all that for this project. When I started out, it was a bit difficult to start because I had no image in mind. But, I started to play around with the shapes and color to created this. I think during this process, I realized that my java script codes were a bit messy, so I made it more organized and I think that helped me a lot! Overall, I had fun with this project and learned a lot.

Looking Outwards – 01

Photo by Pablo Enriquez taken at MoMA PS1

Jenny E.Sabin’s Lumen project is really interesting because her project allows for many varieties of transformation and multiple experiences. She got inspiration from this project by thinking about architecture, materials, and their response to the environment. Through this project she was able to innovate the application of materials to bigger scales. The canopy of Lumen is made up of windows of different sized cells and conical forms hang down various lengths from it. Each individual solar active fiber is knit through a Shima Seiki machine with the whole project consisting of over a million yards of thread. Because of its lightweight texture, there is continuous movement and with its fiber makeup, it generates a reactive response with the sun. The process of this project require a robot to test weave the fibers around a mold and computational software like rhinoceros and grasshopper to simulate how these fibers might move. The process for this project was long and required the help of her students, Dr. Peter Lloyd Jones, his lab, other research associates, and Andrew Lucia.

Lumen Article – Author: Laura Amaya on Jenny Sabin Discusses ‘Lumen’ as MoMA PS1’s 2017 Young Architects Program Open

Lumen Video