Jamie Park – Project 07 – Curves

sketch

//Jamie Park           jiminp@andrew.cmu.edu
//15-104          Section E        Project 7

//Global Variables
var maxIVal = 300;

function setup(){
    createCanvas(450, 450);
    frameRate(40);
}

function draw(){
    background("black");
    drawHypotrochoid();
    drawRanunculoid();
    drawHypotrochoid2();
    drawAstroid();
}

function drawRanunculoid(){
        //http://mathworld.wolfram.com/Ranunculoid.html

    //push and translate the drawing to the center of the canvas
    push();
    translate(width / 2, height / 2);

    //constrain mouseX and map mouse movement
    var canvaWidth = constrain(mouseX, 0, width);
    var angle = map(canvaWidth, 0, width, 0, 360);
    var a = map(canvaWidth, 0, width, 10, width / 18);

    //change stroke color according to mouse movement, begin shape, and rotate
    noFill();
    stroke(canvaWidth, 150, canvaWidth - 20);
    beginShape();
    rotate(radians(angle));

    //forLoop that creates the shape
    for (var i = 0; i < TWO_PI; i += 0.1){
    //equation for the shape and vertex (high points)
        var x = a * (6 * cos (i) - cos (6 * i));
        var y = a * (6 * sin (i) - sin (6 * i));
        vertex(x, y);
    }
    endShape();
    pop();
}

function drawHypotrochoid(){
    //http://mathworld.wolfram.com/Hypocycloid.html

    //push and translate the drawing to the center of the canvas
    push();
    translate(width / 2, height / 2);

    //constrain mouseX, mouseY and map mouse movement
    var canvaLength = constrain(mouseX, 0, width);
    var canvaHeight = constrain(mouseY, 0, height);
    var a = map(canvaLength, 0, width, 10, width / 30);
    var b = map(canvaHeight, 0, height, 2, height / 30);
    var radAngle = 200;

    //change stroke color according to mouse movement and begin shape
    noFill();
    stroke(230, canvaHeight, canvaLength);
    beginShape();

    //forLoop that creates the shape
    for (var i = 0; i < maxIVal; i++){
        //variable rotation that maps the i value into angles
        var rotation = map(i, 0, 360, 0, 360);
        //equation for the shape and vertex
        var x = (a - b) * cos(rotation) + radAngle * cos((a - b * rotation));
        var y = (a - b) * sin(rotation) - radAngle * sin((a - b * rotation));
        vertex(x, y);
    }
    endShape();
    pop();
}

function drawHypotrochoid2(){
    //http://mathworld.wolfram.com/Hypocycloid.html

    //push and translate the drawing to the center of the canvas
    push();
    translate(width / 2, height / 2);

    //constrain mouseX, mouseY and map mouse movement
    var canvaLength = constrain(mouseX, 0, width);
    var canvaHeight = constrain(mouseY, 0, height);
    var a = map(canvaLength, 0, width, 2, width / 60);
    var b = map(canvaHeight, 0, height, 2, height / 60);
    var radAngle = 100;

    //change stroke color according to mouse movement and begin shape
    noFill();
    stroke(canvaLength, canvaHeight, 10);
    beginShape();

    //forLoop that creates the shape
    for (var i = 0; i < maxIVal; i += 2){
        //variable rotation that maps the i value into angles
        var rotation = map(i, 0, 360, 0, 270);
        //equation for the shape and vertex
        var x = (a - b) * cos(rotation) + radAngle * cos((a - b * rotation));
        var y = (a - b) * sin(rotation) - radAngle * sin((a - b * rotation));
        vertex(x, y);
    }
    endShape();
    pop();
}

function drawAstroid(){
    //http://mathworld.wolfram.com/Astroid.html

    push();
    translate(width / 2, height / 2);

    //variables necessary to define the curve
    var canvaLength = constrain(mouseX, 0, width);
    var a = map(canvaLength, 0, width, 20, width * 0.25);
    var angle = map(canvaLength, 0, width, 0, 360);
    //creating the curve
    noFill();
    stroke(100, canvaLength, canvaLength);
    beginShape();
    rotate(radians(angle));

    //forLoop for the curve and the math equation for the curves
    for (var i = 0; i < (2 * PI); i += 0.1){
        var angle = map(i, 360, 0, TWO_PI);
        var x = a * pow(cos(i), 3);
        var y = a * pow(sin(i), 3);
        vertex(x, y);
    }
    endShape();
    pop();
}

Similar to others, I struggled with understanding how to start the project. But after spending some time decoding the code on “notes” and “deliverables” sections, I had a good grasp on how things were supposed to be done. I ended up creating four curves that change color and size/complexity according to the mouse position. I am happy with the way it turned out.

Jamie Park – Looking Outwards 07

Studio NAND’s Emoto (2012)

I was deeply inspired by Studio NAND’s Emoto, a data visualization for the 2012 London Olympics. This KANTAR-Information is Beautiful Awards winner collected responses to the Olympics through Twitter. The collected data was then used to determine the collective sentiment on individual topics, such as events, players, and teams. Unfortunately, the studio’s website does not specify which algorithm the team used to organize the data. I think it is really interesting that the studio decided to generate visuals using Twitter, and I am curious if they ever looked into other social media, such as Facebook or Instagram, for responses.

The studio also created a physical installation of the data that represents all responses over time with overplayed information from posted Tweets. I am, again, curious to know if the team had drafts of their installation before creating the data. The way they have represented the data is very particular, and I would like to know their thought process before designing it.

Jamie Park – Looking Outwards – 06

“I am taking 15-104” generated using the random art generator

I found a random art generator online called random-art.org. When one types in a name, the generator will give you a randomly-drawn image. This program is written by Andrej Bauer, who completed his degree at CMU and is currently teaching at a university in Slovenia. This random art generator is coded using a pseudo-random number generator, which determines the color of each pixel. Because it is based on a pseudo-random number generator, one will always get the same image if he or she types in the same word.

On the website, the creator notes that the program is primarily written in OCaml, but has java script embedded on the web version, and may download a python version if desired.

I find it very interesting that one can use computer to code random images and entertain people!

Jamie Park – Project – 06

sketch

//Jamie Park           jiminp@andrew.cmu.edu
//15-104         Section E         Project 6

var prevSec;
var millisRolloverTime;

//--------------------------
function setup() {
    createCanvas(480, 480);
    millisRolloverTime = 0;
}

//--------------------------
function draw() {
    background(250); // My favorite pink
    noStroke(); //gets rid of stroke of the shapes

    fill(255, 223, 212);
    for (var x = -10; x < width + 25; x += 50){
        for(var y = -10; y < height + 25; y += 50){
            ellipse(x, y, 50, 50);
        }
    }

    // Fetch the current time
    var H = hour();
    var M = minute();
    var S = second();
    var minRect;

    // Reckon the current millisecond,
    // particularly if the second has rolled over.
    // Note that this is more correct than using millis()%1000;
    if (prevSec != S) {
        millisRolloverTime = millis();
    }
    prevSec = S;
    var mils = floor(millis() - millisRolloverTime);

    var hourColor   = map(H, 0, 23, 60, 220);
    //changed map from 0 to 120, so the rectangle could increase 2 pixels / min
    var minuteIncrease = map(M, 0, 59, 50, 120);
    var secondRotation = map(S, 0, 59, 0, width);

    //Created two circles that change color depending on the time of the day
    fill(61, hourColor, 235); //different shades of blue (dark to light blue)
    ellipse(width / 2, height / 2, 325, 325);
    fill(235, hourColor, 61); //transition from red to yellow
    ellipse(width / 2, height / 2, 300, 300)

    //Created a blue rectangle that increases 2 pixels and changes color 2 values every minute
    rectMode(CENTER);
    fill(51 + minuteIncrease, 111, 184)
    rect(width / 2, height / 2, 70 + minuteIncrease, 70 + minuteIncrease, 15, 15);

    //Created a hexagon that rotates every second
    push();
    translate(width / 2, height / 2);
    rotate(secondRotation);
    fill(116, 232, 228);
    polygon(0, 0, 50, 6);
    pop();
}

//created function polygon to create a hexagon
function polygon(x, y, radius, nPoints){
    var angle = TWO_PI / nPoints
    beginShape();
    for (var i = 0; i < TWO_PI; i += angle){
        var sx = x + cos(i) * radius;
        var sy = y + sin(i) * radius;
        vertex(sx, sy);
    }
    endShape(CLOSE);
}

Rough sketch of my ideas

I started the project by writing down the elements I wanted to include in my clock. I then tried to visualize it through sketching. When I had a concrete idea of what i wanted, I coded the information.

And this is my version of an abstract clock that rotates, changes color, and enlarges according to the time of the day. The seconds are marked by rotating hexagon, the minutes are marked by square that increases “r” value of color by 2 and the size of the wall by 2 pixels, and hours by the two circles that change color. I really enjoyed this project as it allowed me to explore the creative side of coding.

Jamie Park – Project 05 – Wallpaper

sketch

//Jamie Park (jiminp)
//15-104 Recitation E
//Project 5

var rectSize = 50;
var spacing = 160;

function setup(){
    createCanvas(500, 500);
    background(212, 230, 135);

    //odd row of roses
    for (var xWidth = rectSize; xWidth < width + rectSize; xWidth += spacing){
        for (var yHeight = rectSize; yHeight < height + rectSize; yHeight += spacing){
            rose(xWidth, yHeight);
        }
    }
    //even row of roses
    for (var xWidth2 =  -rectSize * 0.6; xWidth2 < width + rectSize; xWidth2 += spacing){
        for (var yHeight2 = rectSize * 2.6; yHeight2 < height + rectSize; yHeight2 += spacing){
            rose(xWidth2, yHeight2);
        }
    }

    noLoop();
}

function draw(){
    //nothing in draw because called noLoop
}

function rose(x, y){
    noStroke();
    //rectangle set to the center to make rotation easy
    rectMode(CENTER);

    //RED ROSE
    //largest square
    fill(209, 67, 56);
    rect(x, y, rectSize, rectSize);
    //second square
    push();
    translate(x, y)
    rotate(radians(45));
    fill(217, 95, 87);
    rect(0, 0, rectSize * 0.7 , rectSize * 0.7);
    pop();
    //third square
    fill(209, 67, 56);
    rect(x, y, rectSize * 0.5, rectSize * 0.5);
    //fourth square
    push();
    translate(x, y)
    rotate(radians(45));
    fill(217, 95, 87);
    rect(0, 0, rectSize * 0.3 , rectSize * 0.3);
    pop();
    //leaf on the left
    push();
    translate(x - (rectSize * 0.8), y);
    rotate(radians(45));
    fill(127, 191, 54);
    rect(0, 0, rectSize * 0.4, rectSize * 0.4);
    pop();
    //leaf on the top
    push();
    translate(x, y - (rectSize * 0.8));
    rotate(radians(45));
    fill(66, 171, 31);
    rect(0, 0, rectSize * 0.4, rectSize * 0.4);
    pop();

    //YELLOW ROSE
    //largest square
    fill(237, 209, 116);
    rect(x + rectSize * 1.6, y, rectSize, rectSize);
    //second square
    push();
    translate(x + rectSize * 1.6, y)
    rotate(radians(45));
    fill(250, 236, 147);
    rect(0, 0, rectSize * 0.7 , rectSize * 0.7);
    pop();
    //third square
    fill(237, 209, 116);
    rect(x + rectSize * 1.6, y, rectSize * 0.5, rectSize * 0.5);
    //fourth square
    push();
    translate(x + rectSize * 1.6, y)
    rotate(radians(45));
    fill(250, 236, 147);
    rect(0, 0, rectSize * 0.3 , rectSize * 0.3);
    pop();
    //leaf on the left
    push();
    translate(x + (rectSize * 0.8), y);
    rotate(radians(45));
    fill(127, 191, 54);
    rect(0, 0, rectSize * 0.4, rectSize * 0.4);
    pop();
    //leaf on the top
    push();
    translate(x + rectSize * 1.6, y - (rectSize * 0.8));
    rotate(radians(45));
    fill(66, 171, 31);
    rect(0, 0, rectSize * 0.4, rectSize * 0.4);
    pop();
}

I wanted to create alternating rows of “roses” using squares. I am content with the final product, and I wonder what it would look like to have an entire room full of this wallpaper pattern.

Jamie Park – Looking Outwards – 05

Kilimanjaro’s “Peeling Therapy (2019)” on youtube

Roger Kilimanjaro is a professional 3d computer graphics artist based in Paris, France. Based on my research, he creates videos and 3d renderings of common everyday objects. He renders and makes videos of cupcakes, ice cream, donuts, and boxes. Although the pictures are not in this post, he also rendered donuts for an advertisement of Krispy Kreme.

Based on my research, he uses cinema 4D to render his images and videos. This means that he uses a software that has been coded by other people to achieve his goal. It’s cool that one can do something completely different and creative using a software coded by programmers. I wonder if the programmers knew that one could create nice images like those using their software.

The artist’s creativity and sensibility is heightened when assessing the colors of each image. The overall graphics are very well rendered and nice to look at.

Jamie Park – Project 04 – String Art

sketch

//Jamie Park           jiminp@andrew.cmu.edu
//15-104          Section E        Project 4

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

function draw(){
    background(0);

    //random number variable to assign value for colors and coordinate location
    var x = 100;
    var y = 170;
    var z = 50;

    //variable newX and newY to constrain mouseX and mouseY movement to the canvas
    var newX;
    newX = constrain(mouseX, 0, width);
    var newY;
    newY = constrain(mouseY, 0, height);

    //lines for the string art -- are color & mouse location-sensitive
    for (var i = 0; i < width; i+= 8){

        stroke(mouseY, mouseX, x); //central 2 curves that go from top to bottom
        strokeWeight(0.5);
        line(i, newX, newX, i);
        line(i, newY, y, i);

        stroke(mouseX, y, mouseY); //central 3 curves that go from left to right
        line(newX, i, i, z);
        line(i, newY, newX, i);
        line(i, y, newY, i);

        stroke(z, mouseY, mouseX); //bottom left corner lines that overlap
        line(y * 5, i, i, newX);
        line(i, newY, x * 5, i);

        stroke(mouseX, x, y); //top left corner lines that overlap
        line(-x, i, i, newY);
        line(newX, i, i, newX);

        stroke(z, y, mouseY); //very central subtle curve
        line(newY, i, i, y * 2);

        stroke(mouseX, mouseX, y); //top right coner line
        line(i, newX, newY, i);

        stroke(mouseX, mouseY, mouseY); //very left stroke that goes across the width of the canvas
        line(x, i, i, newY);
    }
}

Initially, I was a bit confused with how I should be coding this project. But I became confident after visiting Office Hours and talking to my friends. I added some fun to my code by manipulating colors and location of the curves based on mouseX and mouseY.

Jamie Park – Looking Outwards – 04

Video of Weather Thingy on its official website

Adrien Kaeser demonstrating Weather Thingy (2018)

Weather Thingy, 2018, by Adrien Kaeser

Weather Thingy (2018) is a controller that builds sound using real time climate-related events. The device, composed of weather station on a tripod microphone and a custom built controller, transforms climatic data into midi data, which is then interpreted by programmed instruments. The user can also manipulate the midi channel to modify the effects. The most significant part of Weather Thingy is that it is updated live. When you watch the demo video of the device, wind, sunlight and water have different impacts on the music, creating a unique melody that could not be heard on any other time of the day.

According to the author of the post, the device is coded with Arduino, C++, and midi protocol. Although I have no experience using the three languages, I am thrilled to know that one can use coding to generate sound. Overall, I think it was very creative of Kaeser to convert weather data into melody. It must have been a lot of work and effort with a proper understanding of music, and I admire Kaeser for it.

Jamie Park – Project – 03

sketch

//Jamie Park           jiminp@andrew.cmu.edu
//15-104        Section E        Project #3

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

//angle variable for the rotating square
var angle = 0;

function draw(){
    background (0);
    noStroke();
    rectMode(CENTER);

    //rectangle on the right top corner that changes colors
    fill(100, mouseX, 200);
    rect(540, height / 6, 200, 160, 30, 0, 15, 20);

    //square on the left bottom that rotates when the mouse is moved
    push();
    translate(80, 390);
    rotate(180 + mouseX / 50, 300 + mouseY / 50);
    fill(mouseX, mouseX, mouseY);
    ellipse(30, 30, 70, 70);
    pop();
    angle = angle + 2;

    //bottom right square that changes size and color when the mouse is moved
    fill(mouseX, mouseY, 245);
    rect(width * 0.7, height * 0.7, mouseY, mouseY, 20);

    //ellipse on top of a rectangle that changes size and color
    fill(mouseX, mouseY, mouseY);
    ellipse(width * 0.7, height* 0.7, mouseX / 2, mouseX / 2);

    //the rectangles that shift y axis when the mouse is moved
    fill(255, 110, 163);
    rect(mouseX + 50, height / 3, 70, 300, 10);
    fill(194, 252, 3);
    rect(mouseX, height / 3, 100, 220, 10);
    fill(82, 217, 255);
    rect(mouseX + 150, height / 7, 60, 40, 10);
}

I had a lot of fun manipulating the colors, size, position and angle of various elements using x and y coordinates of the mouse. It’s interesting to see the various things one can do through using mouse coordinate!

Jamie Park – Looking Outwards – 03

Kitted Garments the Researchers Created, http://knitskel.csail.mit.edu

Knitting Skeletons (2019) is a project by Alexandre Kasper, Liane Makatura, and Wojciech Matusik at Massachusetts Institute of Technology. This project combines coding with CAD software to allow anyone to design customized kitted garments. Using the software, people can create socks, scarves, gloves, and more that fit perfectly to their bodies.

Based on the video that the researchers have posted on their website (video above), it seems like they have created a software that would specifically serve to create kitting garments. The delicate software allows the user to explore with multiple pattern settings and width / length  of the garment.

I admire this project because it uses coding to bring something into life. I especially like the fact that this project, unlike other projects that create 3D artwork-looking objects, creates something that can be used in daily life. It will allow people to express their artistic sensibilities, as the final product will vary significantly depending on the person. Additionally, this project seems to have potential in helping people who need customized garments.