aerubin-Project-02-Variable-Face-Section-C

sketch

//Angela Rubin
//Section C
//aerubin@andrew.cmu.edu
//Project-02

var eye = 10;
var pupil = 15;
var eyebrow = 1;
var eyelines = 0;
var n = 10; //n for nose
var ear = 1;
var lip = 0;
var ll = 1; //ll for lip length
var jaw = 1;
var chin = 10;
var skull = 1;
var eyebrowcolor = 1;
var lipcolor = 0;

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

function draw() {
    background(254, 247, 244);

    //Jaw Line
    noFill();
    stroke(1);
    beginShape();
    curveVertex(600*jaw, 400*jaw);
    curveVertex(500, 365);
    curveVertex(310, 380);
    curveVertex(300, 300);
    curveVertex(16*chin, 27*chin);
    endShape();

    //Lower Lip
    fill(222+lipcolor, 157+lipcolor, 160+lipcolor);
    beginShape();
    curveVertex(70, 100);
    curveVertex(350, 260);
    curveVertex(300, 300);
    curveVertex(300*ll, 280-lip);
    curveVertex(360, 270);
    endShape();

    //Upper Lip
    beginShape();
    curveVertex(180, 230);
    curveVertex(353, 270);
    curveVertex(300, 260);
    curveVertex(300*ll, 280-lip);
    curveVertex(350, 260);
    curveVertex(110, 140);
    endShape();
    
    fill(254, 247, 244);
    noStroke();
    triangle(350, 252, 329, 264, 360, 271);

    //Cupids Bow
    stroke(1);
    line(300, 260, 30.4*n, 24.0*n);

    //nose
    noFill();
    arc(30.8*n, 22.4*n, 30, 30, 100.3, 96);
    arc(29.1*n, 23.0*n, 70, 20, 120, 91);
    arc(26.9*n, 22.0*n, 40, 34, 90, 79.2);
    arc(25.2*n, 2.6*n, 7.0*n, 36.5*n, 102.05, 95.8);
    line(26.1*n, 20.2*n, 301, 148);

    //nose bridge
    arc(299, -34, 70, 365, 102.01, 95.8);
    
    //Top of Head
    arc(458, 151, 290, 300*skull, 3.29, 4);
    arc(454, 145, 300, 270*skull, 4, 6.5);

    //Back of Neck
    arc(782, 300, 400, 600, 90, 79.2);

    //jaw curve
    arc(490, 337.5, 80, 55, 100.33, 95.7);

    //front of neck
    arc(358, 595, 200, 430, 99, 97);

    //eye
    arc(35.5*eye, 14.4*eye, 45, 45, 90.5, 79.2);

    line(33.6*eye, 13.0*eye, 38.0*eye, (14.2*eye)+eyelines);
    line(33.7*eye, 15.6*eye, 38.0*eye, (14.2*eye)+eyelines);

    //pupil
    fill(100+pupil, 126+pupil, 35+pupil);
    ellipse(33.8*eye, 14.4*eye, 10, 18);
    fill(0);
    ellipse(33.4*eye, 14.4*eye, 5, 10);

    //ear
    noFill();
    arc(480*ear, 188*ear, 80, 95, 98.6, 96);
    arc(470*ear, 188*ear, 80, 75, 99, 94.3);

    //eyebrow
    fill(122/eyebrowcolor, 55/eyebrowcolor, 22/eyebrowcolor);
    noStroke();
    rect(335*eyebrow, 110*eyebrow, 30, 10);
    triangle(365*eyebrow, 110*eyebrow, 365*eyebrow, 120*eyebrow, 389*eyebrow, 125*eyebrow);
}

function mousePressed() {
    pupil = random(0, 100);
    eyebrow = random(.97, 1.03);
    eye = random(9.7, 10.5);
    eyelines = random(-4, 10);
    n = random(9.4, 10.6);
    ear = random(.94, 1.06);
    lip = random(-8, 9);
    ll = random(.97, 1.02);
    jaw = random(.84, 1.1);
    chin = random(6, 14);
    skull = random(.9, 1.06);
    eyebrowcolor = random(.5, 1.4);
    lipcolor = random(-40, 70);
}

Since I drew a face shown in the frontal view last week, I decided to try to draw the profile view for this assignment. My work began on a piece of paper to draw out the outline of the face (shown below). Then I brainstormed the different ways of which I could make the complex outline of the human profile utilizing code. I came to the conclusion that “curveVertex” would be useful in forming the jawline and lips, and I could use a combination of arcs and lines for the majority of the remainder.

I was inspired by the vast variations of faces we see everyday and I tried to emulate the uniqueness of each individual’s profile by changing features such as placement of the ear, placement of the eye, the strength of the jaw line, and many more. In order to emphasize the effect placement of facial features has on facial identification, hair was not necessary as it covers up the natural shape of the skull which contains a multitude of variations in itself. All in all, I am very satisfied with the product and how dramatically the face changes when clicked.

aerubin-LookingOutwards-02-Section_C

Utilizing an algorithm, a computer-generated jazz improvisation was created in the form of a melody over a walking bass line. I surprising found it very pleasing to listen to in comparison to what I would expect a computer to compose as it lacks humanity and emotion which is essential for music, composition, and art. It also sounds like jazz music as the interaction between the progression of chords and melody emulate works of famous jazz artists.

Although it is undeniably jazz improvisation, I felt that it lacked variation in both rhythm, range, and complexity. As a classically trained music performance major, I do not know everything there is to know about the genre of jazz, but when I listen to improvisation, it is not typically just straight triplets and quarter notes. In live improvisation, there is customarily some aspect of “extended techniques” (an unconventional method of playing an instrument such as glissando or pizzicato on a string instrument) utilized in the performance. That said, this is one of the reasons why performers, composers, and artists can never be replaced by solely technology as it lacks the innate creativity and range of emotions humans possess.

The description of the video gives a brief explanation of the code and how it operates. The author of the program set pre-defined chord changes to occur which is the basis of jazz music. I also suppose that the author preset most of the rhythms as there is not much variety. I believe the algorithm provided a set number of notes to choose from depending on each chord. The computer most likely randomly selected notes to play on the preset rhythm in some order. Overall, it is amazing to see what kind of art can be partially generated by artificial intelligence, although I do not believe it will ever be enough to completely replace an artist’s craft.

aerubin-Project-01-Face

sketch

//Angela Rubin
//Section C
//aerubin
//Assignment-01

function setup() {
    createCanvas(500, 500);
    background(220, 248, 244);
    angleMode(DEGREES); 
}

function draw() {

    //Hair
    strokeWeight(0);
    fill(64, 30, 5);
    rect(140, 175, 220, 300);

    //Shirt
    if(mouseIsPressed) {
        fill(255, 254, 56);
    } 
    else {
        fill(247, 219, 223);
    }
    
    rect(207, 390, 86, 110);

    arc(220, 570, 270, 315, 180, 310, CHORD);

    arc(280, 570, 270, 315, 200, 330, CHORD);

    //Neck
    strokeWeight(0);
    fill(235, 210, 195);
    rect(207, 320, 86, 105);

    arc(250, 420, 86.6, 79, 0, 180, CHORD);

    //Face
    strokeWeight(1);
    stroke(225,198,208);
    fill(231, 212, 199);
    triangle(250, 250, 325, 350, 250, 400);

    fill(234, 211, 197);
    triangle(250, 250, 175, 350, 250, 400);

    fill(235, 210, 195);
    triangle(250, 250, 175, 350, 150, 250);

    fill(233, 214, 200);
    triangle(250, 250, 325, 350, 350, 250);

    fill(235, 210, 193);
    triangle(250, 250, 340, 175, 350, 250);

    fill(231, 212, 199);
    triangle(250, 250, 160, 175, 150, 250);

    fill(233, 209, 195);
    arc(250, 250, 225, 247, 220, 320, PIE);

    //Facial Features
    strokeWeight(4);
    stroke(0, 0, 0);
    noFill();
    arc(200, 268, 60, 60, 220, 320);

    noFill();
    arc(300, 268, 60, 60, 220, 320);

    noFill();
    arc(250, 300, 90, 80, 0, 180, CHORD);

    line(250, 250, 265, 270);
    line(265, 270, 250, 270);

    //Bangs
    strokeWeight(0);
    fill(64, 30, 5);
    arc(315, 130, 220, 180, 50, 180, CHORD);

    arc(250, 268, 270, 315, 220, 320, CHORD);

    arc(165, 160, 120, 65, 0, 110, CHORD);

    rect(150, 175, 39, 15);

    rect(310, 175, 40, 20);

    //Arm Lines
    strokeWeight(2.5);
    line(168, 483, 168, 500);
    line(332, 483, 332, 500);

    //Bobby Pins
    strokeWeight(3);
    stroke(247, 219, 223);
    line(332, 160, 315, 183);
    line(323, 152, 306, 175);
}

This project really challenged my creativity as I do not normally picture simple shapes forming the basis of a human face. I began forming ideas by drawing faces on paper and experimenting with different shapes. Eventually, I came to the conclusion that triangles could be a viable option to draw the initial structure of the head. Instead of making the triangles the same color and no outline, I thought it would be interesting if each triangle was a slightly different shade than the adjacent ones to add an element of abstractness. I then added the rest of the features of the face, hair, and clothing. In addition, the shirt changes color when the mouse is clicked. I am very happy with the product and it was really enjoyable to create!

aerubin-Looking Outwards-01

Imaging Systems Lab, Rochester Institute of Technology, Summer 2015
Yiquin Cui and Kevin Farnand

One of the most notable projects I have had the pleasure to see developed was a 3D camera created by Raspberry Pi’s. The project’s goal was to open up new possibilities of the Raspberry Pi and make the first “DIY” or “do it yourself” 3D camera. The group was composed of three Rochester Institute of Technology students and two high school interns. They had six weeks to make a 3D camera out of two Raspberry Pi’s, Lenses, Wires, and write their own code. Utilizing a combination of JavaScript and Python, they were able to create the software that controlled the commercial hardware.

Inspired by the numerous “DIY” projects that have been created utilizing the Raspberry Pi, they were determined to find a low-cost and simple solution to create a camera that, when viewed with 3D glasses, would produce an image that contains depth. I really admire how determined their team was, and how they overcame all the challenges and roadblocks that crossed their path. It still amazes me how accessible technology is with coding knowledge and how there are still ideas out there that have not yet been created.

http://cui-ritcis.blogspot.com/?view=sidebar