mjnewman Project-02 Variable Faces, Section A

project-02-variable

//Meredith Newman
//Section A
//mjnewman@andrew.cmu.edu
//Project-02-Variable Face

//snout components
var nostril = 50;
var snoutWidth = 200;
var snoutHeight = 150;

//eye components
var eyeSize = 50;
var white = 70;
var eyeDist = 300;

//ear components
var earX = 90;
var earY = 35;

//colors
var colorR = 232;
var colorG = 103;
var colorB = 183;


function setup() {
    createCanvas(640, 480);
}
 
function draw() {
    background(colorR, colorG, colorB);
    noStroke();

    //snout 
    fill(colorB, colorG, colorR);
    ellipse(width / 2, height * 0.60, snoutWidth,  snoutHeight);

    //nose holes
    var noseLX = width / 2 - snoutWidth * 0.25;
    var noseRX = width / 2 + snoutWidth * 0.25;
    fill(colorG, colorR, colorG);
    ellipse(noseLX, height * 0.60, nostril, nostril);
    ellipse(noseRX, height * 0.60, nostril, nostril);

    //whites behind eyes
    var eyeLX = width / 2 - eyeDist / 2;
    var eyeRX = width / 2 + eyeDist / 2;
    fill(255);
    ellipse(eyeLX, height * 0.30, white, white);
    ellipse(eyeRX, height * 0.30, white, white);

    //eyes
    var eyeLX = width / 2 - eyeDist / 2;
    var eyeRX = width / 2 + eyeDist / 2;
    fill(colorG, colorR, colorG);
    ellipse(eyeLX, height * 0.30, eyeSize, eyeSize);
    ellipse(eyeRX, height * 0.30, eyeSize, eyeSize);

    //ears
    fill(colorR - 30, colorG - 30, colorB - 30);
    //left
    triangle(earX, earY, earX + 60, earY + 40, earX - 20, earY + 80);
    //right
    triangle(earX + 460, earY, earX + 400, earY + 40, earX + 480, earY + 80);

    //oink text
    textSize(60);
    text("oink", 50, 450);
    fill(0, 102, 153);
}
 
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.
    colorR = random(1,255);
    colorG = random(1,255);
    colorB = random(1,255);
    eyeSize = random(30,50);
    eyeDist = random(250,300);
    earX = random(90,110)
    earY = random(25,35);
    snoutWidth = random(75, 150);
    snoutHeight = random(75, 100);
    nostril = random(10, 30);
}

 

For the project this week, I could definitely tell the prompts are becoming much more complicated. The random functions required a lot more trial and error than the previous assignments. But the recurrent theme across the two projects is that it’s hard to determine what to do creatively. I want it to be interesting enough for me to make as well as for people to use, but still keep in mind the constraints I have as a novice coder.

I chose to approach this project with the principle of gestalt in mind. I wanted to try to use as few elements as possible to suggest the face of a pig. I drew inspiration from some sketches Henri Matisse did that show the general visual of a face (below).

mjnewman LookingOutwards-02, Section A

Roman Verostko is an American artist, who uses code and machinery to create meticulous flowing forms on paper. Verostko has produced works like Cyberflower VII (2000)

OLYMPUS DIGITAL CAMERA

using a pen attached on a point plotter powered by algorithms coded on the computer. What drew me (pun intended) to Verostko’s work is the effort he took to convert digital products into the physical ultimately creating an organic form constructed of many delicate, yet precise lines all through machinery. He first learned how to create form through algorithms with FORTRAN in 1970. He now uses elementary BASIC with DMPL to drive a Houston Instruments plotter (with inkwell pen attached) hooked up to a PC in order to translate the digital into physical. Verostko initially turned to art of the early 20th century for inspiration. He is specifically drawn to the “pure form” that artists such as Suprematist Kazimir Malevich and De Stijl artist Piet Mondrian were able to capture in their paintings. It personally makes sense to me that someone interested in algorithms to create artwork would be attracted to the simple and mathematical approach painters like Malevich and Mondrian had with their paintings. This video below demonstrates the precision and care Verostko places on his work, similar to his inspirations.

 

 

 

mjnewman Project-01-Face

sketch

function setup() {
    createCanvas(600,600);
    background(199,75,155);
}

function draw() {

	//hair
	noStroke();
	fill(72,52,18);
	ellipse(295,286,275,275);
	rect(157,278,276,197);
	ellipse(297,442,303,169);

	//body
	noStroke();
	fill(91,114,182);
	rect(123,479,342,180,60);
	
	//neck
	noStroke();
	fill(221,212,161);
	ellipse(295,477,140,140);
	rect(225,430,140,53);

	//head
	noStroke();
	fill(238,232,184);
	ellipse(296,292,211,184);
	rect(191,280,210,90);
	ellipse(296,375,210,210);

	//undereye circles
	noStroke();
	fill(203,190,220);
	ellipse(243,317,45,45);
	ellipse(343,317,45,45);
	fill(238,232,184);
	rect(200,289,189,31);

	//eyes
	noStroke();
	fill(48,162,102);
	ellipse(250,312,35,35);
	ellipse(335,312,35,35);

	//mouth
	stroke(222,141,187);
	strokeWeight(9)
	line(254,415,335,415)

	//nose
	noFill();
	stroke(216,208,158);
	strokeWeight(5);
	arc(294,355,40,40,125,29);

	//earrings
	noStroke();
	fill(229,205,59);
	ellipse(186,357,21,21);
	ellipse(404,357,21,21);

	//hair part
	noStroke();
	fill(238,232,184);
	rect(289,172,12,43);

	//eyebrows
	stroke(72,52,18);
	strokeWeight(10);
	line(212,284,268,279);
	line(317,270,375,282);
}

In order to prepare for this first project, I made sure to do the Mondrian assignment first to get familiar with the language. I have previously taken an Intro to Web Design, where I learned HTML and CSS, so I was slightly surprised how closely related the three languages are.

My first step was to draw out a rough estimate of my face with primitive shapes that I knew I would be able to recreate in Javascript. I had some trouble designing and then recreating the nose, but I’m not mad at how it turned out. I also thought it would be more fun to do an expression that wasn’t happy because a majority of my day is not spent smiling (but in the best way possible).

Initial Sketch made on Illustrator

mjnewman LookingOutwards-01

Patatap is a website created in 2014 (previously a concert piece as far back as 2012) that uses the keyboard of the user’s computer to play corresponding sounds to each key. In addition, the developer, Jono Brandel, teamed up with Lullatone, a Japanese musical duo, to come up with fun and unique sounds for each key. What I admire most about this project is that it goes beyond a simple beat making website, it also uses animated graphics to go along with each sound and allows the user to have a synesthetic experience.

There might be an opportunity in the future to possibly add tutorials on the website for musical novices like myself, who don’t necessarily understand music as well as others. However, overall, Patatap uses color and shapes in a whimsical and entertaining way that it is able to achieve the goal of a fun and inspiring toy on the Internet that doesn’t take itself too seriously. According to Brandel’s portfolio site, he was inspired by painters such as Piet Mondrian and Wassily Kandinsky and animators Norman McLaren and Oskar Fischinger and to me that inspiration was evident in his treatment of the product.

After some digging, I was not able to find the exact information as to how Brandel made the website. However, I don’t think it’s totally off the table that Brandel was able to make Patatap with Javscript. He uses simple animations, shapes, lines, and points to construct the visual elements of the website that are involved with Javascript.

Here are some examples of beats users were able to make: