mecha-project02-variable-face

sketch

//eyes
var eyeSize = 12;
var eyeAdd1 = 10;
var eyeAdd2 = 30;
var eyeAdd3 = 20;
var eyeAdd4 = 30;

//face
var faceWidth = 130;
var faceHeight = 150;
var roundX1 = 20;
var roundX2 = 20;
var roundY1 = 20;
var roundY2 = 20;

//mouth
var roundXX1 = 10;
var roundXX2 = 10;
var roundYY1 = 10;
var roundYY2 = 10;
var mouthWidth = 30;
var mouthHeight = 18;
var mouthX = 34;

//color
var colorR = 60;
var colorG = 200;
var colorB = 10;
var colorPr = 250;
var colorPg = 122;
var colorPb = 129;
var colorLr = 250;
var colorLg = 220;
var colorLb = 220;
var colorBr = 10;
var colorBg = 10;
var colorBb = 200;

//eyebrows
var browWidth = 10;
var browHeight = 10;

//nose
var noseHeight = 12;
var noseWidth = 6;

//hair
var hairX = 300;
var hairY = 190;
var hairWidth = 60;
var hairHeight = 30;

//eyebrows
var arcA = 0;
var arcB = 0;
var arcC = 0;
var arcD = 0;

function setup() {
    createCanvas(640,480);
    angleMode(degrees);
    textSize(12);
}

function draw() {
    background(255);
    //face
    noStroke();
    fill(colorLr,colorLg,colorLb);
    strokeWeight(3);
    rect(280,200, faceWidth, faceHeight,roundX1, roundX2, roundY1, roundY2);

    //eyes
    noStroke();
    fill(colorG+50,colorB+60,colorR);
    var eyeLX = width / 2 - faceWidth * 0.25;
    var eyeRX = width / 2 + faceWidth * 0.25;
    ellipse(eyeLX+eyeAdd1, height / 2+eyeAdd2, eyeSize, eyeSize);
    ellipse(eyeRX+eyeAdd3, height / 2+eyeAdd4, eyeSize, eyeSize);

    //text bubble
    fill(colorLr,colorLg-40,colorLb-30);
    strokeWeight(1.5);
    noStroke();
    rect(147,280,104,40,30,30,0,30);
    triangle(220,290,200,320,260,320);
    
    //text
    noStroke();
    fill(255);
    text("w o w z a ! !",168,293,400,400);

    //nose
    fill(colorPr, colorPb, colorPg);
    rect(((eyeLX+eyeRX)/2),height/2+eyeAdd2,noseWidth,noseHeight,40);

    //hair
    noStroke();
    fill(colorG+50,colorB+60,colorR);
    rect(hairX,hairY,hairWidth,hairHeight,200);

    //eyebrows
    noFill();
    strokeWeight(2);
    stroke(colorG+50,colorB+60,colorR);
    arc(eyeLX,height/2,40,40,PI+3.4-arcA,HALF_PI+arcB,OPEN);
    arc(eyeRX+6,height/2,40,40,HALF_PI-0.4-arcC,HALF_PI+0.6+arcD,OPEN);

    //blush
    fill(colorLr,colorLg-40,colorLb-30);
    noStroke();
    rect(eyeLX+eyeAdd1-10,height/2+eyeAdd2+12, 20,14,80)
    rect(eyeRX+eyeAdd3-10,height/2+eyeAdd4+12, 20,14,80)

    //mouth
    strokeWeight(3);
    stroke(colorPr, colorPb, colorPg);
    fill(255);
    rect(280+mouthX,height/2+eyeAdd2+20, mouthWidth, mouthHeight+random(0,10),roundXX1, roundXX2, roundYY1, roundYY2);

}

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(130, 150);
    faceHeight = random(150, 200);
    eyeSize = random(12, 15);
    roundX1 = random(10,70);
    roundX2 = random(10,70);
    roundY1 = random(10,70);
    roundY2 = random(10,70);
    colorR = random(10,80);
    colorG = random(100,230);
    colorB = random(10,80);
    eyeAdd1 = random(0,20);
    eyeAdd2 = random(30,70);
    eyeAdd3 = random(0,20);
    eyeAdd4 = random(30,70);
    roundXX1 = random(1,9);
    roundXX2 = random(1,9);
    roundYY1 = random(1,9);
    roundYY2 = random(1,9);
    mouthHeight = random(20,50);
    mouthWidth = random(20,50);
    mouthX = random(20,30);
    colorPr = random(200,255);
    colorPg = random(100,150);
    colorPb = random(100,150);
    colorLr = random(270,255);
    colorLg = random(220,255);
    colorLg = random(220,255);
    noseWidth = random(4,10);
    noseHeight = random(9,14);
    hairWidth = random(30,100);
    hairHeight = random(20,50);
    hairX = random(300,320);
    arcA = random(0,0.4);
    arcB = random(0,0.4);
    arcC = random(0,0.4);
    arcD = random(0,0.4);
    colorBr = random(0,140);
    colorBg = random(0,40);
    colorBb = random(200,255);
}

My process in completing this project was similar to the last one in that I worked trial and error through all of the elements of the face–starting with a base shape and going on to the eyes, mouth, nose, etc. As an attempt to stay consistent with the style of the face I created for the previous project, I decided generate faces with a similar worried expression. Rather than have my code be completely randomized, I set a lot of limitations to the range of values so as to be able to be able to have more control over the random nature of the project.

In the end, I focused most on creating a good color scheme in which all of the facial elements would go well together. I had a lot of trouble with this given the amount of randomization in my code. In order to achieve the color scheme that I liked, I altered the range of numbers for the R, G, and B values. I focused on having more warm pastel tones in my project so that the faces I generated would be aesthetically pleasing in a series.

mecha-lookingoutwards-02

In July 2014, anonymous designer Strangethink created a video game exemplifying generative art in the form of a glitchy video game by the name of Error City Tourist.

Strangethink created Error City Tourist using Unity 3D as part of a “Glitch Jam” game design challenge, in which glitches are meant to be implemented in the gameplay and/or aesthetic of a game. What was most visually surprising to me about this game was its lack of consideration of the draw distance, as shown by the video above. Unlike most games that attempt to have objects in the distance fade in as they are generated, Error City Tourist does not attempt to hide this, adding to the glitchy appearance of the game.

This sparked his next project, Secret Habitat, a game in which the player is able to view generated art in a digital walk through gallery. Rather than being limited to visual art, the game includes both generated poetry and music.

 

Strangethink revealed that his fascination with procedurally-generated games came with his distaste of “heavily-stage managed” video games, or games in which the player is merely following a one-way path created by its designers. What I admire about both of these projects is its aesthetic consistency despite the nature of variables being generated.

mecha-lookingoutwards-01

Daily Tous Les Jours

Every year, Quartier des spectacles in Montréal is decorated with installation art meant to bring together the community around the area. In 2011, the Canadian design firm Daily Tous Les Jours led a team consisting of over forty individuals including specialists in design, technical direction, music, animal/human behavior, and technical direction in order to create the urban instrument, 21 Balançoires.

Each swing represents a specific instrument (piano, guitar, harp, or vibraphone) that plays a note based on how high a user swings. Depending on how users interact with the swings and with each other, the instrument has the ability to play scales and melodies.In order to play the corresponding note to the height of the swing, the installation relies on sensors hidden in the swings that communicate its location to a central computer.

What inspired me the most about this project was the ability of the design firm to bring life to an area that was originally closed off and essentially abandoned. 21 Swings became so popular that the installation became scheduled to reappear every spring since. Through its playful nature, the piece was able to attract people of all different ages and demographics.

mecha-project01-face

sketch

function setup() {
    createCanvas(500,500);
    background(255);
    noStroke();
    fill(75,49,52);
    ellipse(250,255,450,450);

//hair
    noStroke();
    fill(150,106,70);
    rect(150,200,170,170);
//neck
    noStroke();
    fill(220,167,139);
    rect(225,350,52,30);

//shirt
    noStroke();
    fill(255);
    arc(250, 415, 140, 90, PI, 0, CHORD);

//neck
    fill(220,167,139);
    noStroke();
    arc(251, 370, 52, 30, 0, PI, CHORD);

//hair (bottom)
    fill(211,188,126);
    noStroke();
    triangle(130,230,120,370,200,370);
    triangle(370,230,300,370,380,370);
       
//face
    noStroke();
    fill(255,218,190);
    ellipse(250,230,240,270);

//shading
    noStroke();
    fill(220,167,139);

//eyes
    noStroke();
    fill(58,26,20);
    ellipse(214,260,15,15);
    noStroke();
    fill(58,26,20);
    ellipse(286,260,15,15);

//nose
    noStroke();
    fill(220,167,139);
    triangle(250,265,235,300,265,300);

//mouth
    stroke(58,26,20);
    strokeWeight(2.2);
    fill(255);
    ellipse(250,325,30,15);

//hair (top)
    fill(211,188,126);
    noStroke();
    arc(250,230,250,270,PI+.9, QUARTER_PI-0.8, OPEN);
    arc(250,230,250,270,PI+.2, QUARTER_PI-2.3, OPEN);

    arc(320,142,260,190,QUARTER_PI+.1, PI+0.07, OPEN);
    arc(139 ,130,140,150,QUARTER_PI-.7, PI-1.4, OPEN);

//eyebrows
    stroke(58,26,20);
    noFill();
    arc(300, 208, 60, 60, HALF_PI, PI-0.7);
    stroke(58,26,20);
    noFill();
    arc(210, 200, 60, 60, PI-2.1, PI-1.2);
}

function draw() {
}

In order to create this sketch, I decided to block out my face into basic shapes that I would be able to recreate with code. I began with a simple ellipse and moved on to create the expression and the hair. I used a lot of trial and error (especially for the arc objects) for the placement, sizes, and angles while trying to stick to a minimal color palette.