Lingfan Jiang-Project-06-Abstract Clock

lingfanj-06

// Lingfan Jiang
// Section B
// lingfanj@andrew.cmu.edu
// Project-06

var y = 100;
var up = 0;

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

function draw(){
    background("pink");

    //turn down the frame rate to limit the movement
    frameRate(1);
    angleMode(DEGREES);

    var H = hour();
    var M = minute();
    var S = second();

    //remap second according to the width of the canvas
    var x = map(S, 0, 60, 0, 480);

    //fill the base with dark grey
    fill(45);
    strokeWeight(0);
    rect(0, 145, 48, 100);
    rect(48, 140, 40, 100);
    rect(88, 135, 40, 100);
    rect(128, 130, 40, 100);
    rect(168, 125, 40, 100);
    rect(208, 120, 72, 100);
    rect(280, 125, 40, 100);
    rect(320, 130, 40, 100);
    rect(360, 135, 40, 100);
    rect(400, 140, 40, 100);
    rect(440, 145, 40, 100);

    //fill the platforms with different shades of grey
    fill(240);
    rect(0, 110, 48, 35);
    fill(200);
    rect(48, 105, 40, 35);
    fill(160);
    rect(88, 100, 40, 35);
    fill(120);
    rect(128, 95, 40, 35);
    fill(100);
    rect(168, 90, 40, 35);
    fill(80);
    rect(208, 85, 72, 35);
    fill(100);
    rect(280, 90, 40, 35);
    fill(120);
    rect(320, 95, 40, 35);
    fill(160);
    rect(360, 100, 40, 35);
    fill(200);
    rect(400, 105, 40, 35);
    fill(240);
    rect(440, 110, 40, 35);

    textSize(10);
    text('Time Survived:', 140, 170);
    textSize(13);
    text(nf(H + ' hours', 8, 0), 220, 170);
    text(nf(M + ' minutes', 10, 0), 279, 170);

//set a strokeweight for the man
    strokeWeight(0.7);
    //body
    line (x, y, x, y + 8);
    //front leg
    line (x, y + 8, x + 5, y + 10);
    line (x + 5, y + 10, x + 5, y + 15);
    //back leg
    line (x, y + 8, x, y + 11);
    line (x, y + 11, x - 5, y + 15);
    //arms
    line (x, y + 4, x + 6, y + 4);
    line (x, y + 6, x + 6, y + 6);
    //head
    ellipse(x, y, 5, 5);

//pac-man at the back
    strokeWeight(0.5);
    fill("yellow");
    arc(x - 30, y + 8, 20, 20, 40, 320, PIE);

    //eye of pac-man
    fill(0);
    ellipse(x - 30, y + 3, 2.5, 2.5);


    //set conditions so that the running man moves up 5 pixels every 5 seconds
    if (S % 5 == 0) {
        up = 5;
    }
    else {
        up = 0;
    };

    //set the man back to the left of the screen
    if (S > 60) {
        x = 0;
    };

    //make the man goes up before he reaches the middle
    if (S > 0 & S < 30){
        y -= up;
    }
    //make the man goes down after he reaches the middle
    if (S > 30 & S < 60) {
        y += up;
    };





}

The way to read the clock is that the minute and the hour are clearly stated in the text, and the second is related to the position of the stickman. The stickman would climb up 5 pixels every 5 seconds before it reaches to the middle, and it would climb down afterward.

The biggest struggle I had while doing this assignment is that I do not know how to make the man only step up once every 5 seconds and not to go straight up unstopping. Also, every time I refresh the page, the stickman would go back to its pre-set “y” location which causes a problem visually. Although there are a few hard codes in it, the final result still turns out good to me.

early sketch

 

cmhoward-project-06

cmhoward-06

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

function draw() {
	var H = hour();
	var M = minute();
	var S = second();
	var colorFill = 0;

	background('black');

	for (var i = 0; i < H + 1; i++) {
		colorFill = (3000/i);
		stroke(colorFill, 0, 0);
		line(width - i * 10 + 9, 0, width - i * 10 + 9, height/3);
	}
	for (var i = 0; i < 24 - H; i++) {
		colorFill = (3000/i);
		stroke(colorFill, 0, 0);
		line(i * 10, 0, i * 10, height/3);
	}

	for (var i = 0; i < M + 1; i++) {
		colorFill = (3000/i);
		stroke(colorFill, 0, 0);
		line(width - i * 5 + 4, height/3, width - i * 5 + 4, height/3*2);
	}

	for (var i = 0; i < 60 - M; i++) {
		colorFill = (3000/i);
		stroke(colorFill, 0, 0);
		line(i *5, height/3, i * 5, height/3*2);
	}

	for (var i = 0; i < S + 1; i++) {
		colorFill = (3000/i);
		stroke(colorFill, 0, 0);
		line(width - i * 2.5 + 1.5, height/3*2, width - i * 2.5 + 1.5, height);
	}

	for (var i = 0; i < 60 - S; i++) {
		colorFill = (3000/i);
		stroke(colorFill, 0, 0);
		line(i * 2.5, height/3*2, i * 2.5, height);
	}
}

For this project, I was inspired by a simple abacus.

The abacus has historically been used as a mathematical and computational device, but I immediately was inspired by this as a clock, with each row representing a different time keeping variable (hour, minute, seconds) and each vertical line counting those variables. The script basically reflects the current time on the right and whatever is left over on the left, as if someone is moving a line over for each second, minute, etc.

I began by creating ellipses first, but then decided to create lines to create a deeper graphic relationship between the the hour, minutes, and seconds, as you can see that while the spacing is different between the lines for each variable, there are times when all of the lines vertically connect and it adds another element to this abstraction.

LO – 06 Sara Frankel


Caption: This performance of Cage’s piece “Electronic Music for Piano” will be like no other performance of this piece.

John Cage in the music industry today is known for his expansion on the definition of what music is. His most infamous work, 4’33, requires the performer to sit with their instrument in “complete silence” for four minutes and thirty three seconds for all three movements. The idea of this piece though is to bring attention to the music around you, the random sneezes, the sound of electricity or just the thoughts and breathing of the audience member. Essentially, Cage brings attention to the coherency of randomness. In his piece “Electronic Music for Piano”, the score is just a piece of letterhead paper with very few instruction “for the use of parts from Music for Piano 4-84, reliant upon electronic equipment (microphones, amplifiers, and oscilloscope) and a constellation from an astronomical chart” (http://johncage.org/pp/John-Cage-Work-Detail.cfm?work_ID=59). John Cage’s work is inspiring to me as, if you let it, music and stories are told all around you all the time. Whether it is the buzz of the electricity or the sound of birds chirping outside, every random aspect of life contributes to the musicality of life. As seen in “Electronic Music for Piano”, there is story and music within random sounds of a piano.

KadeStewart-LookingOutwards-06

A graphic before (bottom) and after (top) random edits; Guillermo Daldovo, Bernard Arce, Sonia Figuera (2014)

This is a project created for the REYKJAVIK VISUAL MUSIC PUNTOy RAYA FESTIVAL 2014, meant to capture the visual identity of the festival. The dot and line graphics were processed with graphical glitches, filmed as they were projected on the wall, printed and then re-scanned to distort the images that make up the motion graphics. The description mentions that this distortion created color and texture.

I love this project because the resulting message of the project is that randomness can create a better product, basically that it can help the whole be greater than the sum of its parts. Deterministic methods are nice because we can reliably get a product we want, but randomness allows us to explore beyond what we expect.

VILLA by Malevo

Project 6 – Abstract Clock Sara Frankel

sketch

// Sara Frankel
// sfrankel
// Project 6
// Section A


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

var earthw = 340;
var earthh = 350;
var sunw = 50;
var sunh = 50;


function draw() {
	background(0); 
	var hours = hour();
	var mins = minute();
	var sec = second();
	textSize(30);

	//little dipper
	stroke(80); // I put in lines to emphasize the shape of the dipper :), I put this in for aesthetic effect
	line(50, 40, 110, 60);
	line(110, 60, 150, 100);
	line(150, 100, 200, 135);
	line(200, 140, 280, 85);
	line(285, 85, 225, 45);
	line(230, 45, 155, 105);
	fill('yellow');
	text('*', 50, 60);
	text('*', 110, 80);
	text('*', 150, 120);
	text('*', 200, 155);
	text('*', 280, 100);
	text('*', 225, 65);


	noStroke();
	fill('blue');
	ellipse(width/2, height, earthw, earthh);
	//sun
	fill('orange');
	ellipse(width/2 + cos(radians(360 * ((hours + 6)/24.0))) * (200), height + sin(radians(360 * ((hours + 6)/24.0))) * (200), sunw, sunh); //I used sin and cos to help rotate the sun around the earth at the speed of each hour (from 6am to 6pm you will be able to see the sun)
	//moon
	fill(50);
	ellipse(width/2 + cos(radians(360 * ((hours + 18)/24.0))) * (200), height + sin(radians(360 * ((hours + 18)/24.0))) * (200), sunw, sunh);//I used sin and cos to help rotate the moon around the earth at the speed of each hour (from 6pm to 6am you will be able to see the moon)

	//cloud
	var clouddir = hours % 2 === 0; //Boolean value that, as used in the if statement, that helps to depict the direction of the cloud
	if  (clouddir){
		mins = minute();
	} else {
		mins = 60 - minute(); // when the cloud moves 1 hour, it will change direction and go accross the screen the other direction
	}
	var cloudx =  cos(radians(90 * ((mins - 5)/60.0)) + 180) * 300 + width/2 - 50; //I used sin and cos to help move the cloud around the screen at the speed of each minute (it will move at the speed of the minute and change direction every hour)
	var cloudy = sin(radians(90 * ((mins - 5)/60.0)) + 180) * 450 + height + 20;
	fill('grey');
	ellipse(0 + cloudx, 100 + cloudy, 50, 50);
	ellipse(30 + cloudx, 80 + cloudy, 50, 50);
	ellipse(60 + cloudx, 80 + cloudy, 50, 50);
	ellipse(90 + cloudx, 100 + cloudy, 50, 50);
	ellipse(60 + cloudx, 120 + cloudy, 50, 50);
	ellipse(30 + cloudx, 120 + cloudy, 50, 50);

	//airplane
	var planedir = mins % 2 === 0;//Boolean value that, as used in the if statement, that helps to depict the direction of the plane
	if  (planedir){
		sec = second();
	} else {
		sec = 60 - second(); //after 60 seconds, the plane will change directions
	}
	var planex = cos(radians(90 * ((sec - 5)/60.0)) + 180) * 300 + width/2 - 100; //I used sin and cos to help move the plane around the screen at the speed of each second (it will move at the speed of the minute and change direction every minute)
	var planey = sin(radians(90 * ((sec - 5)/60.0)) + 180) * 450 + height - 50;
	var backwing = [50, 120, 70, 80, 100];
	var frontwing = [100, 70, 60, 130, 140];

	if (!planedir) { //the plane will change direction when going back accross the screen
		backwing = [200 - backwing[0], 200 - backwing[1], 200 - backwing[2], 200 - backwing[3], 200 - backwing[4]];
		frontwing = [200 - frontwing[0], 200 - frontwing[1], 200 - frontwing[2], 200 - frontwing[3], 200 - frontwing[4]];
	}

	//body/wings of plane
	fill(255);
	rectMode(CENTER);
	rect(100 + planex, 100 + planey, 100, 20, 30);
	triangle(backwing[0] + planex, backwing[1] + planey, backwing[0] + planex, backwing[3] + planey, backwing[2] + planex, backwing[4] + planey);
	triangle(frontwing[0] + planex, frontwing[0] + planey, frontwing[1] + planex, frontwing[2] + planey, frontwing[3] + planex, frontwing[0] + planey);
	triangle(frontwing[0] + planex, frontwing[0] + planey, frontwing[1] + planex, frontwing[4] + planey, frontwing[3] + planex, frontwing[0] + planey);


} 

I enjoyed making this project as I used it to try and understand how to use sin and cos for an object to rotate around another. I decided to go with an adventurous space theme with with the earth in the bottom center and the sun and moon rotating around the earth. The sun is orange and the moon grey, both resembling the hour of the day (at 6pm and 6am you will be able to see both the sun and moon). The cloud resembles the minute of the hour and changes direction every hour. The cloud is seconds. I put the Little Dipper in the background as a nice accent to the overall picture.

Jenna Kim (Jeeyoon Kim)- Project 6- Abstract Clock

jeeyoonk06

var x = [];
var y = [];

function setup() {
    createCanvas(500, 500);
    for (i = 0; i < 100; i++){
    	x[i] = random(50, 450);
    	y[i] = random(50, 450);
    }
}

function draw() {
	background(1, 41, 71);
	var S = second(); //variables for time
	var M = minute();
	var H = hour();

	var Hmap = map(H, 0, 20, 0, 500); // ground (pink block) adds up every "HR"
	for(i = 0; i < H; i++)
		stroke(255);
        strokeWeight(2);
		fill(255, 138, 143);
		rect(0, 460, Hmap, 40);

	stroke(255); //fire fly JAR
	strokeWeight(2);
	line(192, 196, 289, 196);
	line(192, 196, 192, 242);
	line(192, 242, 163, 274);
	line(163, 274, 163, 460);
	line(163, 460, 318, 460);
	line(318, 460, 318, 274);
	line(318, 274, 289, 242);
	line(289, 242, 289, 196);

	push(); //Jar lid
	translate(260, -78)
	fill(255);
	rotate(PI / 3);
	rect(192, 196, 10, 100); 
    pop();

    for(i = 0; i < S; i++){ //tiny firefly appears every "SEC"
    	fill(247, 246, 146);
    	noStroke();
    	ellipse(x[i], y[i], 4, 4);
    }

    push(); //firefly rotates every "MIN"
    translate(width / 2, height / 2);
    noStroke();
    ellipseMode(CENTER);
    fill(255);
    rotate(radians(M * 6));
    stroke(255);
    strokeWeight(0.8);
    line(85, 70, 87, 80); //left bug tentacle
    stroke(255);
    strokeWeight(0.8);
    line(75, 60, 74, 80); //right bug tentacle
    noStroke();
    fill(249, 196, 65); //body
    ellipse(80, 40, 19, 50);
    fill(247, 216, 146);
    ellipse(80, 40, 17, 30);
    fill(244, 224, 189);
    ellipse(80, 40, 14, 18);
    fill(45, 16, 35); //wings
    ellipse(75, 50, 10, 33);
    fill(45, 16, 35); //wings
    ellipse(85, 50, 10, 33);
    fill(255, 0, 68); //head
    ellipse(80, 65, 12, 12);
    fill(0); //left eye
    ellipse(85, 70, 5, 5);
    fill(0);
    ellipse(75, 70, 5, 5);
    pop();

}

For this project, I was inspired by the fireflies I saw in my backyard. The tiny firefly adds up every second, pink block adds up every hour, and the firefly in the middle rotates every minute. From last week to this week, my biggest challenge had been understanding “arrays” and “loops”. Through this project, I could understand these concepts better, and I had fun exploring different styles, color, and movements of the parts of the project.

I did a quick sketch before going into Illustrator.
Drawing on Illustrator helps me visualize more clearly.

Victoria Reiter – Looking Outwards – 06

4900 Colours by Gerhard Richter

Image result for 4900 colors

A woman viewing 4900 Colors

4900 Colors is a piece by German artist Gerhard Richter, comprised of 196 square panels of 25 coloured squares each, which can be rearranged in any number of ways to constantly create a new viewing experience.

A computer program assigns a color to each square chosen randomly from a selection of 25 colors. A program can also be used to decide how to combine and hang the panels, thus making their arrangement even more distanced from the “artist’s” hands.

View of 4900 Colors at exhibition and Richter explaining his work

As is discussed in this handy article, it is important to note that randomness does not always look how we imagine it. True randomness develops some patterns, there may be the same color which happens to group itself together, which may not appear random to our human eyes trained in detecting patterns, but which reflects the true randomness of nature.

This piece was interesting to me because it makes me question at what point do humans cease being the “artists”, and must instead pass the credit for art pieces off to the computers which make them? This was a statement Gerhard alluded to, when he said discussed “eradicating any hierarchy of subject or representational intent, and focusing on color to create an egalitarian language of art” (full information available here). While perhaps his intentions are noble, what is the point of art if it does not reflect someone’s intentions? Is there a truly objective art? And is this art we as humans are able to value?

Anthony Ra – Looking Outwards 06

one computable art piece by Frieder Nake

Frieder Nake has done a series of matrix multiplications in which all contain various series of squares outlines of different colors. Some lines are thicker than others while some lines are slanted while others are not.

similar code with different generated art

The decisions of which colors and which sides of each squares should be filled are from a mathematic algorithm within a matrix that Nake used for several images. The result produced from it is what is the randomness of it.

another mathematical algorithm for this series
another mathematical algorithm for this series

Christine Chen-Project-06-Abstract Clock

Christine Chen-Project-06-Abstract Clock

/*
Christine Chen
Section E
cyc1@andrew.cmu.edu
Project-06-Abstract Clock
*/

function setup() {
    createCanvas(400, 400);
    angleMode(DEGREES);
}

function draw() {
    background(43, 43, 47); //darl gray background

    //background circle
    strokeWeight(0); //no stroke
    for (i = 560; i > 320; i = i - 60){
        fill(70); //light gray
        ellipse(200, 200, i, i);

        fill(55); //medium gray
        ellipse(200, 200, i - 20, i - 20);

        fill(43); //dark gray
        ellipse(200, 200, i - 40, i - 40); 
    }

    var angleH = 0; //angle for hour circle rotations
    var angleM = 0; //angle for minute circle rotations
    var angleS = 0; //angle for second circle rotations

    //y position for the circles of Hour, Minute, Second
    var yH = 0; 
    var yM = 20; 
    var yS = 40; 
    
    //Fetch current time
    var H = hour();
    var M = minute();
    var S = second();

    //ratio for controlling spiral circles within borders
    var ratio = 0.3 * width;

    strokeWeight(0.5);

    //Seconds Spiral
    for (var i = 0; i < S; i++){
        push();
        translate (200, 200);
        rotate(angleS);

        stroke(255); //white
        line(0, yS, 0, 0); //draw from canvas center to circle center

        noStroke();
        fill(255); //white
        ellipse(0, yS, 5, 5);
        pop();

        yS += ratio/60;
        angleS += 12;
    }

    //Hour Spiral
    for (var i = 0; i < 24; i++){
        push();
        translate (200, 200);
        rotate(angleH);
        
        if(i < H){
            fill(133, 185, 250); //light blue for current time
        } else {
            fill(100); //gray circles for the rest
        }
    
        ellipse(0, yH, 13, 13);
        pop();

        yH += ratio/24;
        angleH += 30;
    }


    //Minute Spiral
    for (var i = 0; i < 60; i++){
        push();
        translate (200, 200);
        rotate(angleM);

        if(i < M){
            fill(122, 150, 255); //dark blue for current time
        } else {
            fill(70); //gray circles for the rest
        }

        ellipse(0, yM, 10, 10);
        pop();

        yM += ratio/60;
        angleM += 12;
    }


}

    

My idea was a lot harder to create than I thought it would be. I created a spiral form of an abstract clock. The largest circles represent the hour, the medium sized ones represent minutes, and the smallest ones represent seconds. All 24 circles representing hours and all 60 circles representing minutes are drawn out. They get lighted up to represent the current time. The smallest circles representing seconds are drawn in real time which shows how time is moving forward.

Initial draft for abstract clock

I added in the background layers of ellipses and to make the clock more visually interesting. I also experimented with lines and added the lines to connects the canvas center to the second circles to make the movement of the clock more dynamic. I also ended up with having the circles of the more center parts of the spiral overlapping each other because I just like how it gives it a more dynamic “spiral” look rather than having equal distances between all of the circles.

Tanvi Harkare – Project 06 – Abstract Clock

tanvi_sketch

var H;
var M;
var S;

var posX = 0;
var posY = 0;;

var rectSize;

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

function draw() {
    noStroke();
    posX = 0;
    posY = 0;
    background("pink");

    //hour
    H = hour();
    for(var i = 0; i < 24; i++){
        if(H == i){
            fill(0);
        }
        else{
            fill(240);
        }
        rect(posX, posY, width / 24, height / 3);
        posX += width / 24; 
    }
    posX = 0;
    posY += 100;
    
    //minute
    M = minute();
    for(var j = 0; j < 60; j++){
        if(M == j){
            fill(0);
        }
        else{
            fill(240);
        }
        rect(posX, posY, width / 60, height / 3);
        posX += width / 60;
    }
    posX = 0;
    posY += 100;

    //second
    S = second();
    for(var k = 0; k < 60; k++){
        if(S == k){
            fill(0);
        }
        else{
            fill(240);
        }
        rect(posX, posY, width / 60, height / 3);
        posX += width / 60;
    }   
}

For this project, I was inspired by making a simple abstract clock. My clock resembles a piano, with a white background and black stripes representing the hour, minute, and second in real time.

A quick sketch of what I wanted my clock to look like