Lydia Jin Project-02-Variable Face

sketch


var eyeSize = 20;
var faceWidth = 100;
var faceHeight = 150;
var mouthsize=30;
var nosesize=20;
var eyecolor=0;
var colorR=20;
var colorG=20;
var colorB=20;
var light1=20;
var light1X=10;
var light1Y=10;
var light2=50;
var light2X=250;
var light2Y=20;
var light3=100;
var light3X=400;
var light3Y=300;

function setup() {
    createCanvas(640, 480);
}
 
function draw() {
    background(colorR,colorG,colorB);
    fill(243,215,198);
    ellipse(width / 2, height / 2, faceWidth,  faceHeight);
    //face
    fill(0);
    rect(width/2-15,height/2-faceHeight/2,30,40);
    //hair
    var eyeLX = width / 2 - faceWidth * 0.25;
    var eyeRX = width / 2 + faceWidth * 0.25;
    fill(eyecolor);
    ellipse(eyeLX, height / 2-15, eyeSize, eyeSize);
    ellipse(eyeRX, height / 2-15, eyeSize, eyeSize);
    //eyes\
    fill(247,196,152);
    ellipse(width/2,height/2,eyeSize-5,eyeSize+5);
    //nose
    fill(232,0,0);
    ellipse(width/2,height/2+50,nosesize,nosesize);
    //mouth
    fill(200);
    rect(width/2-faceWidth/2,height/2+faceHeight/2,faceWidth,200);
    //shirt (body)
    fill(163,98,81);
    ellipse(width/2,height/2+faceHeight/2+50,10);
    ellipse(width/2,height/2+faceHeight/2+100,10);
    //buttons
    fill(255,colorR,colorG,colorB);
    ellipse(light1X,light1Y,light1);
    ellipse(light2X,light2Y,light2);
    ellipse(light3X,light3Y,light3);
    //party lights

}
 
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(100, 200);
    faceHeight = random(150, 200);
    eyeSize = random(10, 30);
    mouthsize=random(10,50);
    nosesize=random(10,30);
    eyecolor=random(0,150);
    colorR=random(0,255);
    colorG=random(0,255);
    colorB=random(0,255);
    light1=random(0,200);
    light2=random(100,200);
    light3=random(0,80);
    light1X=random(0,50);
    light1Y=random(0,480);
    light2X=random(400,600);
    light2Y=random(0,480);
    light3X=random(420,600);
    light3Y=random(200,480)
}

This is Sushi Head Man at a party.

owen fox looking outwards 2

François Morellet
Random Distribution of 40,000 Squares Using the Odd and Even Numbers of a Telephone Directory
1960

I like this painting because it’s so abstract, it suggests shapes and textures when you first look at it, and then when you look at it again completely different shapes and textures appear.

Morellet created this work with a simple physical algorithm. He divided the canvas into a giant grid, and colored the squares on the grid red or blue based on the numbers his wife read to him aloud from a phone book. This work captures Morellet’s interest in the iterative, and the random, and especially his interest in combining scientific/numerical processes with art.

Project-02-Varying faces

sketch

//Sihan Dong
//sihand@andrew.cmu.edu
//Section B
//this program generates different faces of yound women


//setting up the variables and the default image (no mouse pressed)
var headpar = 150;
var mouthpar = 20;
var neckl = 50;
var bodwidth = 130;
var bodheight = 600;
var bulbstroke = 0;
var browarch = 40;
var eyestroke = 7;
var eyeht = 250;
var vertexX = 350;
var vertexY = 100;
var noi = 5;

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

function draw() {
  background(245,231,146);//creating the notebook effect
  var noteline1 = color(212,201,140);
  stroke(noteline1);
  line(0,40,480,40);
  line(0,80,480,80);
  line(0,120,480,120);
  line(0,160,480,160);
  line(0,200,480,200);
  line(0,240,480,240);
  line(0,280,480,280);
  line(0,320,480,320);
  line(0,360,480,360);
  line(0,400,480,400);
  line(0,440,480,440);
  line(0,480,480,480);
  line(0,520,480,520);
  line(0,560,480,560);
  line(0,600,480,600);
  var noteline2 = color(195,159,105);
  stroke(noteline2);
  line(80,0,80,640);
  line(85,0,85,640);

  var ballpt = color(52,57,136);//created the doodle face
  noFill();
  stroke(ballpt);
  strokeWeight(5);
  ellipse(290,250,headpar,1.25*headpar);//headshape
  ellipse(290-headpar/2+70,280,mouthpar,mouthpar);//mouthshape

  line(290,250+1.25*headpar/2,290, 250+1.25*headpar/2+neckl);//neckline_1
  line(290+noi,250+1.25*headpar/2,290+noi, 250+1.25*headpar/2+neckl);//neckline_2

  ellipse(290,250+1.25*headpar/2+neckl+bodheight/2,bodwidth,bodheight);//body
  ellipse(290,250+noi+1.25*headpar/2+neckl+bodheight/2,bodwidth-noi,bodheight-noi);

  arc(250,230,browarch,browarch,PI+QUARTER_PI, TWO_PI-QUARTER_PI);//left brow
  arc(320,230,browarch,browarch,PI+QUARTER_PI, TWO_PI-QUARTER_PI);//right brow

  strokeWeight(eyestroke);//eyes
  line (235,eyeht,255,eyeht);
  line (315,eyeht,335,eyeht);

  //a bulb will appear when the person gasps, so will the eyes open up
  // have fun clicking! :D
    if (mouthpar>35) {
      bulbstroke = 3;
      eyestroke = 25;
      strokeWeight(2);
      textSize(20);
      text("Eureka!",vertexX-150,vertexY-20);
      noFill();
      stroke(ballpt);//the bulb will not appear if the mouth is not open wide enough
      strokeWeight(bulbstroke);
      beginShape();
      vertex(vertexX,vertexY);
      vertex(vertexX+15,vertexY);
      vertex(vertexX+15,vertexY+20);
      vertex(vertexX, vertexY+20);
      endShape(CLOSE);
      line(vertexX,vertexY+10,vertexX+15,vertexY+10);
      ellipse(vertexX+15/2, vertexY-25,50,50);//the outer ellipse
      ellipse(vertexX+15/2, vertexY-15,15,30);//the inner ellipse
    }
    if (mouthpar<35) {
      bulbstroke = 0
      eyestroke = 7;
    }
}

//generating doodles
function mousePressed() {
  headpar = random(130,180);
  mouthpar = random(10,40);
  neckl = random (40,60);
  bodwidth = random (100,200);
  browarch = random (35,45);
  noi = random (-15,15);
  eyeht = random(245,255);
  //the light bulb shows up around the figure's head
  vertexY = random (80,120);
  vertexX = random (150,400);

}

This project was inspired by the ballpoint doodles I used to draw on my notes. I recreated the notebook background and the stroke color according to an online picture. A user can play with the doodle by clicking until the light bulb appears, signifying the “eureka” moment.

Owen Fox generative faces

generative-faces

//Owen Fox
//Section C
//olf@andrew.cmu.edu
//generative faces
var rectX = 300;
var rectY = 300;
var eyeX = 100;
var eyeY = 50;
var eyeball = 20;
var mW = 100;
var mH = 20;
var n = 25

function setup() {
    createCanvas(600, 600);
}

function draw() {
    var w = width/2;
    var h = height/2;
    background(120);
    //head
    fill("#ff0080");
    rectMode(CENTER);
    noStroke();
    rect(w,h,rectX,rectY);
    //eyes
    fill("#ffe6f2");
    ellipse(w-100,h,eyeX,eyeY);
    ellipse(w+100,h,eyeX,eyeY);
    //eyeballs
    fill("#660033");
    ellipse(200,300,eyeball,eyeball);
    ellipse(400,300,eyeball,eyeball);
    //nose
    fill("#e60073")
    quad(w-n,h-2*n,w+n,h-2*n,w+2*n,h+2*n,w-2*n,h+2*n);
    fill("#b30059");
    quad(w-n,h-2*n,w,h-2*n,w,h+2*n,w-2*n,h+2*n);
    //mouth
    fill("#ff99cc");
    rect(width/2,height/2+rectY/3,mW,mH,mH/2);

}

function mousePressed() {
    rectX = random(150, 450);
    rectY = random(150, 450);
    eyeX = random (50,150);
    eyeY = random (25,75);
    eyeball = random (10,30);
    n = random (15,35);
    mW = random (75,125);
    mH = random (15,35);
}

Sarah Ransom Looking Outwards-02

Quayola – Pleasant Places/Familiar Landscapes – 2015

This project stuck out to me as soon as I came across the artists page from the list provided in the assignment. The artist uses, or rather plays with, image-analysis and manipulation algorithms to turn candid landscape photos into works of art not far removed from the work of Van Gogh himself. The project was initially inspired by the 17th century landscape prints by Van Gogh and I feel like they could not have done a more complete job of capturing his style. The artist uses custom software to reduce Ultra-High-Definition film/images from landscapes with detailed texture to two-dimensional masses of volume, thus creating the sweeping brush strokes you might see in a painting. What I think is the most inspiring aspect of this project is that by simply creating/playing with image-analysis and manipulation algorithms applied to videos and images of landscapes they can almost exactly replicate the color schemes and even brush strokes of a successful artist from so long ago. The videos, in particular, show exactly what you might see if you brought an authentic Van Gogh painting to life.

Quayola – Pleasant Places/Familiar Landscapes

TamiTedesco-Project-01-Face

Eyyy so this is my self-portrait:

tami-self-portrait.js

function setup() {
    createCanvas(500, 500);
    background('#B7DAF4');

}

function draw() {

//head
	fill('#FFDFC8');
	noStroke();
	ellipse(250, 200, 180, 200);

//ears
	fill('#FFDFC8');
	noStroke();
	ellipse(165, 230, 40, 50);

	fill('#FFDFC8');
	noStroke();
	ellipse(335, 230, 40, 50);

//hair
	fill('#8a1B00')
	triangle(160, 170, 160, 210, 225, 170);
	triangle(225, 170, 342, 170, 342, 210);

//hat
	fill('#000a5F');
	rect(120, 150, 220, 20);

	fill('#000a5f');
	noStroke();
	arc(250, 170, 184, 170, PI, 0, CHORD);

//face
	//L
	fill(51);
	ellipse(210, 210, 10, 25);
	//R
	fill(51);
	ellipse(290, 210, 10, 25);
	//mouth
	fill('#FF556E');
	triangle(230, 240, 250, 270, 270, 240);

//body
	fill('#FFDFC8');
	rect(235, 295, 30, 20);

	//shirt
	fill('#000000');
	rect(195, 315, 110, 300);
	//sleeves
		//L
		triangle(175, 330, 195, 315, 195, 330);
		rect(175, 330, 20, 65);
		//R
		triangle(305, 330, 305, 315, 325, 330);
		rect(305, 330, 20, 65);
	//arms
	fill('#FFDFC8');
	rect(178, 395, 18, 105);
	rect(303, 395, 18, 105);

}

I decided to make the design as simple as possible to mitigate any weirdness I’d have to deal with, though I didn’t do an actual sketch beforehand. I kind of just made a mental image and then eyeballed where all the shapes should go. I’ve never coded anything before this class, so for a first try at making something nice I think this came out pretty ok!

SadieJohnson- Looking Outwards- 02

screen-shot-2016-09-09-at-8-31-14-pm

David McLeod’s project “Polymorphism” is a set of videos testing the aesthetics of hypothetical objects in a state of flux. This project is inspirational not only because it is an impressive technological feat, but because McLeod manages to maintain his distinctive art style in a computer program with an element of randomness. Very little information was released about this piece, but the forms pictured seem to be many small spheres that transform to other textures when clustered together, which shoots the pieces apart and starts the cycle anew. McLeod’s artistic sensibilities focus on unrealistic textures that can only be computer-generated, giving the illusion of super-shiny rubber or long, soft hair. Although his forms are simple, he is also a master of graphical composition and uses bright, bold, trendy colors. All of these elements have come across in “Polymorphism”, making it an impressive technical feat.

Project-02-Face

sketch

//Jihoon Park
//Section A
//jihoonp@andrew.cmu.edu
//Project-02

var hairSpike = 100;
var skinColorR = 194;
var skinColorG = 141;
var cheekBone = 480;
var chinLength = 420;
var noseLength = 150;
var eyeX = 20;
var eyeY = 20;
var smileFactor = 350;


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

function draw() {
	background(165, 170, 247);
	//creates blue background
//HAIR
    noStroke();
    fill("yellow");
    beginShape();
    curveVertex(200, 200);
    curveVertex(200, 200);
    curveVertex(hairSpike, 50);
    curveVertex(200, 70);
    curveVertex(hairSpike+170, 10);
    curveVertex(305, 40);
    curveVertex(hairSpike+240, 5);
    curveVertex(350, 70);
    curveVertex(hairSpike+430, 30);
    curveVertex(500, 80);
    curveVertex(hairSpike+530, 140);
    curveVertex(200, 200);
    curveVertex(200, 200);
    endShape(CLOSE);
    //defines protruding points of hair

//bust
	noStroke();
	fill(200, 110, 40);
	beginShape();
	curveVertex(80, 480);
	curveVertex(80, 480);
	curveVertex(110, 410);
	curveVertex(300, 380);
	curveVertex(410, 410);
	curveVertex(550, 480);
	endShape(CLOSE);
	//draws bust

//FACE
	noStroke();
	fill(skinColorR, skinColorG, 159); 
	//defines skin color with a set blue value
	
	beginShape();
	curveVertex(240, 150);
	curveVertex(240, 150);
	curveVertex(300, 50);
	curveVertex(360, 100);
	curveVertex(cheekBone, 200);
	curveVertex(400, 300);
	curveVertex(300, chinLength); //defines lower end point of chin
	curveVertex(240, 380);
	curveVertex(noseLength, 200); //defines nose length
	curveVertex(240, 150);
	curveVertex(240, 150);
	endShape();
	//draws facial contour

	stroke(skinColorR/2, skinColorG/2, 159);
	strokeWeight(4);
	beginShape();
	curveVertex(240, 380);
	curveVertex(240, 380);
	curveVertex(noseLength, 200);
	curveVertex(300, 90);
	curveVertex(300, 90);
	endShape();
	//draws line around the nose

//EYES
	noStroke();
	fill(255);
	ellipse(300-(eyeX/2), 90, eyeX, eyeY);
	ellipse(300+(eyeX/2), 90, eyeX, eyeY);
	fill(0)
	ellipse(300-(eyeX/2), 90, 10, 10);
	ellipse(300+(eyeX/2), 90, 10, 10);
	//defines the size of eyes

//MOUTH
    stroke(255, 180, 0);
    fill(255, 100, 0);
    triangle(230, 300, smileFactor, 350, 310, smileFactor);
    //defines two poins of triangular mouth	
}

function mousePressed() {
	hairSpike = random(50, 150);
	skinColorR = random(0, 255);
	skinColorG = random(0, 255);
	cheekBone = random(400, 500);
	chinLength = random(400, 460);
	noseLength = random(70, 200);
	eyeX = random(10, 60);
	eyeY = random(10, 40);
	smileFactor = random(270, 380);
}

For this project, I tried to practice as much freedom I can with making the portrait. Compared to the first project, I now had a grasp of what JavaScript could manage to do, and expressed it with the random features of the “Ever-changing man”

Sarah Ransom Project-02-Variable-Face

sketch

//Sarah Ransom
//Section C 
//sransom@andrew.cmu.edu
//Self Portrait

var lefteyeHeight = 20
var righteyeHeight = 20
var faceHeight = 220
var noseHeight = 30
var mouthWidth = 30



function setup() {
    createCanvas(640, 480);
    background(255,204,150);
}

function draw() {
	noStroke();
	fill("brown");
	ellipse(200,280,60,300); //ponytail in the background

	noStroke();
	fill(255, 240, 173);
	ellipse(200,250,200,faceHeight); //face
	
	noStroke();
	fill("brown");
	arc(200, 230, 200, 180, PI, TWO_PI, OPEN); //bangs

	noStroke();
	fill("brown");
	ellipse(200,140,50,50); //"ponytail bump"

	noStroke();
	fill('#222222');
	ellipse(160,250,lefteyeHeight,30); // left eye

	noStroke();
	fill('#222222');
	ellipse(240,250,righteyeHeight,30); // right eye

	noStroke();
	fill("red");
	arc(200,280,noseHeight,40,0,PI); // nose

	noFill();
	stroke(0);
	strokeWeight(3);
	arc(210,320,mouthWidth,10,0,HALF_PI); //mouth

	noFill();
	stroke(0);
	strokeWeight(2);
	arc(160,265,20,7,0,PI); // left eye bag

	noFill(); // right eye bag
	stroke(0);
	strokeWeight(2);
	arc(240,265,20,7,0,PI);
}

function mousePressed() {
	lefteyeHeight = random(10,50);
	righteyeHeight = random(10,50);
	noseHeight = random(20,40);
	mouthWidth = random(10,70);
	

}

I wanted to avoid changing the head size since it fit perfectly with the hair so, instead, I went for making the facial features as variable as possible without changing their original colors. This resulted in eyes that change size independently of each other as well as the width of the nose and mouth changing at random.

Alison Hoffman – Project 2

sketch-89.js

//Alison Hoffman
//Section D
//achoffma@andrew.cmu.edu
//Project 2

var head_w1 = 240; // x coordinate of the face, left
var head_w2 = 460; // x coordinate of the face, right
var top_h = 72; // top of the head
var head_h = 60; // head height y coordinate 
var jaw_w1 = 260; // x coordinate of jaw, left
var jaw_w2 = 410; // x coordinate of jaw, right
var jaw_h = 340; // y coordinate of jaw
var bottom_h = 400; // bottom y coordinates
var eye_diam = 25;
var colorR = 140;
var colorG = 30;
var colorB = 230;
var brow_stroke = 6;
var brow_arch = 130;
var lip_stroke = 8;
var bottom_lip_x = width/2
var bottom_lip_y = height/2 + 100



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

function draw() {
	background(0);
	//face shape
    stroke(255);
    strokeWeight(9);
	//top of face
	fill(0);
    beginShape();
    curveVertex(160,180); 
    curveVertex(160,180);
    curveVertex(head_w1,head_h);
    curveVertex(width/2,top_h);
    curveVertex(head_w2,head_h);
    curveVertex(480,180);
    curveVertex(480,180);
    endShape();
    //lower face
    fill(0);
	beginShape();
    curveVertex(160,180);
    curveVertex(160,180);
    curveVertex(170,240);
    curveVertex(200,280);
    curveVertex(jaw_w1,jaw_h);
    curveVertex(width/2, bottom_h);
    curveVertex(jaw_w2,jaw_h);
    curveVertex(420,280)
    curveVertex(460,240);
    curveVertex(480,180);
    curveVertex(480,180);
    endShape();

    //eyes
    stroke(255);
    strokeWeight(12);
    fill(colorR,colorG,colorB);
    //left
    ellipse(250,180,eye_diam);
    //right
    ellipse(380,180,eye_diam);
    //lids
    stroke(colorR,colorG,colorB);
    strokeWeight(brow_stroke);
    noFill();
    //left
    beginShape();
    curveVertex(210,160);
    curveVertex(210,160);
    curveVertex(240,brow_arch);
    curveVertex(280,160);
    curveVertex(280,160);
    endShape();
    //right
    beginShape();
    curveVertex(350,160);
    curveVertex(350,160);
    curveVertex(390,brow_arch);
    curveVertex(430,160);
    curveVertex(430,160);
    endShape();

    //nose
    stroke(255);
    strokeWeight(4);
    beginShape(); 
    curveVertex(width/2,height/2 - 25);
    curveVertex(width/2,height/2 - 25);
    curveVertex(width/2 + 25, height/2+20);
    curveVertex(width/2,height/2 + 30);
    curveVertex(width/2,height/2 + 30);
    endShape();

    //mouth
    stroke(colorR,colorG,colorB);
    strokeWeight(lip_stroke);
    fill(255);
    beginShape();
    curveVertex(260,height/2 + 60);
    curveVertex(260,height/2 + 60);
    curveVertex(bottom_lip_x,bottom_lip_y);
    curveVertex(350, height/2 + 80);
    curveVertex(360, height/2 + 60);
    endShape(CLOSE);
}

function mousePressed() {
    head_w1 = random(180,240); //randomize line curve width 
    head_w2 = random(400,460); //randomize line curve width
    top_h = random(60,72); // face height 
    head_h = random(top_h,71); // randomize line curve height
    jaw_w1 = random(205,260);
    jaw_w2 = random(380,415);
    bottom_h = random(380,400);
    jaw_h = random(285,bottom_h);
    eye_diam = random(25,50);
    brow_arch = random(115,170);
    brow_stroke = random(5,18);
    lip_stroke = random(9,22);
    bottom_lip_x = random(265,385);
    colorR = random(50,230);
    colorG = random(30,240);
    colorB = random(50,255);
    bottom_lip_y = random(height/2+80,height/2+140); 

}