Minecraft is probably one of the most well-known and well-experienced examples of generative art. A terrain generated by its algorithm can grow until it can fit the entirety of your computer’s hard drive, which is easily greater than the surface area of our planet. Each new section generated is also unique; though they follow easily understood patterns and rules, every generated section is a new area for exploration, with a random distribution of resources and dangers. The idea is to emulate the natural world, and despite the distinctive blocky graphic style, the feel of a natural world created out of fundamental forces is achieved.
Category: Section A
Yiran Xuan Project-02-Variable-Face
This sketch was made by adapting the template. The rectangular face and many other elements are centered on the canvas by frequent use of the canvas dimensions (stored as variables) divided by half, in the shape parameters.
var noseheight = 150
var nosewidth = 50;
var facewidth = 200;
var faceheight = 150;
var eyesize = 20;
var eyedistance = 100;
var eyecolor = 0;
var canvasheight = 640;
var canvaswidth = 480;
function setup() {
createCanvas(canvaswidth, canvasheight );
}
function draw() {
background(180);
fill(100);
//draw the face;
rect((canvaswidth-facewidth)/2, (canvasheight-faceheight)/2, facewidth, faceheight);
//draw the eyes
fill(eyecolor);
ellipse((canvaswidth - eyedistance)/2, 300, eyesize, eyesize);
ellipse((canvaswidth + eyedistance)/2, 300, eyesize, eyesize);
//draw the nose
fill(100);
triangle((canvaswidth - nosewidth)/2, canvasheight/2, (canvaswidth + nosewidth)/2, canvasheight/2, canvaswidth/2, noseheight);
//draw the mouth
line(canvaswidth/2-50, (canvasheight+faceheight)/2 - 50, canvaswidth/2+50, (canvasheight+faceheight)/2 - 50);
}
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.
eyecolor = random(0, 255);
eyesize = random(10, 30);
eyedistance = random(75, 125);
nosewidth = random(30, 70);
noseheight = random(canvasheight/2 - 20, canvasheight/2 + 20);
}
Katie Polhemus – Looking Outwards – 02
After scrolling through some of the sources provided, I became most inspired by the Dancing Robots installation at Cinder Gallery. The piece is inspired by the robotic arms producing cars at the Chrysler plant in Detroit, MI. I find it fascinating that the artists were able to produce such an abstract, thought provoking work of art out of something so mundane, materialistic, and consumer-driven.
The artists used their own custom hardware to detect vibrations in the sculpture, and their own custom application to add new points to triangles on any location of the projection. This allowed the artists to “dynamically change the projection configuration.”
This piece ties into this week’s theme of generative art by the fact that it is an interactivity-based sculpture. The audience is encouraged to listen to the music being played and to touch the sculpture; resulting, the live projections shift, and the music becomes “more immersive.”
Katie Polhemus Project 02 variables face
/*
Katie Polhemus
Section A
kpolhemu@andrew.cmu.edu
project-02
*/
//pup face variables
//background colors
var cR = 230;
var cG = 114;
var cB = 154;
//ears
var earsSize = 150
//head
var headWidth = 320;
var headHeight = 240;
//eyes
var eyesSize = 30
//snout
var snoutWidth = 350;
var snoutHeight = 180;
//nose
var noseSize = 50
//nose line
var noseLine = 10
//mouth
var mouthSize = 50
function setup() {
createCanvas(640, 480);
}
function draw() {
noStroke();
background(cR, cG, cB);
//left ear
fill(145, 130, 99);
ellipse(width/2 - noseSize * 2, height/2 + noseSize, earsSize, earsSize * 2);
//right ear
fill(145, 130, 99);
ellipse(width/2 + noseSize * 2, height/2 + noseSize, earsSize, earsSize * 2);
//head
fill(154, 142, 109);
ellipse(width/2, height/2, headWidth, headHeight);
//eyes
fill(0);
var eyeLX = width / 2 - headWidth * 0.25
var eyeRX = width / 2 + headWidth * 0.25
ellipse(eyeLX, height/2 - eyesSize, eyesSize, eyesSize * 2);
ellipse(eyeRX, height/2 - eyesSize, eyesSize, eyesSize * 2);
//snout
fill(74, 61, 35);
ellipse(width/2, height/2 + noseSize, snoutWidth, snoutHeight);
//nose
fill(0);
ellipse(width/2, height/2, noseSize, noseSize);
//nose line
stroke(0);
strokeWeight(noseLine);
line(headWidth, headHeight, headWidth, headHeight + eyesSize);
//mouth
fill(0);
arc(width/2, height/2 + mouthSize, mouthSize, mouthSize * 2, 0, PI);
}
function mousePressed() {
cR = random(210, 250);
cG = random(100, 130);
cB = random(130, 170);
mouthSize = random(30, 70);
earsSize = random(130, 170);
eyesSize = random(25, 40);
}
Initially, my love for dogs motivated me to draw a dog’s face instead of a human’s, and ultimately, I found it much easier to draw a dog’s face than a human’s (based on project-01.) I think dogs can be very expressive, and I tried to convey that with movement of the eyes, ears, and mouth.
Project – 02 Min Lee
/*
Min Lee
Section A
mslee@andrew.cmu.edu
Project-02
*/
//face
var faceWidth = 150
var faceHeight = 150
//use for nose and mouth color
var faceColorR = 255
var faceColorG = 216
var faceColorB = 209
//eyes
var eyeWidth = 25
var eyeHeight = 15
var eyeColor = 255
//eye positioning
var eyeX = 20
var eyeY = 15
//nose positioning
var noseY = 5
var noseHeight = 60
//mouth shape
var mouthWidth = 25
var mouthHeight = 15
var distance = 30
//font
var textPlacement = 0
//stars
var a = 50
function setup() {
createCanvas(640, 480);
background(141,189,193);
}
function draw() {
background(141,189,193);
noStroke();
//face shape
fill(faceColorR, faceColorG, faceColorB);
ellipse(width/2 ,height/2 , faceWidth, faceHeight);
rect(width/2 - faceWidth/2, height/2, faceWidth, height);
//eyebrows
fill(faceColorR/2, faceColorG/2, faceColorB/2);
ellipse(width/2 - eyeX, height/2 - eyeY, eyeWidth, eyeHeight);
ellipse(width/2 + eyeX, height/2 - eyeY, eyeWidth, eyeHeight);
//eyes
fill(0);
ellipse(width/2 - eyeX, height/2 - eyeY + 20, 10, 8);
ellipse(width/2 + eyeX, height/2 - eyeY + 20, 10, 8);
//nose
fill(faceColorR/4*3, faceColorG/4*3, faceColorB/4*3);
ellipse(width/2 - 7.5, height/2 + noseY/3*2, 10, 10);
ellipse(width/2 + 7.5, height/2 + noseY/3*2, 10, 10);
arc(width/2, height/2 + noseY, 15, noseHeight, PI, TWO_PI);
arc(width/2, height/2 + noseY - 1, 15, 10, 0, PI);
//mouth
fill(faceColorR/4*3, faceColorG/4*3, faceColorB/4*3);
arc(width/2, height/2 + noseY + distance, mouthWidth, mouthHeight, 0, PI);
fill(faceColorR/2, faceColorG/2, faceColorB/2);
arc(width/2 - mouthWidth/4, height/2 + noseY + distance, mouthWidth/2 + 5, mouthHeight, PI, TWO_PI);
arc(width/2 + mouthWidth/4, height/2 + noseY + distance, mouthWidth/2 + 5, mouthHeight, PI, TWO_PI);
//ears
fill(faceColorR, faceColorG, faceColorB);
arc(width/2 - faceWidth/2 + 1, height/2 + noseY/3* 4 + 5, 30, 40, HALF_PI, PI + HALF_PI);
arc(width/2 + faceWidth/2 - 1, height/2 + noseY/3* 4 + 5, 30, 40, PI + HALF_PI, HALF_PI);
fill(faceColorR/4*3, faceColorG/4*3, faceColorB/4*3);
arc(width/2 - faceWidth/2 + 1, height/2 + noseY/3* 4 + 5, 15, 20, HALF_PI, PI + HALF_PI);
arc(width/2 + faceWidth/2 - 1, height/2 + noseY/3* 4 + 5, 15, 20, PI + HALF_PI, HALF_PI);
//chin
stroke(faceColorR/4*3, faceColorG/4*3, faceColorB/4*3);
strokeWeight(2);
noFill();
beginShape();
curveVertex(width/2 - 10, height/2 + 50 + noseY + distance);
curveVertex(width/2 - 10, height/2 + 50 + noseY + distance);
curveVertex(width/2 - 5, height/2 + 55 + noseY + distance);
curveVertex(width/2 + 5, height/2 + 55 + noseY + distance);
curveVertex(width/2 + 10, height/2 + 50 + noseY + distance);
curveVertex(width/2 + 10, height/2 + 50 + noseY + distance);
endShape();
//shirt
fill(0);
strokeWeight(1);
rect(width/2-faceWidth/2, height - 60, faceWidth, 60);
fill(faceColorR, faceColorG, faceColorB);
arc(width/2, height - 60, faceWidth, 40, 0, PI);
//moving text
noStroke();
fill('DarkCyan');
textSize(50);
textFont('Helvetica');
text('bald is beautiful.', textPlacement, 100);
textPlacement = textPlacement + 2
if (textPlacement > 640) {
textPlacement = -350
};
//stars
fill(255,215,0);
rect(width/4, height/4 * 3, 50, 50);
rect(width/2 + 100, height/4 + 20, 50, 50);
fill(141,189,193);
//bottom left star
arc(width/4, height/4 * 3, a, a, 0, HALF_PI);
arc(width/4 + 50, height/4 * 3, a, a, HALF_PI, PI);
arc(width/4, height/4 * 3 + 50, a, a, PI + HALF_PI, TWO_PI);
arc(width/4 + 50, height/4 * 3 + 50, a, a, PI, PI + HALF_PI);
//top right star
arc(width/2 + 100, height/4 + 20, a + 2.5, a + 2.5, 0, HALF_PI);
arc(width/2 + 150, height/4 + 20, a + 2.5, a + 2.5, HALF_PI, PI);
arc(width/2 + 100, height/4 + 70, a + 2.5, a + 2.5, PI + HALF_PI, TWO_PI);
arc(width/2 + 150, height/4 + 70, a + 2.5, a + 2.5, PI, PI + HALF_PI);
}
function mousePressed() {
faceWidth = random(130,170);
faceHeight = random(110,190);
faceColorR = random(141,255);
faceColorG = random(80,255);
faceColorB = random(36,170);
eyeX = random(20,30);
eyeY = random(20,30);
eyeWidth = random(15,25);
eyeHeight = random(10,15);
noseY = random(0, 20);
mouthWidth = random(20, 25);
mouthHeight = random(15,20);
distance = random(20,35);
a = random(50,60);
}
For my project, I wanted to create a message that resonates in my heart. While the variability in the faces that I created is not significant, I went for this effect to show that being a bald, green-skinned person does not make one any different than being a bald, orange-skinned person. Bald is beautiful, folks.
Liz Maday looking outwards 2
“Waves” (2016) by Austrian software artist LIA.
The work I chose to examine was “Waves” by Austrian software artist LIA. i was quickly drawn to this work by its peacefulness and calming nature. the sine wave patterns in this work are randomly generated, and don’t repeat, and upon learning this I associated something other than human with its beauty. Humans lack the ability to replicate random patterns, and tend to have flawed conceptions of what is truly “random.” The fact that this consistently random motion could only have been produced by a computer adds an additional level of awe and admiration for the program and artist that produced this installation. It is so enjoyable to just stare at this work and let it mesmerize you, in a way that is only possible through generative code.
Katherine Hua – Project 02 – Variable Face
/*
Katherine Hua
Section A
khua@andrew.cmu.edu
Project-02
*/
var x = 60;
var y = 120;
var z = 180;
var a = 240;
var b = 300;
var c = 360;
var d = 420;
var e = 3;
var f = 477;
var speed = 1;
var backgroundColorR = 250;
var backgroundColorG = 250;
var backgroundColorB = 250;
var eyeWidth = 30;
var eyeHeight = 30;
var pupilWidth = 5;
var pupilHeight = 5;
var skin = 30;
var lips = 0;
var hair = 0;
var brows = 0;
var cheekColorR = 245;
var cheekColorG = 195;
var cheekColorB = 194;
function setup() {
createCanvas(480, 640);
background(backgroundColorR, backgroundColorG, backgroundColorB);
}
function draw() {
//background
background(backgroundColorR, backgroundColorG, backgroundColorB);
ellipse(x, 80, 50, 50);
x += speed;
if (x > width + 25) {
x = -25;
}
ellipse(x, 160, 50, 50);
x += speed;
if (x > width + 25) {
x = -25;
}
ellipse(x, 240, 50, 50);
x += speed;
if (x > width + 25) {
x = -25;
}
ellipse(x, 320, 50, 50);
x += speed;
if (x > width + 25) {
x = -25;
}
ellipse(x, 400, 50, 50);
x += speed;
if (x > width + 25) {
x = -25;
}
ellipse(x, 480, 50, 50);
x += speed;
if (x > width + 25) {
x = -25;
}
ellipse(x, 560, 50, 50);
x += speed;
if (x > width + 25) {
x = -25;
}
//y
ellipse(y, 80, 50, 50);
y += speed;
if (y > width + 25) {
y = -25;
}
ellipse(y, 160, 50, 50);
y += speed;
if (y > width + 25) {
y = -25;
}
ellipse(y, 240, 50, 50);
y += speed;
if (y > width + 25) {
y = -25;
}
ellipse(y, 320, 50, 50);
y += speed;
if (y > width + 25) {
y = -25;
}
ellipse(y, 400, 50, 50);
y += speed;
if (y > width + 25) {
y = -25;
}
ellipse(y, 480, 50, 50);
y += speed;
if (y > width + 25) {
y = -25;
}
ellipse(y, 560, 50, 50);
y += speed;
if (y > width + 25) {
y = -25;
}
//z
ellipse(z, 80, 50, 50);
z += speed;
if (z > width + 25) {
z = -25;
}
ellipse(z, 160, 50, 50);
z += speed;
if (z > width + 25) {
z = -25;
}
ellipse(z, 240, 50, 50);
z += speed;
if (z > width + 25) {
z = -25;
}
ellipse(z, 320, 50, 50);
z += speed;
if (z > width + 25) {
z = -25;
}
ellipse(z, 400, 50, 50);
z += speed;
if (z > width + 25) {
z = -25;
}
ellipse(z, 480, 50, 50);
z += speed;
if (z > width + 25) {
z = -25;
}
ellipse(z, 560, 50, 50);
z += speed;
if (z > width + 25) {
z = -25;
}
//a
ellipse(a, 80, 50, 50);
a += speed;
if (a > width + 25) {
a = -25;
}
ellipse(a, 160, 50, 50);
a += speed;
if (a > width + 25) {
a = -25;
}
ellipse(a, 240, 50, 50);
a += speed;
if (a > width + 25) {
a = -25;
}
ellipse(a, 320, 50, 50);
a += speed;
if (a > width + 25) {
a = -25;
}
ellipse(a, 400, 50, 50);
a += speed;
if (a > width + 25) {
a = -25;
}
ellipse(a, 480, 50, 50);
a += speed;
if (a > width + 25) {
a = -25;
}
ellipse(a, 560, 50, 50);
a += speed;
if (a > width + 25) {
a = -25;
}
//b
ellipse(b, 80, 50, 50);
b += speed;
if (b > width + 25) {
b = -25;
}
ellipse(b, 160, 50, 50);
b += speed;
if (b > width + 25) {
b = -25;
}
ellipse(b, 240, 50, 50);
b += speed;
if (b > width + 25) {
b = -25;
}
ellipse(b, 320, 50, 50);
b += speed;
if (b > width + 25) {
b = -25;
}
ellipse(b, 400, 50, 50);
b += speed;
if (b > width + 25) {
b = -25;
}
ellipse(b, 480, 50, 50);
b += speed;
if (b > width + 25) {
b = -25;
}
ellipse(b, 560, 50, 50);
b += speed;
if (b > width + 25) {
b = -25;
}
//c
ellipse(c, 80, 50, 50);
c += speed;
if (c > width + 25) {
c = -25;
}
ellipse(c, 160, 50, 50);
c += speed;
if (c > width + 25) {
c = -25;
}
ellipse(c, 240, 50, 50);
c += speed;
if (c > width + 25) {
c = -25;
}
ellipse(c, 320, 50, 50);
c += speed;
if (c > width + 25) {
c = -25;
}
ellipse(c, 400, 50, 50);
c += speed;
if (c > width + 25) {
c = -25;
}
ellipse(c, 480, 50, 50);
c += speed;
if (c > width + 25) {
c = -25;
}
ellipse(c, 560, 50, 50);
c += speed;
if (c > width + 25) {
c = -25;
}
//d
ellipse(d, 80, 50, 50);
d += speed;
if (d > width + 25) {
d = -25;
}
ellipse(d, 160, 50, 50);
d += speed;
if (d > width + 25) {
d = -25;
}
ellipse(d, 240, 50, 50);
d += speed;
if (d > width + 25) {
d = -25;
}
ellipse(d, 320, 50, 50);
d += speed;
if (d > width + 25) {
d = -25;
}
ellipse(d, 400, 50, 50);
d += speed;
if (d > width + 25) {
d = -25;
}
ellipse(d, 480, 50, 50);
d += speed;
if (d > width + 25) {
d = -25;
}
ellipse(d, 560, 50, 50);
d += speed;
if (d > width + 25) {
d = -25;
}
//e
ellipse(e, 80, 50, 50);
e += speed;
if (e > width + 25) {
e = -25;
}
ellipse(e, 160, 50, 50);
e += speed;
if (e > width + 25) {
e = -25;
}
ellipse(e, 240, 50, 50);
e += speed;
if (e > width + 25) {
e = -25;
}
ellipse(e, 320, 50, 50);
e += speed;
if (e > width + 25) {
e = -25;
}
ellipse(e, 400, 50, 50);
e += speed;
if (e > width + 25) {
e = -25;
}
ellipse(e, 480, 50, 50);
e += speed;
if (e > width + 25) {
e = -25;
}
ellipse(e, 560, 50, 50);
e += speed;
if (e > width + 25) {
e = -25;
}
//f
ellipse(f, 80, 50, 50);
f += speed;
if (f > width + 25) {
f = -25;
}
ellipse(f, 160, 50, 50);
f += speed;
if (f > width + 25) {
f = -25;
}
ellipse(f, 240, 50, 50);
f += speed;
if (f > width + 25) {
f = -25;
}
ellipse(f, 320, 50, 50);
f += speed;
if (f > width + 25) {
f = -25;
}
ellipse(f, 400, 50, 50);
f += speed;
if (f > width + 25) {
f = -25;
}
ellipse(f, 480, 50, 50);
f += speed;
if (f > width + 25) {
f = -25;
}
ellipse(f, 560, 50, 50);
f += speed;
if (f > width + 25) {
f = -25;
}
//character shape
strokeWeight(5);
point(0, 640);
point(40, 440);
point(70,320);
point(150, 160);
point(300, 160);
point(380, 300);
point(420, 440);
point(480, 640);
strokeWeight(5);
fill(250-skin, 223-skin, 198-skin);
beginShape();
curveVertex(0, 640);
curveVertex(0, 640);
curveVertex(40, 440);
curveVertex(70, 320);
curveVertex(150, 160);
curveVertex(300, 160);
curveVertex(380, 300);
curveVertex(420, 440);
curveVertex(480, 640);
curveVertex(480, 640);
endShape();
beginShape();
curveVertex(120, 500);
curveVertex(120, 500);
curveVertex(170, 560);
curveVertex(210, 565);
curveVertex(170, 440);
curveVertex(150, 400);
curveVertex(150, 440);
endShape();
beginShape();
curveVertex(360, 500);
curveVertex(360, 500);
curveVertex(310, 560);
curveVertex(270, 565);
curveVertex(310, 440);
curveVertex(330, 400);
curveVertex(330, 440);
endShape();
//hair
if (hair < 1) {
fill(0, 0, 0)
arc(230, 280, 300, 300, PI, 0);
fill(250-skin, 223-skin, 198-skin);
noStroke();
quad(100, 280, 120, 230, 340, 230, 360, 280);
}
else if (hair < 2) {
fill(0, 0, 0)
arc(230, 280, 350, 300, PI, 0);
fill(250-skin, 223-skin, 198-skin);
noStroke();
quad(100, 280, 120, 230, 340, 230, 360, 280);
fill(0,0,0);
rect(52, 275, 50, 125, 5);
rect(358, 275, 50, 125 ,5);
}
else if (hair < 3) {
fill(0, 0, 0)
arc(230, 280, 290, 350, PI, 0);
ellipse(120, 120, 75, 75);
ellipse(340, 120, 75, 75);
fill(250-skin, 223-skin, 198-skin);
noStroke();
quad(100, 280, 120, 230, 340, 230, 360, 280);
}
else if (hair < 4) {
fill(0, 0, 0)
arc(230, 280, 290, 350, PI, 0);
ellipse(57, 280, 80, 50);
ellipse(403, 280, 80, 50);
fill(250-skin, 223-skin, 198-skin);
noStroke();
quad(100, 280, 120, 230, 340, 230, 360, 280);
}
//brows
if (brows < 1) {
stroke(0,0,0);
noFill();
arc(180, 275, 30, 30, PI+QUARTER_PI, -QUARTER_PI);
arc(270, 275, 30, 30, PI+QUARTER_PI, -QUARTER_PI);
}
else if (brows < 2) {
stroke(0,0,0);
noFill();
arc(180, 275, 30, 30, PI, PI+HALF_PI);
arc(270, 275, 30, 30, PI+HALF_PI, 0);
}
else if (brows < 3) {
stroke(0,0,0);
noFill();
arc(180, 275, 30, 30, PI+HALF_PI, 0);
arc(270, 275, 30, 30, PI, PI+HALF_PI);
}
else if (brows < 4) {
stroke(0,0,0);
noFill();
arc(180, 250, 30, 30, QUARTER_PI, HALF_PI+QUARTER_PI);
arc(270, 250, 30, 30, QUARTER_PI, HALF_PI+QUARTER_PI);
}
//eyes
//whites
fill(255);
ellipse(180, 300, eyeWidth, eyeHeight);
ellipse(270, 300, eyeWidth, eyeHeight);
//pupil
fill(0);
ellipse(180, 300, pupilWidth, pupilHeight);
ellipse(270, 300, pupilWidth, pupilHeight);
//lips
if (lips < 1) {
fill(244, 49, 33);
ellipse(225, 310, 40, 20);
ellipse(225, 300, 40, 15);
}
else if (lips < 2) {
fill(244, 49, 33);
ellipse(225, 310, 40, 20);
ellipse(225, 300, 40, 15);
fill(0);
ellipse(225, 307, 20, 5);
}
else if (lips < 3) {
fill(244, 49, 33);
ellipse(225, 310, 40, 20);
ellipse(225, 300, 40, 15);
fill(0);
ellipse(225, 307, 20, 5);
noFill();
arc(190, 310, 30, 30, PI+HALF_PI+QUARTER_PI, QUARTER_PI);
arc(260, 310, 30, 30, HALF_PI+QUARTER_PI, PI+QUARTER_PI);
}
else if (lips < 4) {
fill(244, 49, 33);
ellipse(225, 310, 40, 20);
ellipse(225, 300, 40, 15);
noFill();
arc(190, 310, 30, 30, PI+HALF_PI+QUARTER_PI, QUARTER_PI);
arc(260, 310, 30, 30, HALF_PI+QUARTER_PI, PI+QUARTER_PI);
}
//cheeks
fill(cheekColorR, cheekColorG, cheekColorB);
noStroke();
ellipse(140, 320, 40, 20);
ellipse(320, 320, 40, 20);
stroke(0,0,0);
}
function mousePressed() {
backgroundColorR = random(200, 255);
backgroundColorG = random(137, 255);
backgroundColorB = random(175, 255);
eyeWidth = random (30, 40);
eyeHeight = random(15, 30);
pupilWidth = random(1,7);
pupilHeight = random(1,7);
skin = random(1, 150);
lips = random(4);
hair = random(4);
brows = random(4);
cheekColorR = random(220, 255);
cheekColorG = random(180, 255);
cheekColorB = random(139, 255);
}
This character is inspired by one of my favorite visual artists, Ton Mak’s character, flabjacks. At first, I had a difficult time figuring out how to randomize characteristics such as the mouth, hair, and eyebrows because the it was not simply randomizing components such as width, height, and color. Finally, after a lot of trial and error, I figured out I could use the if, else if functions to accomplish what I wanted. This project also allowed me to become more familiar with the arc and curveshape functions.
Jonathan Liang – Project 02 – Variable Face
// Simple beginning template for variable face.
var eyeSize = 30;
var eyeHeight = 2.5 * eyeSize;
var eyeWidth = 2 * eyeSize;
var faceWidth = 300;
var faceHeight = 300;
var canvasWidth = 640;
var canvasHeight = 480;
var pupilWidth = 10;
var pupilHeight = 15;
var mouthStroke = 3;
var llWall = canvasWidth / 2 - eyeSize - pupilWidth;
var lrWall = canvasWidth / 2 - eyeSize + pupilWidth;
var rlWall = canvasWidth / 2 + eyeSize - pupilWidth;
var rrWall = canvasWidth / 2 + eyeSize + pupilWidth;
var tlWall = canvasHeight / 2 - eyeSize * 3 - eyeSize;
var blWall = canvasHeight / 2 - eyeSize * 3 + eyeSize;
var trWall = canvasHeight / 2 - eyeSize * 3 - eyeSize;
var brlWall = canvasHeight / 2 - eyeSize * 3 + eyeSize;
var mouthStart = 320;
var noseSize = eyeSize
var backgroundColor = 1;
var headColor = 1;
function setup() {
createCanvas(640, 480);
}
function draw() {
switch(backgroundColor){
case 1:
background('pink');
break;
case 2:
background('lime');
break;
case 3:
background(71, 170, 215);
break;
case 4:
background('magenta');
break;
case 5:
background('cyan');
break;
case 6:
background('orange')
break;
case 7:
background(237,204, 248);
break;
case 8:
background('yellow');
break;
}
//head
noStroke();
switch(headColor){
case 1:
fill(71, 170, 215);
break;
case 2:
fill('yellow');
break;
case 3:
fill('lime');
break;
case 4:
fill('red');
break;
case 5:
fill('orange');
break;
}
strokeWeight(3);
ellipse(canvasWidth / 2, canvasHeight / 2, faceWidth, faceHeight);
//white fills on face
noStroke();
fill('white');
ellipse(canvasWidth / 2, canvasHeight / 2 + eyeSize, faceWidth/1.25, faceHeight/1.25);
//eyes
ellipse(canvasWidth / 2 - eyeSize, canvasHeight / 2 - eyeSize * 3, 2 * eyeSize, 2.5 * eyeSize);
ellipse(canvasWidth / 2 + eyeSize, canvasHeight / 2 - eyeSize * 3, 2 * eyeSize, 2.5 * eyeSize);
//pupils
var xrL = constrain(mouseX, llWall, lrWall);
var xrR = constrain(mouseX, rlWall, rrWall);
var yrL = constrain(mouseY, tlWall, blWall);
var yrR = constrain(mouseY, trWall, brlWall);
noStroke();
fill('black');
ellipse(xrL, yrL, pupilWidth, pupilHeight);
ellipse(xrR, yrR, pupilWidth, pupilHeight);
//mouth
noFill();
stroke('black');
strokeWeight(mouthStroke);
line(canvasWidth / 2, canvasHeight / 2 - eyeSize * 1.6 + pupilHeight, canvasWidth / 2, mouthStart);
arc(canvasWidth / 2, mouthStart - faceWidth / 4, faceWidth * 0.65, faceWidth * 0.5, 0, PI, OPEN);
//left whiskers
line(canvasWidth / 2 - 1.75 * eyeWidth, canvasHeight / 2 - eyeSize * 1.6, canvasWidth / 2 - noseSize, canvasHeight / 2 - eyeSize * 1.6 + pupilHeight);
line(canvasWidth / 2 - 1.75 * eyeWidth, canvasHeight / 2 - eyeSize * 1.6 + pupilHeight * 2, canvasWidth / 2 - noseSize, canvasHeight / 2 - eyeSize * 1.6 + pupilHeight * 2);
line(canvasWidth / 2 - 1.75 * eyeWidth, canvasHeight / 2 - eyeSize * 1.6 + pupilHeight * 4, canvasWidth / 2 - noseSize, canvasHeight / 2 - eyeSize * 1.6 + pupilHeight * 3);
//right whiskers
line(canvasWidth / 2 + noseSize, canvasHeight / 2 - eyeSize * 1.6 + pupilHeight, canvasWidth / 2 + 1.75 * eyeWidth, canvasHeight / 2 - eyeSize * 1.6);
line(canvasWidth / 2 + 1.75 * eyeWidth, canvasHeight / 2 - eyeSize * 1.6 + pupilHeight * 2, canvasWidth / 2 + noseSize, canvasHeight / 2 - eyeSize * 1.6 + pupilHeight * 2);
line(canvasWidth / 2 + 1.75 * eyeWidth, canvasHeight / 2 - eyeSize * 1.6 + pupilHeight * 4, canvasWidth / 2 + noseSize, canvasHeight / 2 - eyeSize * 1.6 + pupilHeight * 3);
//nose and highlight
noStroke();
fill('red');
ellipse(canvasWidth / 2, canvasHeight / 2 - eyeSize * 1.6, noseSize, noseSize);
noStroke();
fill('white');
ellipse(canvasWidth / 2 - 1, canvasHeight / 2 - eyeSize * 1.63, pupilWidth, pupilWidth);
}
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(10, 250);
faceHeight = random(150, 250);
eyeSize = random(10, 40);
noseSize = random(10, 70);
backgroundColor = int(random(1,8));
headColor = int(random(1,5));
}
As a child, one of my favorite cartoons was Doraemon. I always wondered if there were more to the Doraemon family and if they were in different colors. I also took inspiration from a scene in Guardians of the Galaxy volume 2, I’m not gonna specify which scene.
YingyangZhou-LookingOutwards-2
Client: In collaboration with JAC studios & No Parking and supported by the Esbjerg Municipality
Location: Wadden Sea Visitor Centre, Vester Vedsted, Denmark
Year: 2017
In 2014 Jason Bruges Studio won the competition, in collaboration with JAC Studios, to create an immersive installation that represents the 12 million migratory birds and the unique landscape of the Nationalpark. Digital Ornithology is the last sequence of the exhibition, which follows a journey of exploration and discovery of the native birds, to being fully immersed in their unique habitat and behaviours. The space allows visitors to be at eye height and experience the take off and landings at close proximity, thereby amplifying the presence of the birds. The installation is comprised of 562 LCD screens suspended from the ceiling in a sequence that represents the migration of the birds. With an amalgamation of projection mapping of live footage and the light-modulating behaviour of the LCD’s, the result is an ephemeral and captivating acquaintance.
This is a very neat project which has no extra unnecessary information, but still you can immerse yourself in it by simple light, shadow and sound. It has strong intent of raising the awareness of protecting creatures by looking into the way they live closer than we usually.
Yingyang Zhou-Project-02-Variable-Face
//Yingyang Zhou
//Section A
//yingyanz@andrew.cmu.edu
//Project-02-A
var faceWidth =235;
var eyebrow = 8;
var mouth = 20;
var nose = 30;
var eyeSize = 20;
var neck = 150;
var shoulder = 450;
var noseR = 200;
var noseG = 100;
var noseB = 100;
var hairR = 130;
var hairG = 120;
var hairB = 110;
var shoulderCurve = 50;
function setup() {
createCanvas(600, 600);
background(208, 142, 44);
}
function draw() {
//face
fill(255);
noStroke();
ellipse(width/2, width/3, faceWidth, 1.2*faceWidth);
//neck
rect(width/2 - neck/4, height/2, neck/2, neck);
//shoulder
fill(147, 91, 4);
rect(width/2 - shoulder/2, width - shoulder/3, shoulder, shoulder/2, shoulderCurve);
//eye
fill(0);
ellipse(225, 141, eyeSize, eyeSize);
ellipse(290, 156, eyeSize, eyeSize);
//nose
noStroke();
fill(noseR, noseG, noseB);
triangle(217, 210, 217+nose/2, 210-nose, 210+nose/2, 210);
//hair
fill(hairR, hairG, hairB);
noStroke();
beginShape();
curveVertex(270, 290);
curveVertex(270, 370);
curveVertex(196, 395);
curveVertex(175, 220);
curveVertex(220, 80);
curveVertex(325, 25);
curveVertex(438, 80);
curveVertex(466, 421);
curveVertex(317, 423);
curveVertex(347, 131);
curveVertex(301, 72);
curveVertex(190, 198);
curveVertex(208, 274);
curveVertex(270, 290);
curveVertex(270, 375);
curveVertex(270, 377);
endShape();
//mouth
ellipse(225, 250, mouth, mouth/3)
}
function mousePressed(){
eyeSize = random(5, 20);
noseR = random(0, 255);
noseG = random(0, 255);
noseB = random(0, 255);
hairR = random(0, 255);
hairG = random(0, 255);
hairB = random(0, 255);
}
I started using CurveVertex in this project and turn out a very smooth curve.
Hair color, mouth color and size of eyes and nose are changing with every click. I had a lot of fun in this.