Project 06 – Mike Pence and Fly Clock

I chose to represent time with the fly from the Vice Presidential debate that landed on Mike Pence’s head. The fly moves each second and crosses the canvas once per minute. Its vertical position represents what minute of the hour it is, and the number of time it says “vote” on the top of the canvas is the hour. If the background is darker than the text, it is PM, and vice versa.

mike pence fly
var FlyY = 5

function setup() {
    createCanvas(480, 480);
    background(220);
}
//draw the fly 
function Fly(){
		var x = 0
		push();
		fill(154, 137, 120);
		rotate(radians(-60));
		ellipse(x - 2, FlyY - 12, 7, 18);	//draw top wing
		rotate(radians(120));
		ellipse(x + 5, FlyY + 8, 7, 18);	//draw bottom wing
		pop();
		stroke(154, 137, 120);
		fill(0);
		circle(x, FlyY, 12);	//draw fly body
	}

//draw mike pence
function Mike(){
	noStroke()
	//shirt
	beginShape();
	fill(241, 237, 234);
	curveVertex(218,346);
	curveVertex(187,374);
	curveVertex(171,395);
	curveVertex(179,479);
	curveVertex(278,479);
	curveVertex(295,391);
	curveVertex(261,351);
	endShape(CLOSE);

	//left shoulder
	fill(0);
	beginShape();
	vertex(172,268);
	vertex(127,282);
	vertex(87,298);
	vertex(44,323);
	vertex(0,331);
	vertex(0,479);
	vertex(193,479);
	vertex(172,380);
	vertex(160,300);
	endShape(CLOSE);

	//right shoulder
	beginShape();
	vertex(325,286);
	vertex(334,294);
	vertex(351,312);
	vertex(396,330);
	vertex(448,354);
	vertex(479,368);
	vertex(479,479);
	vertex(258,479);
	vertex(289,402);
	vertex(316,304);
	endShape(CLOSE);

	//left ear
	fill(236, 166, 133);
	beginShape();
	curveVertex(185,145);
	curveVertex(175,127);
	curveVertex(167,133);
	curveVertex(165,149);
	curveVertex(165,177);
	curveVertex(165,201);
	curveVertex(168,214);
	curveVertex(175,217);
	endShape(CLOSE);

	//right ear
	beginShape();
	curveVertex(363,203);
	curveVertex(378,194);
	curveVertex(388,198);
	curveVertex(387,214);
	curveVertex(371,231);
	curveVertex(359,252);
	curveVertex(349,267);
	curveVertex(339,272);
	curveVertex(331,263);
	endShape(CLOSE);

	//neck
	beginShape();
	curveVertex(181,251);
	curveVertex(172,288);
	curveVertex(183,309);
	curveVertex(195,323);
	curveVertex(223,353);
	curveVertex(242,358);
	curveVertex(279,342);
	curveVertex(309,317);
	curveVertex(317,290);
	endShape(CLOSE);

	//right collar
	fill(255)
	beginShape();
	curveVertex(329,279);
	curveVertex(282,335);
	curveVertex(260,347);
	curveVertex(243,355);
	curveVertex(261,376);
	curveVertex(273,407);
	curveVertex(281,427);
	curveVertex(313,362);
	curveVertex(323,315);
	endShape(CLOSE);

	//face
	fill(244, 180, 150)
	beginShape();
	curveVertex(232,81);
	curveVertex(213,114);
	curveVertex(198,145);
	curveVertex(185,166);
	curveVertex(177,199);
	curveVertex(175,237);
	curveVertex(181,279);
	curveVertex(193,307);
	curveVertex(211,328);
	curveVertex(238,340);
	curveVertex(273,335);
	curveVertex(299,321);
	curveVertex(322,291);
	curveVertex(341,257);
	curveVertex(360,214);
	curveVertex(361,187);
	curveVertex(362,143);
	curveVertex(357,101);
	curveVertex(335,116);
	curveVertex(289,103);
	curveVertex(255,87);
	endShape(CLOSE);

	//right hair
	fill(241, 237, 234);
	beginShape();
	curveVertex(363,74);
	curveVertex(380,95);
	curveVertex(387,130);
	curveVertex(375,171);
	curveVertex(357,217);
	curveVertex(356,122);
	curveVertex(356,104);
	endShape(CLOSE);

	//left hair
	fill(255);
	beginShape();
	curveVertex(254,36);
	curveVertex(219,54);
	curveVertex(199,84);
	curveVertex(190,112);
	curveVertex(184,136);
	curveVertex(180,183);
	curveVertex(209,132);
	curveVertex(233,87);
	curveVertex(277,100);
	curveVertex(323,114);
	curveVertex(341,116);
	curveVertex(358,100);
	curveVertex(363,79);
	curveVertex(352,60);
	curveVertex(327,40);
	curveVertex(295,30);
	endShape(CLOSE);

	//collar
	beginShape();
	curveVertex(177,255);
	curveVertex(165,273);
	curveVertex(162,307);
	curveVertex(170,357);
	curveVertex(178,406);
	curveVertex(181,418);
	curveVertex(209,376);
	curveVertex(231,354);
	curveVertex(195,320);
	curveVertex(177,289);
	endShape(CLOSE);	

	//tie bottom
	fill(184, 14, 18);
	beginShape();
	curveVertex(223,394);
	curveVertex(209,430);
	curveVertex(196,478);
	curveVertex(261,479);
	curveVertex(257,433);
	curveVertex(239,392);
	endShape(CLOSE);

	//tie knot
	fill(229, 25, 30);
	beginShape();
	curveVertex(225,354);
	curveVertex(201,379);
	curveVertex(221,398);
	curveVertex(246,402);
	curveVertex(264,380);
	curveVertex(256,360);
	endShape(CLOSE);

}

function draw(){
	if(hour()>11){
		background(117, 129, 151);	//in PM, set background color to darker blue
	}
	else {
		background(158, 168, 186)	//in AM, set background color to lighter blue
	}
	
	push()
	for(var h = 0; h<(hour()%12); h++){	//this will write'vote' the number of the hour up on a 12 hour scale
		push()
		translate(40*h,0) //space out the'vote' evenly so 12 can fit on the top row
		if(hour()>11){
			fill(158, 168, 186)	//in PM, set text color to lighter blue
		}
		else{
			fill(117, 129, 151)	//in AM, set text color to darker blue
		}
		textFont('Georgia')
		textSize(20)
		text('vote', 2, 25)	//vote text
		pop()
    }
	pop()
	Mike();	//draw mike pence
	push();
	translate(map(second(), 0, 60, -15, width + 10), FlyY);	//translate so the fly moves each second and crosses the canvas once a minute
	translate(0, map(minute(), 0, 60, 0, height));	//translate so the y position of the fly corresponds with the minute of the hour, so the top will be the top of the hour and vice versa
	Fly();	//draw the fly
	pop();
	
}



Project – 06 – clock

Its spooky season so I decided to make a jack-o-lantern clock. With this clock the idea is that the stem counts down the seconds, every minute the knife on the table moves right and at 60 minutes the knife is far right off the screen as if someone picked it up. Every hour a line is carved into the pumpkin so it is like someone picked up the knife and made a cut the n the knife goes back to the left side of the table as if it was put back down. Every 12 hours the jack-o-lantern is fully carved! The background represents AM or PM.

pumpkinclockDownload
var knifeX; // changes knife position by min
var stemY; // height of stem
var H; //hour

function setup() {
    createCanvas(480, 480);
    background(220);
}

function draw() {
    H = hour();
    knifeX = minute() * 8; // knife moves right every minute
    stemY = -220 + second();
    strokeWeight(1);
    noStroke();
    //set up background so that it changes from am to pm
	if(H < 12){ //am
        background(107, 144, 255);
        fill(237, 214, 100);
        circle(0, 0, 250);
    } else { //pm
        background(28, 37, 74);
        fill(177, 179, 186);
        circle(100, 55, 100);
        fill(28, 37, 74);
        circle(125, 55, 100);
    }
    //clouds
    fill(255);
    //right side cloud
    ellipse(400, 150, 200, 30);
    circle(400, 130, 50);
    circle(350, 125, 75);
    circle(430, 140, 25);
    //left side cloud
    ellipse(100, 250, 200, 30);
    circle(100, 230, 50);
    circle(150, 225, 75);
    circle(70, 240, 25);
	//table
	fill(125, 90, 29);
	rect(0, 350, width, height - 130);
	push();
    translate(240, 240); //changes to center
    stem()
    pumpkin();
    face()
    pop();
    knife();
}

function pumpkin(){
	stroke(214, 129, 58);
	fill(245, 147, 66); //orange
    ellipse(0,0, 300, 250); //pumpkin body
    //pumpkin details
    noFill();
    strokeWeight(5)
    ellipse(0, 0, 100, 250);
    ellipse(0, 0, 200, 250);
}

function stem(){
	//stem 
    noStroke();
    fill(18, 102, 13);
    triangle(-20, -125, 20, -125, 0, -150);
    rect(-15, stemY, 30, 250)
}

function knife(){
    noStroke();
    fill(10);
    rect(knifeX, 410, 6, 50); //knife handle
    fill(100);
    rect(knifeX, 370, 6, 40);
    arc(knifeX, 390, 20, 40, PI/2, (PI/2)*3)
}

function face(){
    H = hour()
    stroke(0);
    strokeWeight(5);
    if (H == 1 || H == 13){ //left eye
        line(-100, 0, -75, -50); // left diag
    } else if (H == 2 || H == 14){
        line(-100, 0, -75, -50);// left diag
        line(-75, -50, -50, 0); //right diag
    } else if (H == 3 || H == 15){
        fill(0);
        triangle(-100, 0, -50, 0, -75, -50); // left eye
    } else if (H == 4 || H == 16){
        fill(0);
        triangle(-100, 0, -50, 0, -75, -50); // left eye
        //right eye
        line(100, 0, 75, -50);// right diag
    } else if (H == 5 || H == 17){
        fill(0);
        triangle(-100, 0, -50, 0, -75, -50); // left eye
        //right eye
        line(100, 0, 75, -50);// right diag
        line(75, -50, 50, 0); //left diag
    } else if (H == 6 || H == 18){
        fill(0);
        triangle(-100, 0, -50, 0, -75, -50); // left eye
        triangle(100, 0, 50, 0, 75, -50); // right eye
    } else if (H == 7 || H == 19){
        fill(0);
        triangle(-100, 0, -50, 0, -75, -50); // left eye
        triangle(100, 0, 50, 0, 75, -50); // right eye
        //start mouth
        line(-120, 30, -75 , 30); // left straight line 
    } else if (H == 8 || H == 20){
        fill(0);
        triangle(-100, 0, -50, 0, -75, -50); // left eye
        triangle(100, 0, 50, 0, 75, -50); // right eye
        //start mouth
        line(-120, 30, -75 , 30); // left straight line 
        //tooth left
        line(-75 , 30, -75 , 50);
        line(-75, 50, -25, 50);
        line(-25, 30, -25, 50);
    } else if (H == 9 || H == 21){
        fill(0);
        triangle(-100, 0, -50, 0, -75, -50); // left eye
        triangle(100, 0, 50, 0, 75, -50); // right eye
        //start mouth
        line(-120, 30, -75 , 30); // left straight line 
        //tooth left
        line(-75 , 30, -75 , 50);
        line(-75, 50, -25, 50);
        line(-25, 30, -25, 50);
        // middle straight line
        line(-25, 30, 25, 30);
    } else if (H == 10 || H == 22){
        fill(0);
        triangle(-100, 0, -50, 0, -75, -50); // left eye
        triangle(100, 0, 50, 0, 75, -50); // right eye
        //start mouth
        line(-120, 30, -75 , 30); // left straight line 
        //tooth left
        line(-75 , 30, -75 , 50);
        line(-75, 50, -25, 50);
        line(-25, 30, -25, 50);
        // middle straight line
        line(-25, 30, 25, 30);
        //tooth right
        line(75 , 30, 75 , 50);
        line(75, 50, 25, 50);
        line(25, 30, 25, 50);
    } else if (H == 11 || H == 23){
        fill(0);
        triangle(-100, 0, -50, 0, -75, -50); // left eye
        triangle(100, 0, 50, 0, 75, -50); // right eye
        //start mouth
        line(-120, 30, -75 , 30); // left straight line 
        //tooth left
        line(-75 , 30, -75 , 50);
        line(-75, 50, -25, 50);
        line(-25, 30, -25, 50);
        // middle straight line
        line(-25, 30, 25, 30);
        //tooth right
        line(75 , 30, 75 , 50);
        line(75, 50, 25, 50);
        line(25, 30, 25, 50);
        // right straight line
        line(120, 30, 75 , 30);
    }else{
        fill(0);
        triangle(-100, 0, -50, 0, -75, -50); // left eye
        triangle(100, 0, 50, 0, 75, -50); // right eye
        //start mouth
        line(-120, 30, -75 , 30); // left straight line 
        //tooth left
        line(-75 , 30, -75 , 50);
        line(-75, 50, -25, 50);
        line(-25, 30, -25, 50);
        // middle straight line
        line(-25, 30, 25, 30);
        //tooth right
        line(75 , 30, 75 , 50);
        line(75, 50, 25, 50);
        line(25, 30, 25, 50);
        // right straight line
        line(120, 30, 75 , 30);
        //whole mouth
        arc(0, 30, 240, 120, 2 * PI, PI);
        fill(245, 147, 66)
        noStroke();
        rect(-75 , 25, 50, 20);
        rect(25, 25, 50, 20);
    }
}

LO – 06

Gerhard Richter is an artist that utilizes randomness in his art. Richter’s “4900 Colours: Version II” was exhibited at Serpentine Gallery back in 2008.
This work consisted of 196 panels each with a 5 x 5 square. The randomness comes from a computer program that assigned colors to each square by random from a 25 color palette. The panels could be hung together to create one large display but in the exhibit they were arranged by random in sets of 4.
The intriguing part about the work is the pure randomness. One may not look at it and immediately see random colors because some panels seemed to be dominated by one certain color, but that is the beauty of pure randomness because in random nature patterns may actually occur.

Abstract Clock – Oil Tanks

The idea for this project began as portraying time by building – I was going to use a system in which blocks fall into place to cover the entire screen at the end of the day. Realizing I didn’t know how to do this, I pivoted to something involving filling, so I made 24 tanks and had them increase in “Oil’ per minute and have the “drops” moving every second, so that they would all be filled at the end of the day. Then I wanted to add a psychological component. We experience the speed of time very relatively – the years in the beginning of your life are experienced as “slower” because you are comparing them to a smaller amount of previously lived years than say, an 80 year old. And so I applied this concept – the operation increases every second for each minute, and it also increases for every hour of the day. However, the tanks still fill up according to minutes – a reminder that everyone, no matter age, has the same 24 hours each day. This also serves for another metaphor – we put more work and effort into life (more drops, faster drops), as we are older, but it doesn’t change the amount of time we have. And lastly, I wanted to add an environmental undertone by using oil, a precious resource that is running out.

Oil Tanks
var w = [0,12,24,36,48,60,72,84,96,108,120,132,144,156,168,180,192,204,216,228,240,252,264,276];    //the containers filled with oil
var boxX = 1    //oil pipe fill rate start
var dropY = 1   //drip rate start
var ball = [9.5,21.5,33.5,45.5,57.5,69.5,81.5,93.5,105.5,117.5,129.5,141.5,153.5,165.5,177.5,189.5,201.5,213.5,225.5,237.5,249.5,261.5,273.5]   //reference balls
var d = [];   //amount of drops

function setup() {
    createCanvas(286, 60);    //light blue
    
}

function draw() {
  frameRate(second()+1);    //factory speeds up
  background(68-hour()*2,185-hour()*2,243-hour()*3);   //light blue, darkening with hours
  
    fill(189,189,189);  //light brown
        rect(0,4,500,3)   //oil pipe

for (x=0;x<285;x+=12){
    fill(169,136,80)    //light brown
       rect(x,30,9,30)     //oil tanks
}

 for (var i=0; i < w.length; i++) {
      fill(0)   //black
      if (hour()>i){
          rect(w[i],30,8,30)    //draw full oil tank
    }
    if (hour()==i){
      var oilLevel = height-minute()/2    //oil filling
          rect(w[i],oilLevel,8,oilLevel);   //draw oil tank filling
    }
  }
var faucetPos = hour()*11.875+6   //aligning faucet to be above corresponding tank


if(boxX>faucetPos){   //restart oil and drip when oil hits faucet
   boxX=0    //start of canvas
   dropY=5   //faucet spout level
}

boxX=boxX+faucetPos/60;   //travel rate
  rect(0,5,boxX,1)    //oil travelling in pipe
   

fill(0);    //black
ellipseMode(CORNER);


dropY = dropY+hour()/5;   //drop rate

    for (var i=0; i < 24; i++) {
        circle(faucetPos,dropY-d[i],1.3);     //drop tip
        triangle(faucetPos+.25,dropY-d[i],faucetPos+.6,dropY-d[i]-1,faucetPos+1.05,dropY-d[i]); 
           if(hour()>i){
               d.push(4*i*2);    //add a drop
    }
}


fill(255,0,0);    //red
    rect(0,.5,second()*5,2)   //reference bar at top

fill(150,150,150);    //medium gray
rectMode(CENTER);
    rect(faucetPos,5,10,5);   //faucet bottom
    rect(faucetPos,0,5,5);    //faucet top
rectMode(CORNER);


for (var i=0; i < ball.length; i++) {
  fill(0+second()*4.25,0,0)
      circle(ball[i],height/2+second()/2,2)
}
stroke(0)
 


}






 

Project 6: Abstract Clock

For this week’s project, I garnered inspiration from my current home desk set up, where you can often find my air pods, succulent, and phone playing music.

sketchDownload
// Susie Kim
// susiek@andrew.cmu.edu
// Section A
// Project-06

function setup() {
    createCanvas(480, 380);
    background(244, 212, 212);
}

function draw() {
	// time variables
	var yr = year();
	var h = hour();
	var m = minute();
	var s = second();

	background(244, 212, 212);

	// iphone body
	fill(255);
	noStroke();
	rect(50, 40, 160, 305, 20);
	stroke(0);
	strokeWeight(0.2);
	fill(235);
	rect(57, 75, 147, 230);

	// time of day image
	if (h == 0 || h == 1 || h == 2 || h == 3 || h == 4 || h == 5 || h == 24) {
		// if between the hours of 12am and 5am, show night photo
		noStroke();
		fill(51, 83, 135);
		rect(77, 92, 105, 105);

		// moon
		fill(180);
		ellipse(140, 130, 35, 35);

		fill(130);
		ellipse(150, 132, 7, 7);
		ellipse(130, 130, 5, 5);
		ellipse(143, 121, 6, 6);
		ellipse(137, 139, 3, 3);

		// stars
		fill(255);
		ellipse(100, 110, 2, 10);
		ellipse(100, 110, 10, 2);
		ellipse(115, 150, 2, 8);
		ellipse(115, 150, 8, 2);
		ellipse(90, 160, 2, 12);
		ellipse(90, 160, 12, 2);
		ellipse(160, 100, 1, 7);
		ellipse(160, 100, 7, 1);
		ellipse(170, 155, 1, 7);
		ellipse(170, 155, 7, 1);

		// cloud 1
		ellipse(160, 175, 10, 10);
		ellipse(150, 170, 17, 17);
		ellipse(141, 173, 7, 7);
		ellipse(135, 175, 9, 9);
		rect(130, 171, 35, 10, 5);

		// cloud 2
		ellipse(110, 185, 8, 8);
		ellipse(105, 183, 5, 5);
		ellipse(101, 182, 7, 7);
		ellipse(97, 185, 6, 6);
		rect(93, 183, 20, 7, 4);

	} else if (h == 6 || h == 7 || h == 8 || h == 9 || h == 10 || h == 11) {
		// if between the hours of 6am and 11am, show dawn photo
		noStroke();
	    fill(255, 220, 131);
	    rect(77, 92, 105, 105);

	    // sun
	    fill(247, 167, 107, 100);
	    ellipse(115 , 160, 45, 45);
	    ellipse(115 , 160, 35, 35);
	    fill(247, 167, 107);
	    ellipse(115, 160, 25, 25);

	    // cloud 1
	    fill(255);
	    ellipse(165, 125, 10, 10);
		ellipse(155, 120, 17, 17);
		ellipse(146, 123, 7, 7);
		ellipse(140, 125, 9, 9);
		rect(135, 121, 35, 10, 5);

		// cloud 2
		ellipse(170, 175, 8, 8);
		ellipse(165, 173, 5, 5);
		ellipse(161, 172, 7, 7);
		ellipse(157, 175, 6, 6);
		rect(153, 173, 20, 7, 4);

		// cloud 3
		ellipse(100, 108, 12, 12);
		ellipse(92, 112, 9, 9);
		ellipse(108, 110, 7, 7);
		ellipse(115, 110, 10, 10);
		rect(87, 111, 35, 7, 4);

	} else if (h == 12 || h == 13 || h == 14 || h == 15 || h == 16 || h == 17) {
		// if between the hours of 12pm and 5pm, show day photo
		noStroke();
	    fill(179, 227, 250);
	    rect(77, 92, 105, 105);

	    // sun
	    fill(255, 220, 131, 100);
	    ellipse(130, 120, 45, 45);
	    ellipse(130, 120, 35, 35);
	    fill(255, 220, 131);
	    ellipse(130, 120, 25, 25);

	    // cloud 1
	    fill(255);
	    ellipse(100, 178, 12, 12);
		ellipse(92, 182, 9, 9);
		ellipse(108, 180, 7, 7);
		ellipse(115, 180, 10, 10);
		rect(87, 181, 35, 7, 4);

		// cloud 2
		ellipse(170, 165, 10, 10);
		ellipse(160, 160, 17, 17);
		ellipse(151, 163, 7, 7);
		ellipse(145, 165, 9, 9);
		rect(140, 161, 35, 10, 5);

	} else {
		// if between the hours of 6pm and 11pm, show dusk photo
		noStroke();
	    fill(108, 100, 173);
	    rect(77, 92, 105, 105);

	    // sun
	    fill(221, 216, 114, 100);
	    ellipse(150, 160, 40, 40);
	    ellipse(150, 160, 30, 30);
	    fill(221, 216, 114);
	    ellipse(150, 160, 20, 20);

	    // cloud 1
	    fill(255);
		ellipse(165, 115, 10, 10);
		ellipse(155, 110, 17, 17);
		ellipse(146, 113, 7, 7);
		ellipse(140, 115, 9, 9);
		rect(134, 111, 35, 10, 5);

		// cloud 2
		ellipse(110, 135, 8, 8);
		ellipse(105, 133, 5, 5);
		ellipse(101, 132, 7, 7);
		ellipse(97, 135, 6, 6);
		rect(93, 133, 20, 7, 4);s

		// cloud 3
		ellipse(100, 178, 12, 12);
		ellipse(92, 182, 9, 9);
		ellipse(108, 180, 7, 7);
		ellipse(115, 180, 10, 10);
		rect(87, 181, 35, 7, 4);

		// stars
		ellipse(115, 155, 2, 8);
		ellipse(115, 155, 8, 2);
		ellipse(100, 110, 2, 12);
		ellipse(100, 110, 12, 2);
		ellipse(140, 131, 1, 7);
		ellipse(140, 131, 7, 1);
	} 

	// minute line with marker
	stroke(0);
	strokeWeight(1);
	line(67, 215, 194, 215);
	fill(255);
	var mMapped = map(m, 1, 60, 67, 194);
	strokeWeight(.5);
	ellipse(mMapped, 215, 10, 10); // moving circle

	// seconds line with marker
	strokeWeight(1);
	line(67, 285, 194, 285);
	var sMapped = map(s, 1, 60, 67, 194);
	strokeWeight(.5);
	ellipse(sMapped, 285, 15, 15) // moving circle

	// show name of year on screen
	textSize(10);
	fill(0);
	text(yr + ' ~', 118, 235);

	// buttons and iphone details
	noStroke();
	fill(0);
	rect(125, 250, 3, 13); // pause button
	rect(132, 250, 3, 13);

	triangle(150, 250, 150, 263, 163, 257); // forward buttom
	triangle(156, 250, 156, 263, 168, 257); 

	triangle(104, 250, 104, 263, 92, 257); // backward buttom
	triangle(110, 250, 110, 263, 97, 257); 

	rect(115, 58, 30, 3); // top detail

	ellipse(105, 60, 6, 6); // top cameras
	ellipse(130, 50, 4, 4);

	noFill(); // home button
	stroke(0);
	strokeWeight(.5);
	ellipse(130, 325, 25, 25);

	// succulent pot
	fill(216, 186, 117);
	noStroke();
	circle(360, 285, 125, 125);
	fill(140, 122, 84);
	circle(360, 285, 100, 100);

    // succulent leaf # changes with hour, 12 leaves total
	if (h < 24 & h > 12) {
		h -= 12;
	}

    if (h == 0) {
	    h = 12;
    }
    
    // 8 big exterior leaves change
    for (var i = 0; i < h; i++) {
    	push();
    	translate(360, 285);
    	rotate(radians(45*i));
    	fill(139, 196, 118);
	    ellipse(0, 30, 25, 80);
	    pop();
    }

    // 4 interior leaves change
    for (var i = 8; i < h; i++) {
    	push();
    	translate(360, 285);
    	rotate(radians(90*i));
    	fill(174, 215, 152);
	    ellipse(0, 20, 15, 50);
	    pop();
    }

	// airpods case
	fill(255);
	push();
	rotate(radians(-20));
	rect(230, 160, 100, 107, 20);
	pop();
	strokeWeight(1);
	stroke(175);
	line(280, 100, 375, 65);

    // right airpod
    fill(255);
    noStroke();
	ellipse(435, 60, 30, 30);
	push();
	rotate(radians(30));
	rect(410, -170, 11, 45, 7);
	fill(175);
	ellipse(415, -128, 12, 8);
	fill(0);
	ellipse(404, -165, 10, 4);
	ellipse(396, -165, 3, 4);
	pop();

	// left airpod
	noStroke();
	ellipse(265, 180, 30, 30);
	push();
	rotate(radians(-30));
	rect(125, 285, 11, 45, 7);
	fill(175);
	ellipse(130, 325, 12, 9);
	fill(0);
	ellipse(142, 287, 10, 4);
	ellipse(150, 287, 3, 4);
	pop();
}

	

For the hour, I decided to use the number of leaves of the succulent to indicate the hour between 1 and 12. However, since there were only 12 leaves, and not 24, I gave context clues as to whether it was the am or pm of that hour using the picture on the phone.

Additionally, the phone indicates the year in text, and shows passage of minutes using the the top line and circular marker and passage of seconds using the bottom line and circular marker.

Here are some of the visual variations of my clock:

10am in the morning
12am at night
2pm in the day

Lastly, here are some of my sketches, both from illustrator and my sketchbook!

illustrator sketch showing all 4 time of day options
initial sketch from my sketchbook

Looking Outwards 6 – Minecraft Map

By Eamonn Burke

https://minecraft.gamepedia.com/File:Map_Zoom_4.png

This is a map from the video game Minecraft developed by Markus Persson. Every time a new “world” is started, the map is randomly generated to include a variety of biomes, oceans, and other features. What I admire about this computational art is that it makes the game infinitely engaging and fun. You never know exactly what kind of map scape you’ll get, which lends to never-ending exploration every time you start a new world.

Minecraft worlds are built on a grid, so I would guess that each map has a random amount of “blocks” designated for each biome (including 0) centered around random x and y coordinates. I would also guess that the terrain height has a random range, but are biased in ways so that mountains and caves are created with Perlin noise. As far as non-landscape features, like villages and temples, these are probably plotted randomly as well, with more common features like villages having higher probability distributions.

Persson’s creative sensibilities came in knowing how to bias the randomness -creating realistic landscapes using appropriate ranges and logical conditions. He also was able to create an incredibly immersive game conducive to exploration and creation, despite choosing “outdated” graphics.

Project – 06: Abstract Clock

For my abstract clock, I was inspired by scenes of rainy days. First, I did a rough sketch of the various visual elements that I wanted to comprise the scene. Then, I made notes on the sketch of various elements that I wanted to be reactive to time. I decided that the color of the clouds should be reactive to the hour; as such, the cloud color gets darker with each hour of the day. Additionally, I made the sky change color for a range of hours during the day. The rain is generated depending on how many seconds have elapsed in the minute (e.g. 30 seconds into a minute, 30 lines of rain appear). Lastly, the width of the umbrella increases with each minute and resets at the start of each hour.

sketchDownload

var rainX = [];
var rainY = [];
var buildingStart = [];

function setup() {
    createCanvas(480, 480);
    background(220);
    text("p5.js vers 0.9.0 test.", 10, 15);
    for (i = 0; i < 10; i++){
    	buildingStart[i] = random(height/7,height/2);
    }
}

function draw() {
	noStroke();
	if (hour() < 6){
		background(117,128,181);
	} else if(hour() >= 6 & hour() < 19){
		background(68,117,181);
	} else if (hour() == 19 ){
		//sunset colors
		background(160,24,85); 
		noStroke();
		fill(237,100,21,150);
		rect(0,0,width,3*height/4);
	} else {
		background(8,6,48);
	}
	cityscape();
	//ground
	fill(76,75,62);
	rect(0,360,width,height);
	fill(0,100);
	rect(0,360,width,110);
	baby();
	rock();
	rain();
	cloud();
	push();
	translate(130,330);
	rotate(radians(-30));
	umbrella();
	pop();
}

function cloud() {
	fill(255 - (10*(hour())));
	var circleX = 0;
	var circleY = 0;
	noStroke();
	//cloud gets darker with each hour
	ellipse(width/2,0,width,height/8);
	//for loop was slowing down browser so I wrote out each circle
	circle(circleX,circleY,height/3);
	circle(circleX + 48,circleY - 10,height/3);
	circle(circleX + 48*2,circleY,height/3);
	circle(circleX + 48*3,circleY,height/3);
	circle(circleX + 48*4,circleY,height/3);
	circle(circleX + 48*5,circleY + 10,height/3);
	circle(circleX + 48*6,circleY + 20,height/3);
	circle(circleX + 48*7,circleY + 10,height/3);
	circle(circleX + 48*8,circleY,height/3);
	circle(circleX + 48*9,circleY,height/3);
	circle(circleX + 480,circleY - 15,height/3);
	
	
}

function rain() {
	for(i = 0; i <= second(); i++){ 
		rainX[i] = random(0,480);
		rainY[i] = 0;
		stroke(175,199,216);
		line(rainX[i],rainY[i],rainX[i],height - 10);
	}

}

function baby() {
	//shadow
	fill(0,200);
	ellipse(90,430,220,50);
	//swaddling 
	fill(221,173,218);
	rect(80,400, 60, 40);
	circle(80,420,40);
	circle(140,420,40);
	//face
	fill(173,156,133);
	circle(130,420,38);
	//eyes
	if (hour() >= 20){
		stroke(0);
		strokeWeight(1.5);
		line(130,405,130,415);
		line(130,425,130,435);
	} else {
		fill(0);
		circle(130,410,5);
		circle(130,430,5);

	}

}

function umbrella() {
	//top of umbrella
	fill(102,24,33);
	arc(0,0,150 + minute(),90,PI,0,CHORD); //umbrella width increases with each minute
	fill(25,16,10);
	rect(0,0,3,100);
	//handle
	beginShape();
		vertex(0,100);
		curveVertex(0,110);
		curveVertex(-5,115);
		vertex(-10,105);
		vertex(-10,108);
		curveVertex(-5,118);
		curveVertex(3,110);
		vertex(3,100);
	endShape(CLOSE);
	//top
	triangle(-1,-40,0,-60,1,-40);

}

function rock() {
	fill(31,31,35);
	quad(0,430,10,400,45,380,60,430);
	fill(255,30);
	triangle(10,400,45,380,30,420);


}

function cityscape() {
	for(i = 0; i < 10; i++){
		fill(0,100);
		rect(48*i,buildingStart[i], 48, height);
	}
}
Process Sketch

Looking Outwards – 06: Randomness

A work of music that employs randomness and chance is John Cage’s “Music of Changes.” I admire this piece because it introduces a level of objectivity into the creative process. John Cage controlled the randomness in the composition by referencing the Chinese book the I Ching. He previously arranged the chords, notes, etc. of the music, but he took notes from the book to order these elements. He used this method to create four “books” of music which comprise the “Music of Changes.” John Cage’s artistic sensibilities are manifested in the final work because the random conglomeration of the musical phrases he composed amplify and complement the random and erratic feeling the phrases convey.

Performance of John Cage’s “Music of Changes: Book 1”

Project-06: Abstract Clock

sketchDownload
 /*
Nicholas Wong
Section A
*/


var d; //Days
var h; //Hours
var m; //Minutes
var s; //Seconds

var angle; //Angle for sin-wave frequency for pulse

function setup()
{
    createCanvas(480,480);
    angleMode(DEGREES); //Degrees instead of radians (makes mapping easier)
}
 
function draw() 
{
	translate (width/2,height/2) //Make origin at center
	rotate(-90) //Rotate -90 so starting points for most circle counters face up

	background(0); //Black background

	//Day circle (Outer circle)
	dayCircle();

	//Detail circles
	push();
	fill(0)
	strokeWeight(1)
	stroke(250,0,0);
	circle(0,0,200);
	pop();

	//Dark red circles
	push();
	noFill();
	stroke(1)
	stroke(50,0,0)
	circle(0,0)
	circle(0,0,65)
	circle(0,0,80);
	circle(0,0,100);
	circle(0,0,150);
	pop();


	//Hour circle (Second outer ring)
	hourCircle();

	//Minute circle (Tertiary rings)
	minuteCircle();

	//Second circle (Dotted inner ring)
	secondCircle();

	//Center-most pusling circle
	secondPulse();
    angle += (360/60) / 2; //1 period is 360/framerate, half makes 1 pulse/s

    
}

//Circle of 31 arcs
function dayCircle()
{
	var d = day();

	//Loop runs 31 times, the maximum number of days for any month
	for (let i=1; i<=31; i++)
	{

		push();
		noStroke();
		fill(50,0,0)
		arc(0,0,250,250,(i-1)*360/31,(i-1)*360/31 + 10.5); //Make 31 arcs

		//If the day is today, make the arc red
		if(i == d)
		{
			fill(250,0,0)
		}
		else //If not today, make arc dark red
		{
			fill(70,0,0)
		}

		//First day of month is slightly brighter red arc
		if(i==1)
		{
			fill(90,0,0)
		}

		arc(0,0,235,235,(i-1)*360/31,(i-1)*360/31 + 10.5); //Outer arc for aesthetics
		pop();

		//Additional circles for aesthetics
		noFill();
		stroke(255,0,0);
		circle(0,0,250);
		circle(0,0,200);
	}
}

//Circle with 24 segments
function hourCircle()
{
	var h = hour();

	//Loop is run for the amount of hours passed today
	for (let i=0; i<=h; i++)
	{

		push();
		noFill();
		
		stroke(200,0,0);
		strokeWeight(3)

		arc(0,0,150,150,i*15,i*15 + 6); //Add arcs for every hour that has passed today

		strokeWeight(0.35)

		push(0);
		rotate(-90)
		line(75*sin((-i*15)),75*cos((-i*15)),100*sin((-i*15)),100*cos((-i*15))) //Line drawn from arcs for aesthetics
		pop();

		stroke(255)
		strokeWeight(1)
		arc(0,0,140,140,i*15,i*15 + 6); //Secondary arc for aesthetics
		pop();
	}
}

//Circle of variable arc lengths that show minutes in an hour
function minuteCircle()
{
	var m = minute();

	let m_circle = map(m,0,60,0,360); //Map minutes in an hour to angles on a circle
    push();
    noFill();

    strokeWeight(2);
    stroke(200,0,0);

    //Creates an arc with arc length representing how many minutes has passed in this hour
   	arc(0,0,100,100,0,m_circle);

   	strokeWeight(2);
   	stroke(250,100,100);
   	arc(0,0,80,80,0,m_circle); //Aeshtetic secondary arc

   	pop();
}

//Circle of 60 segments that show seconds in a minute
function secondCircle()
{
	var s = second();

	//Loop runs for the amount of seconds passed in this minute
	for (i=0; i<=s; i++)
	{
		push();
		noFill();
		stroke(255,150,150);
		strokeWeight(1)
		arc(0,0,65,65,i*6,i*6 + 1); //Creates an arc for every second that has passed in this minute
		pop();
	}
}

//Circles in center that pulse every second
function secondPulse()
{

   	if (frameCount/60 == 1) //If the frame count is divisible by 60 (is a second)
   	{
   		angle = 180; //Angle is set to 180
   	}

    let s_diam = sin(angle) * 40; //Pulse maximum diameter

    push();

    noFill();
    strokeWeight(1)
    stroke(250,150,150)

    circle(0,0,s_diam); //Draw circle with variable diameter

    stroke(250,250,250)

    circle(0,0,s_diam * 0.75); //Second circle for aesthetics

    pop();
}
TECH-A Rainmeter Theme
Mk2 tony diy arc reactor lamp stainless steel kit illuminant led flash  light set Sale - Banggood.com

Inspired by tech stuff. Mostly Iron Man, I just re-watched Endgame.

Looking Outwards 6: Randomness

Jackson Pollock’s works are always described as being “random”, generated from “randomness”, being completely devoid of any generative structure, pattern or system. Some compare his work to a child or a madman flinging paint onto a canvas, with no consideration of composition, light, color, or any of the fundamental elements of what the masses consider “a painting”.

However, that isn’t quite true. Jackson Pollock’s paintings have been heavily analyzed, even down to the atomic level, by art critics and scientists alike. However, both agree that there is a system hidden in his work: The apparent strokes and patterns in the paintings look the same, regardless of how close an observer looks at it. In other words, there is a design containing a repeating structure of patterns. This is not so much randomness as it is chaos.

People often lump the word “chaos” with the word “random”, but they are different concepts. Chaos is present in deterministic systems whose behavior, can in principle, be predicted. Large, complex systems have deterministic laws that are highly sensitive to initial conditions. A common metaphor for this is the Butterfly Effect; A butterfly flapping its wings in China can cause a Hurricane in Texas through a cascade of events. Although the apparent cause of the hurricane in this metaphorical butterfly-hurricane system is “randomness”, there exists hints of underlying patterns, feedback loops, and self organization. The same hints of a mathematical system exist within Pollock’s work – The same system which nature uses to guide the growth of blood vessels, tree branches, and even galaxies.

pollock