Ean Grady-LookingOutwards-06

Matt DesLauriers, a self-titled creative developer, uses Node.js and HTML5 to create high-resolution generative artwork. His main project in this regard is called “Color Wander”, a high-resolution full-browser form of the generative artwork. He has a blog post describing some of the methods he used to make Color-Wander.  In order to make his art and renderings look more ‘polished’, he used various photos of snails, flowers, architecture and geometry as what he calls “distortion maps” to help drive the algorithm. Each particle in the algorithm is rendered as a “small line segment in the direction of its velocity.” Also in order to randomize whether some lines curl tightly or head straight, the artist randomized the scale of the noise.

I find this project interesting because it shows specifically how you would use randomization in creating art, which makes it easier to visualize and see when looking at the actual artwork.  Additionally, in the blog post, it shows some actual code, which is really interesting to look at and try to understand it.

Link to Color-Wander: http://color-wander.surge.sh/
Link to Color-Wander blogpost: https://mattdesl.svbtle.com/generative-art-with-nodejs-and-canvas

Kai Zhang-Project-06-Abstract-Clock

sketch

//Kai Zhang
//Section B
//kaiz1@andrew.cmu.edu
//Project-06

var prevSec; //previous second
var msr = 0;//millisecond rollover
var wcol = 0; //wallpaper color
var scol = 0; //second loop color
var mcol = 0; //minute loop color
var hcol = 0; //hour loop color

function setup() {
    createCanvas(600, 600);
    colorMode(HSB, 100);
}

function draw() {
    var h = hour();
    var m = minute();
    var s = second();
    var mils; //millisecond
    var fcd = 0; //frame count decrease


    background(wcol, 40, 30);
    angleMode(RADIANS);

    wcol += 0.1;
    if (wcol > 99) {
        wcol = 0;
    }
    
    strokeWeight(4);
    stroke(20);
    noFill();

    if (prevSec != s) {
        msr = millis();
    }
    prevSec = s;
    var mils = floor(millis() - msr);

    
    //hour loop
    push();
    translate(300, 410);

    stroke(40);
    for (var size = 320; size < 401; size += 20) {
        ellipse(0, 0, size, 100);
    }

    stroke(hcol + 75, 40, 90);
    for (var size = 320; size < 401; size += 20) {
        arc(0, 0, size, 100, -PI / 2, h/12 * 2*PI - PI / 2);
    }

    hcol += 0.1;
    if (hcol > 25) {
        hcol = -75;
    }
    pop()


    //minute loop
    push()
    translate(300, 340);

    stroke(40);
    for (var size = 320; size < 401; size += 20) {
        ellipse(0, 0, size, 100);
    }

    stroke(mcol + 50, 40, 90);
    for (var size = 320; size < 401; size += 20) {
        arc(0, 0, size, 100, -PI / 2, m/60 * 2*PI - PI / 2);
    }


    mcol += 0.1;
    if (mcol > 50) {
        mcol = -50;
    }
    pop()


    //second loop
    push()
    translate(300, 270);

    stroke(40);
    for (var size = 320; size < 401; size += 20) {
        ellipse(0, 0, size, 100);
    }

    stroke(scol + 25, 40, 90);
    for (var size = 320; size < 401; size += 20) {
        arc(0, 0, size, 100, -PI / 2, (s/60 + mils/60000) * 2*PI - PI / 2);
    }

    scol += 0.1;
    if (scol > 75) {
        scol = -25;
    }
    pop()


    
    //mils loop
    push()
    translate(300, 200);
    stroke(77);
    strokeWeight(4);
    arc(0, 0, 320, 100, millis()/1000 * 2*PI, (millis() - 200)/1000 * 2*PI);
    arc(0, 0, 340, 100, (millis() - 100)/1000 * 2*PI, (millis() - 300)/1000 * 2*PI);
    arc(0, 0, 360, 100, (millis() - 200)/1000 * 2*PI, (millis() - 400)/1000 * 2*PI);
    arc(0, 0, 380, 100, (millis() - 300)/1000 * 2*PI, (millis() - 600)/1000 * 2*PI);
    arc(0, 0, 400, 100, (millis() - 400)/1000 * 2*PI, (millis() - 800)/1000 * 2*PI);
    pop()
}

For this project I’m also considering an apporach to do a 3 dimensional abstract clock using 2D primitives. There are 4 sets of loops running on the tracks stacking bottom up and each shows the hour, minute, second, and milisecond. However, the milisecond loops are moving too fast so I rather make it a infinite looping than resetting at each second. The color of the loops and background are also changing the hue constantly, and they’re offest in H value so they’re always in contrast colors.

Eunice Choe – Project-06 – Abstract Clock

sketch

/* Eunice Choe
Section E
ejchoe@andrew.cmu.edu
Project 06*/

// global variables for wheel position and size
var bigX = 160;
var bigY = 320;
var bigDiam = 200;
var smallX = 370;
var smallDiam = 70;

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

function draw() {
    background(172, 201, 232);
    angleMode(DEGREES);
    var H = hour();
    var M = minute();
    var S = second();
    var cH = map(H, 0, 23, 50, width - 50);
    // sidewalk
    noStroke();
    fill(171, 184, 182);
    rect(0, 320, width, 320);
    // changing sun position depending on the hour
    // changing from sun to moon depending on time
    // 7AM to 7PM shows sun while 7PM to 7AM shows moon
    if(H < 19 & H > 7){
        noStroke();
        fill(237, 232, 73);
    } else {
        fill(88, 92, 94);
    }
    ellipse(cH, 100, 100, 100);
    // Time text
    strokeWeight(0.5);
    fill(82, 9, 6);
    textAlign(CENTER);
    text("Hour: " + H, cH, 100);
    text("Minute: " + M, smallX, 450);
    text("Second: " + S, bigX, 450);
    // thin red bike part
    strokeWeight(10);
    stroke(82, 9, 6)
    line(bigX + 110, bigY - 110, bigX + 120, bigY - 130);
    // yellow bike parts
    stroke(176, 117, 15);
    line(bigX + 30, bigY - 200, bigX + 35, bigY - 230);
    line(bigX + 35, bigY - 230, bigX, bigY - 250);
    line(bigX, bigY - 250, bigX - 20, bigY - 240);
    ellipse(bigX, bigY - 250, 10, 10);
    // bike seat
    fill(176, 117, 15);
    line(bigX + 90, bigY - 160, bigX + 120, bigY - 150);
    ellipse(bigX + 130, bigY - 150, 20, 15);
    // thick red bike parts
    stroke(82, 9, 6);
    strokeWeight(15);
    line(bigX, bigY, bigX + 30, bigY - 200);
    line(bigX + 30, bigY - 160, bigX + 120, bigY - 100);
    line(bigX + 120, bigY - 100, smallX, bigY + bigDiam / 2 - smallDiam / 2);
    // wheels
    noFill();
    strokeWeight(15);
    stroke(255, 250, 202);
    ellipse(bigX, bigY, bigDiam, bigDiam);
    ellipse(smallX, bigY + bigDiam / 2 - smallDiam / 2, smallDiam, smallDiam);
    // the rotating seconds wheel
    for(var s = 0; s < S; s++){
        push();
        translate(bigX, bigY);
        rotate(6 * s); // 60 seconds - 60 spokes
        stroke(255);
        strokeWeight(2);
        line(0, 0, 0, -100);
        pop();
    }
    // the rotating minutes wheel
    for(var m = 0; m < M; m++){
        push();
        translate(smallX, bigY + bigDiam / 2 - smallDiam / 2);
        rotate(6 * m); // 60 minutes - 60 spokes
        stroke(255);
        strokeWeight(1);
        line(0, 0, 0, -35);
        pop();
    }

}

My abstract clock is a bicycle with the big wheel representing seconds, the small wheel represent minutes, and the sun/moon representing the hour. For the second and minute wheels, new spokes appear after every second/minute passes. From 7AM to 7PM, the sun is yellow and from 7PM to 7AM the circle turns gray to represent the moon. In addition, the position of the sun/moon changes depending on what time it is.

I came up with the idea of a bike because of the two circular shapes I could work with to represent minutes and seconds. I had to get a little creative to represent the hours, so I chose to use something in the background. The abstract clock was difficult to figure out at times, but overall I feel better about applying rotation and for loops into my code.




The bike in day time and night time.

Lingfan Jiang- Looking Outwards 06

http://color-wander.surge.sh/

The project that I am interested in this week is done by Matt Deslauriers in 2016, called generative art with node.js and canvas. The project created distorted images using the codes.

Here is an example. It transfers the image into the artists’ own style just using codes.

The reason I admire this project is that create a new and unique art style itself is already very interesting. However, I think there are much more opportunities to the project. At the early stage of the project, the artist was only able to convert existing images into this kind of style. However, when the database grows into certain size, it is able to call out a random image by itself, just like the link I added at the beginning of the post. For the next stage, I think the project would be benefited a lot from the machine learning process where the codes could understand and establish links between words and images. To me, that would be the most interesting aspect of the project.

For the algorithm of this project, I would assume that based on the contrast of the image, the codes are able to identify the shapes of the images and use codes to generate random geometries according to the fundamental shapes of the images. Also, it is very wise for the author to use color palettes that are existed from ColourLovers.com API to make his work pleasant to look at.

Here is the original link to the artist’s own page.

https://mattdesl.svbtle.com/generative-art-with-nodejs-and-canvas

Xiaoying Meng-Looking Outwards 06

(Black Shoals Stock Market Planetarium)

Black Shoals is an art project by Joshua Portway and Lise Autogena. The project displays the activities of the stock market as a planetarium. The project uses randomness in a very interesting way. In the beginning, the stars representing each company are randomly distributed. As time passes, the stars start to drift and clog together, moving into constellations. Without the random placement of the stars at the beginning, the relationship and attraction between each star cannot be shown in this way. I admire this project because it turns numeric data of the stock exchange into visually pleasing graphics that can be better understood. I guess the algorithm for this project could be inputting real-time data into graphics and use randomized locations for the beginning.

 

Christine Chen-Looking Outwards-06

John Cage, Ryoanji, 1985

Above is the music piece Ryoanji(named the same as the artwork) composed by John Cage in 1985

John Cage was an American composer who is best known for his avant-garde music and his use of randomness in music composition. In addition to composing music, he also uses randomness to create graphic art. For his piece Ryoanji, he had his assistants read computer-generated random numbers off a list. This chooses which rows of rocks to be chosen, which painting brush to be used, and the position of the stone on the paper. The numbers are “truly” random numbers. After this, Cages paints around the stone to trace the outline. In other words, he used computer-generated coordinates which are randomly generated to determine the positions of the graphics in the picture. This piece was created in conjunction with one of his musical piece, which partially composed through randomness, that was named the same title. The is composed of 3375 rock tracings.

What I admire most about this piece is that at first glance, it just seems as if there is nothing special about it. However, after knowing the algorithm that was used to create it, the entire piece seems more interesting. All those lines seem to be random and not random at the same time! Random because the computer chose the numbers through random process and the numbers are entirely dependent on chance. However, at the same time, the piece also seems to be not so random as the values are defined entirely by a machine and drawn according to that. I also enjoy the fact of how it is created to be congruent with the music. Cage’s artistic sensibilities is shown through his choice of only graphite and paper as his medium. The monotone vibe expressed through the piece reflects the serious, heavy experience that the music expresses.

Jenni Lee — Project 06 — Abstract Clock

sketch

/* Jenni Lee
Section E
jennife5@andrew.cmu.edu
Project - 06
*/

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

function draw() {
  var H = hour(); // brightness of the background is controlled by the hour
  var bgr = 174 * (24 - H) / 24; // range of r is 42 to 216
  var bgg = 166 * (24 - H) / 24; // range of g is 73 to 239
  var bgb = 167 * (24 - H) / 24; // range of b is 73 to 240
  background(bgr + 42, bgg + 73, bgb + 73); 
 
 // brightness of grass is controlled by color
  bgr = 173 * (24 - H) / 24; // range of r is 57 to 230
  bgg = 156 * (24 - H) / 24; // range of g is 81 to 237
  bgb = 125 * (24 - H) / 24; // range of b is 51 to 176
  noStroke();
  fill (bgr + 57, bgg + 81, bgb + 51);
  rect (0, 600, 600, 200);

  // tail
  push();
  translate(400, 510);
  var S = second() % 2;
  if (S == 0) { // tail points to different direction depending on even or odd second number
    rotate(60 / PI + PI);
  } else {
    rotate(120 / PI + PI);
  }
  noStroke();
  ellipseMode(CORNER);
  fill (247, 202, 201);
  ellipse(0, 0, 40, 140);
  pop();

  // body
  push();
  translate(300, 570);
  noStroke();
  fill(229, 196, 168);
  ellipse(0, 0, 250, 200);
  pop();

  // face
  push();
  translate(200, 580);
  noStroke();
  fill(239, 208, 172);
  ellipse(0, 0, 200, 150);
  pop();

  //ears
  push ();
  noStroke();
  fill(239, 208, 172); // left ear
  triangle(100, 572, 102, 490, 150, 515); 
  fill (252, 217, 224); // left inner ear
  triangle(108, 561, 110, 510, 138, 528); 

  //right ear
  fill(239, 208, 172); // right ear
  triangle(240, 512, 290, 490, 295, 560); 
  fill (252, 217, 224); // right inner ear
  triangle(250, 521, 282, 506, 285, 553); 
  pop ();

  // eyes. the posiiton of the eye ball is decided by 
  // the minutes, and it circles one round in 60 minutes
  push(); 
  translate(140, 570);
  noStroke ();
  fill(255, 255, 255);
  // left eye
  ellipse(0, 0, 36, 36);
  //left eye ball
  var M = minute();
  angleMode(DEGREES);
  fill(130, 115, 100);
  ellipse(cos(M / 60 * 360 - 90) * 9, sin(M / 60 * 360 - 90) * 9, 18, 18);

  // right eye
  fill(255, 255, 255);
  ellipse(100, 0, 36, 36); 
  // right eye ball
  fill(130, 115, 100);
  ellipse(cos(M / 60 * 360 - 90) * 9 + 100, sin(M / 60 * 360 - 90) * 9, 18, 18);
  angleMode(RADIANS);

  // nose
  fill(130, 115, 100);
  ellipse(50, 20, 10, 10); 

  //blush
  fill(252, 217, 224);
  ellipse(5, 30, 35, 10); // left blush
  ellipse(95, 30, 35, 10); // right blush
  pop();

  // left paw
  push();
  translate(152, 650);
  rotate(40 / PI);
  strokeWeight(3);
  stroke(255);
  fill(239, 208, 172);
  ellipse(0, 0, 80, 40);
  pop();

  // right paw
  push();
  translate(232, 650);
  rotate(-40 / PI);
  strokeWeight(3);
  stroke(255);
  fill(239, 208, 172);
  ellipse(0, 0, 80, 40);
  pop();
}
// The tail moves left and right every second, the eyeballs make a 360 rotation each hour,
// it moves clock wise every minute. The sky gets darker with each hour. It's the brightest
// at the beginning of the day and dark at the end of the day. 

Cats are my favorite animal, so I wanted my abstract clock to be one. This project was highly enjoyable for me, as not only was it a fun challenge to design it, but it was entertaining to fully customize it to my own tastes. Seconds are indicated by the tail moving left and right each second. Minutes are indicated with the eyeballs moving clock wise every minute, completing a 360 rotation by the end of the hour. Hours/time of day is indicated through the ground and sky getting darker with each hour of the day. These two elements are very light in the morning and dark at night, similar to the sun setting.

Process work ^

Project-06-Abstract Clock-Veronica

sketch

/*
Veronica Wang
Section B
yiruiw@andrew.cmu.edu
Project 06
*/

var prevSec;
var millisRolloverTime;

function setup() {
    createCanvas(600, 600);
    millisRolloverTime = 0;
}

function draw() {
    background(30);
    
    // Fetch the current time
    var H = hour();
    var M = minute();
    var S = second();
    
    // Reckon the current millisecond, 
    // particularly if the second has rolled over.
    if (prevSec != S) {
        millisRolloverTime = millis();
    }
    prevSec = S;
    var mils = floor(millis() - millisRolloverTime);
  
    //text label of time  
    noStroke();
    fill('white');
    text("Hour: "   + H, 10, 22);
    text("Minute: " + M, 10, 42);
    text("Second: " + S, 10, 62);
    text("Millis: " + mils, 10, 82);

    
    //hour ellipse and arc
    stroke('gold');
    var hourR = 150;
    var color = 'gold';
    fill(30);
    ellipse(width / 3, height / 3, hourR * 2, hourR * 2);
    timefiller(24, H, width/3, height/3, hourR, color);

    //minute ellipse and arc
    stroke('skyblue');
    var minR = 100;
    color = 'skyblue';
    noFill();
    ellipse(width * 0.45, height * 0.5, minR * 2, minR * 2);
    timefiller(60, M, width * 0.45, height * 0.5, minR, color);

    //second ellipse and arc
    stroke('lightblue');
    var secR = 75;
    color = 'lightblue';
    noFill();
    ellipse(width * 0.6, height * 0.6, secR * 2, secR * 2);
    timefiller(60, S, width * 0.6, height * 0.6, secR, color);

    //milli second ellipse and arc
    stroke('white');
    var milR = 50;
    color = 'white';
    noFill();
    ellipse(width * 0.75, height * 0.6, 100, 100);
    timefiller(1000, mils, width * 0.75, height * 0.6, milR, color);
    
    //function to draw arc based on division of circle
    function timefiller(divNum, currNum, x, y, r, color){
        var incr = 2 * PI / (divNum * 2); //divide circle into increments based on time unit
        var pt2 = currNum * incr + PI / 2; //time increment point on circle
        var pt1 = PI / 2 - currNum * incr; //time increment point on circle
        fill(color);
        arc(x, y, 2 * r, 2 * r, pt1, pt2, OPEN); //draw open arc based on current time increment points
        
    }





}

In this project I decided to represent the abstract clock with a series of circles being filled up. I challenged myself to write a new function for drawing those open arcs and it turned out just the way I intended. I had trouble figuring out the increments and correct elements to make the arc with, but it reminded me of the string art project which helped me a lot with this.

idea sketches

Sarah Yae Project 6 Section B

sketch

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

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

//Sky gets lighter with an hourly increment 
    background (0, 10 * H, 255);

//Sun moves position with the minute
    fill (250,218,94); 
    noStroke();
    ellipse (M * 5, 50, 50, 50);

//Cloud floats with the second
    fill('White');
    noStroke();
    arc(20 + S * 4,100,30,30, PI/2, 3*PI/2);

    fill('White');
    noStroke();
    arc(30 + S * 4,85,30,30, 3*PI/4, (3*PI/4) + 3*PI/2);

    fill('White');
    noStroke();
    arc(50 + S * 4,85,30,30, 3*PI/4, (3*PI/4) + 3*PI/2);

    fill('White');
    noStroke();
    arc(60 + S * 4,100,30,30, 3*PI/2, PI/2);

    fill ('White');
    noStroke();
    rect(20 + S * 4,85,40,30);

//Sand 
    fill (225,191,146);
    rect (0, 190, width, height);

//Sand particles
    for (var x = 0; x < width; x += 10) {
        for (var y = 210; y < height; y += 20) {
           textSize (25);
            fill(87,72,60);
            text ('.', x, y); 
        }   
    }
}

Original Sketch

I originally wanted to create a project that would continuously draw stars (constellation) as the seconds go by, but as I worked on the project, realized that I wanted to move an object across- thus, I used a cloud. I had a difficult time creating a shape of the cloud, so I decided to hardcode each piece of the cloud (4 arcs + 1 rectangle). I even had a difficult time getting ideas about how I would want my abstract clock to reflect… However, I am satisfied with my final outcome and how it turned out; I especially like the smooth transition of the background, which reflects the hour. A great addition would have been if the sky reflected the actual sky color at specific hours, instead of just going from dark blue to light blue.

Yingying Yan- Looking Outwards-6

An example of showing pattern within random generation

Coding Architecture: Randomness project is an assignment from Rhode Island School of Design. The project I found interesting is not named, nor is not part of the author’s portfolio anymore. Yet, Daejeong Kim uses algorithms to draw sets of lines in a random but systematic way.

The direction is being controlled

For instance, she used two random number set: A and B and centered at random (A, B) to create a drawing with random lines. Due to the algorithm, the lines together form patterns showing density and directionality. It is also interesting to read the product as a animation and see the changes that are generated by the random numbers. This project caught my attention. Because among all the other project, it uses randomness to result in a non-random form.

random fill converted-superhigh from Coding Architecture on Vimeo.