Looking Outwards-04

Example of how the sonic algorithm connects similar note sequences

The project that I chose is the Eternal Jukebox, a program that analyzes a song for repeating notes and sequences of notes, so it creates an endless song. I admire the simplicity of the interface and how the visual communication relates to what the algorithm is doing to produce the sound. I think it works by using an algorithm to learn the sequence of notes or audio data as it sweeps through the song, so it can learn when to repeat sections without the song ending, using verses and choruses alternatively to make the song never-ending. There aren’t many artistic sensibilities involved aside from the visual interface, but there is some creative decision in how strict the algorithm is with cropping and replacing audio sequences.

https://eternalbox.dev/jukebox_index.html

Created by Paul Lamere in 2012, the process for the creation can be found at: https://musicmachinery.com/2012/11/12/the-infinite-jukebox/

03 Generative Art

sketchDownload
//Julia Steinweh-Adler
//Section D


var value = 0;
var bg = 0;

function setup(){
    createCanvas(600, 450);
    rectMode(CENTER);

}

function draw() {
    background(value/2, value/4, value*2);
    noStroke();
    fill(value * 1.3, value * 0.7, value * 0.5); // fill color uses mouse position
    let size = dist(mouseX, mouseY, width/2, height);
    let sizeI = dist(mouseY, mouseX, width/2, height);
    strokeWeight(10);
    stroke(value-80, 0, 0);    //stroke color uses mouse position in red value
  
  //CAMERA BODY
  rect(width/2, height/2, sizeI, sizeI, 20);    //rounded cornered square
  rect(width/2, height/2, sizeI, value);    //widest rectangle
  fill(200, 100, 100);    //color red
  rect(width/2, height/2, size, value);   //inner rectangle
  fill(value * 1.3, value * 0.7, value * 0.5);    //mouse position influenced orange
  ellipse(width/2, height/2, size, size);  //outer circle
  fill(200, 100, 100);   //red
  ellipse(width/2, height/2, size*0.7, size*0.7);  //inner circle
  fill(value/2, value/4, value*2) 
  ellipse(width/2, height/2, size/2.5, size/2.5); //cut center hole

  //FLASH - mouse pressed "flash" green square that rotates with mouse coordinates
  if (mouseIsPressed) {
    fill(100, 200, 150);  //green
    push();
    translate(width/2, height/2);    //change origin to center
    rotate(radians(mouseY));    //mouse Y coordinates value for degrees of rotation
    rect(0, 0, size/6, size/6);     //rectangle that is size responsive
    pop();  
    
  } else {    //when mouse not clicked, use constant ellipse
    ellipse(width/2, height/2, 50, 50);
  }
  
}
  // Fade in and Out Background
    function mouseMoved() {
      if (bg == 0) {    
       value += 0.5;   //value increase
      } if (value == 255) {    //value can only increase to 255 before decreasing 
        bg = 1
      } if (bg == 1) { 
        value -= 0.5;    // value decrease
      } if (value == 140) {    //value can only decrease to 140 before increasing
        bg =0
     }
}

LO 03: Computational Fabrication

Interestingly, I already selected a piece of generative art producing a physical counterpart in last weeks Looking Outward assignment. As I mentioned before, generative art seems to be most interesting to me when it can be applied in a practical function. To widen my appreciation for such creations, I chose this week to look at another of Joris Laarman’s works, this one with that is may be be even further from practical application, but it looks cool – the Strange Attractor Lamp (2016). This lamp used randomly generated three dimensional curves using attractors. As Joris Laarman says it, the chaotic lines developed in a digital three dimensional space are “transformed into functional volumes”. The digital information is 3-D printed in aluminum, finished by hand, and fitted with LED lights. This lighting fixture demonstrates Joris Laarman’s sensibilities because he seems to be drawn towards digitally developed organic looking shapes and has used several different algorithmic approaches to reach this end. I happen to also really enjoy the blend of digital and organic, so I greatly appreciate these explorations of his.

Looking Outwards-03

Last week I reviewed, the art made by Jessica Rosenkrantz and Jesse Louis-Rosenberg. I said that although the patterns they made were unique, the forms they applied them onto were very generic. Daniel Widrig also makes functional art (furniture), but the forms he generates seem more abstract and natural than the ones mentioned before. There’s more depth to his designs which I like it’s not all on the surface so you can look at this thing he made from a number of angles and it will still be interesting. It says that he used software/technology used by special effects artists to make his 3D printed art. I would guess that he used Maya for some of it because in his description it says he was named “Maya Master.” My friend is a special effects major and she uses Python to code in Maya so if he does use code to generate his forms rather than make them entirely in Maya, then that’s probably what he’s using.

http://danielwidrig.com

Dynamic Drawing

sketch


function setup() {
    createCanvas(450, 600);
    background(220);
    text("p5.js vers 0.9.0 test.", 10, 15);
}
function draw() {
	noCursor();
	
	fromBlue = color( 130, 255, 240);
    toBlue = color(85, 215, 255);
    backColor = lerpColor(fromBlue, toBlue, mouseX/mouseY);
    background(backColor);
	
	noStroke();
	
	
	fill(255, 255, 255);
	ellipse(mouseX-100, 100, 100, 30);
	ellipse(mouseX-100, 90, 50, 30);
	
	ellipse(mouseX+300, 75, 160, 60);
	ellipse(mouseX+300, 55, 80, 50)
	
	ellipse(mouseY-200, 230, 160, 60);
	ellipse(mouseY-200, 210, 80, 50);
	
	ellipse(mouseY, 150, 100, 30);
	ellipse(mouseY, 140, 50, 30);
	
	fill(0, 255, 200);
    fromBlue = color( 90, 255, 90);
    toBlue = color(40, 255, 190);
    blueColor = lerpColor(fromBlue, toBlue, mouseX/mouseY);
    fill(blueColor);
	ellipse(350, 400, 650, 350);
	
	fill(0, 255, 100);
	fromBlue = color( 40, 255, 60);
    toBlue = color(30, 255, 150);
    blueColor = lerpColor(fromBlue, toBlue, mouseX/mouseY);
    fill(blueColor);
	ellipse(100, 475, 625, 350);
	
	fill(0, 255, 0);
	fromBlue = color( 35, 250, 30);
    toBlue = color(20, 245, 140);
    blueColor = lerpColor(fromBlue, toBlue, mouseX/mouseY);
    fill(blueColor);
	ellipse(300, 550, 700, 350);
	

    stroke(220,200,220);
	strokeWeight(2);
	line(mouseX, mouseY+40, 125, 315);
	
	noStroke();
	
	
    fill(255, 0, 255);
    triangle(mouseX, mouseY, mouseX, mouseY-40, mouseX-30, mouseY);
	push();
	
	fill(255, 0, 255);
    triangle(mouseX, mouseY, mouseX, mouseY+40, mouseX+30, mouseY);
	
	fill(255, 0, 200);
    triangle(mouseX, mouseY, mouseX, mouseY+40, mouseX-30, mouseY);
	
	fill(255, 0, 200);
    triangle(mouseX, mouseY, mouseX, mouseY-40, mouseX+30, mouseY);
	
    stroke(40,100,200);
	strokeWeight(20)
	line(30, 450, 30, 550);
	
	stroke(40,100,200);
	strokeWeight(20);
	line(70, 450, 70, 550);
	
	noStroke();
	fill(40, 100, 200);
	ellipse(50, 450, 60, 30);
    rect(20, 380, 60, 70);
	rect(36,365,24,30);
	ellipse(48,350,50);
		 
    stroke(40,100,200);
	strokeWeight(15);
	line(70, 390, 125, 315);
	
	stroke(40,100,200);
	strokeWeight(15);
	line(22.5, 387.5, 1, 470);
	
	
	
	
	
    
	


}

Project 03 – Dynamic Drawing

This was inspired by an app I used to use on my mom’s iPod as a kid. I’m not very good at drawing, so I figured I would give the user a chance to draw. I’ve created a program based on degrees of symmetry that lets you alter the size of the brush, number of brushes, color of the brush, color of the background, and movement of the drawn elements. You can also save your creation by pressing p.

symmedraw2

// variable definitions
var degOfSymmetry = 36;
var curAngle = 0;
var diameter = 10;
let drawnCircs = [];
var radiate = false;
var radiateVelocity = 1;
var showRef = true;
let currentColor = ["red", "green", "blue"];
let colorVals = [255, 255, 255];
let backgroundCols = [0, 0, 0];
var colorIndex = 0;
var currentSelect = "Currently selected: " + currentColor[colorIndex];
var whatKey = "";
var rainbowMode = false;
var rainbowCtr = 0;
var freq = 0.01;

function setup() {
    createCanvas(600, 600);
    background(220);
    text("p5.js vers 0.9.0 test.", 10, 15);
}

function draw() {
    // define background based on color arrays
    background(backgroundCols[0], backgroundCols[1], backgroundCols[2]);
    noStroke();

    // set circle color based on user choice
    let c = color(colorVals[0], colorVals[1], colorVals[2]);
    if (rainbowMode) {
        var rr = sin(rainbowCtr) * 127 + 128;
        var rg = sin(rainbowCtr + (2*PI/3)) * 127 + 128;
        var rb = sin(rainbowCtr + (4*PI/3)) * 127 + 128;
        c = color(rr, rg, rb);
    }
    fill(c);

    // self explanatory
    getAngle();

    // define a center, get relative mouse radius
    var centerX = width / 2;
    var centerY = height / 2;
    var radX = mouseX - centerX;
    var radY = mouseY - centerY;
    var mouseRad = sqrt(pow(radX, 2) + pow(radY, 2));
    
    // draw a circle for each degree of symmetry 
    for (i = 0; i < degOfSymmetry; i++) {
        var loopAngle = curAngle - (i * 2*PI / degOfSymmetry)
        var tX = centerX + mouseRad * cos(loopAngle);
        var tY = centerY + mouseRad * sin(loopAngle);
        circle(tX, tY, diameter);
        
        // add to circle history if clicked
        if (mouseIsPressed) {
            drawnCircs.push([tX, tY, diameter, c, loopAngle]);
        }
    }

    // draw each circle from history
    for (i = 0; i < drawnCircs.length; i++) {
        fill(drawnCircs[i][3]);
        circle(drawnCircs[i][0], drawnCircs[i][1], drawnCircs[i][2]);

        // if radiating, begin changing circle positions
        if (radiate) {
            drawnCircs[i][0] += radiateVelocity * cos(drawnCircs[i][4]);
            drawnCircs[i][1] += radiateVelocity * sin(drawnCircs[i][4]);
            if (drawnCircs[i][0] > width || drawnCircs[i][0] < 0) {
                drawnCircs.splice(i, 1); // remove circles for speed
            } else if (drawnCircs[i][1] > height || drawnCircs[i][1] < 0) {
                drawnCircs.splice(i, 1); // remove circles for speed
            }
        }
    }

    // increment counter for rainbow mode
    rainbowCtr = (rainbowCtr + freq) % (2*PI); 

    // display onscreen reference
    if (showRef) {
        fill(255);
        text("ref: c=change color, d=change degrees of symmetry " +
                "s=change circle size, b=background color \n" +
                "o=clear screen, r=radiate outwards, p=save screen as png " +
                "v=set radiate velocity\n q=rainbow color cycle, " +
                "up/down arrow=color/velocity val+-1, right/left arrow=+-10\n" +
                "i=change selected color, enter=hide ref, y=rainbow speed", 
                10, height - 50);
        text(currentSelect, 10, 15);
        text("RGB: " + (colorVals.toString(10)), 10, 30);
        text("Radiate Velocity " + radiateVelocity.toString(10), 10, 45);
        text("Background RGB: " + (backgroundCols.toString(10)), 10, 60);
        text("Circle Size: " + (diameter.toString(10)), 10, 75);
        text("Degrees of Symmetry: " + (degOfSymmetry.toString(10)), 10, 90);
        text("Rainbow Frequency: " + (freq.toString(10)), 10, 105);
    }
}

// gets angle from mouse pos
function getAngle() {
    curAngle = atan2(mouseY - height / 2, mouseX - width / 2);
    if (mouseX - width / 2 == 0) {
        if (mouseY - height / 2 > 0) {
            curAngle = HALF_PI;
        } else {
            curAngle = 3 * HALF_PI;
        }
    }
}

function keyPressed() {
    // checks what key is pressed, performs an action, or sets a flag
    if (key == "c") {
        whatKey = "c";
        currentSelect = "Currently selected: " + currentColor[colorIndex];
    }
    if (key == "o") {
        drawnCircs = [];
    }
    if (key == "s") {
        whatKey = "s";
        currentSelect = "Currently selected: circle size";
    }
    if (key == "b") {
        whatKey = "b";
        currentSelect = "Currently selected: background color";
    }
    if (key == "d") {
        whatKey = "d";
        currentSelect = "Currently selected: degrees of symmetry";
    }
    if (key == "r") {
        radiate = !radiate;
    }
    if (key == "q") {
        rainbowMode = !rainbowMode;
    }
    if (key == "v") {
        whatKey = "v";
        currentSelect = "Currently selected: velocity"
    }
    if (key == "p") {
        save("canvas_drawing.png");
    }
    if (key == "i") {
        colorIndex = (colorIndex + 1) % 3;
        currentSelect = "Currently selected: " + currentColor[colorIndex];
    }
    if (key == "Enter") {
        showRef = !showRef;
    }
    if (key == "y") {
        whatKey = "y";
        currentSelect = "Currently selected: Rainbow Cycle Speed";
    }

    // changing parameters that affect drawing and motion
    if (keyCode == UP_ARROW) {
        if (whatKey == "d") {
            degOfSymmetry += 1;
        }
        if (whatKey == "c") {
            colorVals[colorIndex] += 1;
        }
        if (whatKey == "v") {
            radiateVelocity += 1;
        }
        if (whatKey == "b") {
            backgroundCols[colorIndex] += 1;
        }
        if (whatKey == "s") {
            diameter += 1;
        }
        if (whatKey == "y") {
            freq += 0.01;
        }
    }
    if (keyCode == DOWN_ARROW) {
        if (whatKey == "d") {
            degOfSymmetry -= 1;
        }
        if (whatKey == "c") {
            colorVals[colorIndex] -= 1;
        }
        if (whatKey == "v") {
            radiateVelocity -= 1;
        }
        if (whatKey == "b") {
            backgroundCols[colorIndex] -= 1;
        }
        if (whatKey == "s") {
            diameter -= 1;
        }
        if (whatKey == "y") {
            freq -= 0.01;
        }
    }
    if (keyCode == RIGHT_ARROW) {
        if (whatKey == "d") {
            degOfSymmetry += 10;
        }
        if (whatKey == "c") {
            colorVals[colorIndex] += 10;
        }
        if (whatKey == "v") {
            radiateVelocity += 10;
        }
        if (whatKey == "b") {
            backgroundCols[colorIndex] += 10;
        }
        if (whatKey == "s") {
            diameter += 10;
        }
        if (whatKey == "y") {
            freq += 0.10;
        }
    }
    if (keyCode == LEFT_ARROW) {
        if (whatKey == "d") {
            degOfSymmetry -= 10;
        }
        if (whatKey == "c") {
            colorVals[colorIndex] -= 10;
        }
        if (whatKey == "v") {
            radiateVelocity -= 10;
        }
        if (whatKey == "b") {
            backgroundCols[colorIndex] -= 10;
        }
        if (whatKey == "s") {
            diameter -= 10;
        }
        if (whatKey == "y") {
            freq -= 0.10;
        }
    }

    return false;
}

Getting the symmetry correct was a little difficult, as well as figuring out how to deal with user input.

LO-03

For this week’s Looking Out, I have decided to pick James Tyrwhitt-Drake’s 2015 creation, 4-Dimensional Polytope visualization. A polytope is a geometric shape that has flat sides. Personally, I find this project admirable because I have been interested in visualizing shapes of greater than 3-dimensions for quite a while. As such, I appreciate this visualization a great deal. I am unsure about many of the algorithms that generated this work, but I can assume that many of the parameters of the polytope depend on its number of points, sides, and viewing angle of the polytope. I also believe that, because a polytope is constructed using lower dimensional shapes, the number of points is actually represented by shapes like that one seen below. Although we are unable to truly see what a 4D shape would look like, I find it very interesting that we still have ways to visualize them.

An example of a polytope generated by the program.

Project 03 – Dynamic Drawing

Is the code more complicated than it needs to be? Yes. Did it still take me way too long to figure out? Also Yes.

sketch
//Iris Yip
//15104 Section D

var wwidth = 600,
    wheight = 600,
    ballsize, //radius
    ballx, 
    bally, 
    hvelocity, 
    vvelocity,
    clickdistance,
    rvalue,greenvalue,bluevalue;

function setup() {
  
  createCanvas(wwidth, wheight);
  
  // starting point
  ballx = wwidth/2;
  bally = wheight/2;
  
  // starting velocity
  hvelocity = random(-5,5);
  vvelocity = random(-5,5);
  
  // starting ball size
  ballsize = random(10,150);
  
  // ball color
  redvalue = random(100,255);
  greenvalue = random(100,255);
  bluevalue = random(100,255);
  
};

function draw() {
  
  
  //background
  background(0)
  let rectBlue = map(mouseY, 0, height, 0, 255);
  fill(255, rectBlue, 200);
  rect(0,0, 600, 600);
  
  
  fill(redvalue, greenvalue, bluevalue);
  ellipse(mouseX, mouseY, 100, 100);


    
  // ball bounce-back conditions
  if(ballx >= width - ballsize || ballx <= ballsize){
    hvelocity = -hvelocity;
  };
  if(bally >= height - ballsize || bally <= ballsize){
    vvelocity = -vvelocity;
  };
  
  // ball location change
  ballx += hvelocity;
  bally += vvelocity;
  
  // render ball
  noStroke();
  fill(redvalue, greenvalue, bluevalue);
  ellipse(ballx, bally, ballsize * 2, ballsize * 2);
  
  
};
  
function mouseClicked() {
  {
    
    clickdistance = dist(mouseX, mouseY, ballx, bally);
    
    if(clickdistance <= ballsize) {
      
      // change velocity if clicked on the ball
      hvelocity = random(-5,5);
      vvelocity = random(-5,5);
      
      // change ball color
      redvalue = random(100,255);
      greenvalue = random(100,255);
      bluevalue = random(100,255);
      
      //changing ball size
      ballsize = random(50,100);
      
    };
  
  };

  
};

Project 3: Dynamic Drawing

sketch
//Jessie Chen
//D
var half = 225

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

function draw() {
    mouseX = constrain(mouseX, 0, 440);
    //bee
    background(123, 176, 223);
    noStroke();
    var bY = constrain(bY, 200, 300);
    var w = 15 + (mouseX * 0.03);
    var h = 10 + (mouseX * 0.03);
    //petal behind bee
    fill(233, 120, 79);
    ellipse(half, 330 - (h * 3), w * 3, h * 3);
    //bee
    push();
    var bY = 200;
    if (mouseX < half) {
        translate(60, 0);
         rotate(radians(15));
    } else {
       translate(-25, 110);
        rotate(radians(345));
    }
    fill(202, 228, 250);
    ellipse(mouseX - 5, bY - 13, w, h);
    ellipse(mouseX - 15, bY - 15, w, h); //wings
    fill(255, 229, 122);
    ellipse(mouseX, bY, 40, 25); //body
    fill(60, 60, 60);
    rect(mouseX - 15, bY - 9 , 5, 19, 100, 5, 40, 40); //black lines
    rect(mouseX - 6, bY - 12, 5, 24, 100, 5, 40, 40);
    rect(mouseX + 3, bY - 11.5, 5, 23, 100, 5, 40, 40);
    ellipse(mouseX + 13, bY - 2, 5, 5); //eye
    stroke(60);
    line(mouseX + 16, bY - 8, mouseX + 18, bY - 12); //attennas
    line(mouseX +14, bY - 8, mouseX + 14, bY - 14);
    line(mouseX - 21, bY, mouseX - 24, bY); //stinger
    //sun
    pop();
    fill(255, 213, 0);
    ellipse(half, 0, 250 + w, 250 + h);
    //clouds
    fill(245, 255, 255);
    rect(mouseX - 100, 50, 100, 75, 35);
    rect(mouseX - 60, 85, 95, 55, 35);
    rect(mouseX - 350, 55, 120, 55, 35);
    rect(mouseX + 100, 20, 120, 55, 35);
    rect(mouseX - 270, 40, 75, 50, 35);
    rect(mouseX + 300, 75, 80, 40, 35);
    rect(mouseX + 250, 65, 70, 30, 35);
    //stem
    fill(115, 172, 111);
    rect(half - 7.5, 340 - (h * 2), 15, 400, 30);
    //leaves
    push();
    translate(193, 100);
    rotate(radians(25));
    ellipse(half - 19, 440, w * 3, 20 + h);
    ellipse(half - 94, 280, w * 3, 20 + h);
    pop();
    push();
    translate(-150, 200);
    rotate(radians(335));
    ellipse(half + 19, 440, w * 3, 20 + h);
    //flower
    pop();
    fill(233, 120, 79); // back petals
    ellipse(half - 30, 360 - (h * 3), w * 4, h * 3);
    ellipse(half + 30, 360 - (h * 3), w * 4, h * 3);
    ellipse(half + 25, 345 - (h * 3), w * 5, h * 3);
    ellipse(half - 25, 345 - (h * 3), w * 5, h * 3);
    fill(255, 215, 102);
    ellipse(half, 360 - (h * 4), w * 3, h * 2); //center
    rect(half - 10, 385 - (h * 7), 2, 3 + h, 20);
    rect(half + 10, 385 - (h * 7), 2, 3 + h, 20);
    rect(half, 380 - (h * 7), 2, 3 + h, 20);
    rect(half - 20, 390 - (h * 7), 2, 3 + h, 20);
    rect(half + 20, 390 - (h * 7), 2, 3 + h, 20);
    fill(233, 120, 79); // front petal
    ellipse(half, 360 - (h * 3), w * 3, h * 3);
    
}

This was inspired by the mutualistic relationship between the bee and the flower. The bee is becoming full while the flower is being pollinated, allowing it to grow and reproduce.

LookingOutwards-03

This project is called Find(&)MERGE made by SVEN, a group from the University of Bologna, Italy. The aim of this project is to design a place that represents an economic and cultural center. What I admire about it is that it attempts to computationally input the different behaviors and environmental elements into the construction of the project. The system created is supposed to grow and evolve depending on the self-organized interactions that affect the place. I think that it is important for architects to be able to take into consideration the ever-changing environments and behaviors and create architecture that can adapt that over long periods of time. This project recognizes this need in architectural design and is using computational fabrication to achieve the design. 

http://www.evolo.us/developing-a-coherent-strategy-for-innovative-design-through-digital-fabrication/