cduong-Project-03-Dynamic-Drawing

project03

/*
Name: Colleen Duong
Lab Section: D
Email: cduong@andrew.cmu.edu
Project-03 Dynamic Drawing
*/

var sunsize = 50;
var BR = 6; //Sky R color
var BG = 6; //Sky G color
var BB = 50; //Sky B color
var BRG = 25; //Ground R color
var BGG = 62; //Ground G color
var BBG = 16; //Ground B color
var SR = 255 //Sun R color
var SG = 255 //Sun G color
var SB = 255 //Sun B color
var sproutstemh = 610; //sprout stem height


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

function draw() {
  background(BR, BG, BB);
  noStroke();

//Sky   Start
  //Setting the boundaries for the morning colors to appear
  if ((mouseX >= 640) & (mouseX <= 640)){
      mouseX = 640;
  }

  //Setting the boundaries for the night colors to appear
  //background nighttime colors (6, 6, 50)
  //background daytime colors (187, 235, 235)
  if ((mouseX > 0) & (mouseX < 400)){
    BR = mouseX*((187-6)/400) + 6;
  	BG = mouseX*((235-6)/400) + 6;
  	BB = mouseX*((235-50)/400) + 50;
    }
//Sky   End


//The Sun   Start
  fill(SR, SG, SB);

  //Setting a constraint so the sun cannot leave the canvas
  var constrainy = constrain(mouseY, 0, 300);
  var constrainx = constrain(mouseX, 0, 600);

  //Creating the sun shape
  ellipse(constrainx, constrainy, sunsize, sunsize); //The circle

  //Setting the boundaries for sun to change to morning color
  if ((mouseX > 640) & (mouseX < 640)){
      mouseX = 640;
  }

  //Setting the boundaries for sun to change to night color
  //Daytime Grass (255, 199, 5)
  //Nighttime Grass (255, 255, 255)
  if ((mouseX > 0) & (mouseX < 640)){
    SR = mouseX*((255-255)/640) + 255;
    SG = mouseX*((199-255)/640) + 255;
    SB = mouseX*((5-255)/640) + 255;
    }

  //Changing the Sun Size depending on Location
  sunsize = (0.5*(mouseX+mouseY)); 
//The Sun   End


//Grass   Start
  //Ground
  fill(BRG, BGG, BBG);
  rect(0, 400, 680, 100);

  //Setting the boundaries for the morning grass colors to appear
  if ((mouseX > 640) & (mouseX < 640)){
      mouseX = 640;
  }

  //Setting the boundaries for the night grass colors to appear
  //Daytime Grass (78, 174, 55)
  //Nighttime Grass (25, 62, 16)
  if ((mouseX > 0) & (mouseX < 640)){
    BRG = mouseX*((78-25)/640) + 25;
    BGG = mouseX*((174-62)/640) + 62;
    BBG = mouseX*((55-16)/640) + 16;
    }
//Grass   End

//Stems Start
  //Make stems grow as the arrow moves across the x-axis
  push();
  translate(35, -mouseX+200); //Make the stems grow upward
  sproutS = rect(35, sproutstemh, 10, 300, 10);
  sprout2S = rect(105, sproutstemh, 10, 300, 10);
  sprout3S = rect(175, sproutstemh, 10, 300, 10);
  sprout4S = rect(245, sproutstemh, 10, 300, 10);
  sprout5S = rect(315, sproutstemh, 10, 300, 10);
  sprout6S = rect(385, sproutstemh, 10, 300, 10);
  sprout7S = rect(455, sproutstemh, 10, 300, 10);
  sprout8S = rect(525, sproutstemh, 10, 300, 10);
  pop();

  //Leaves that pop out of the stem depending on where your mouse is on the x axis
  //Key: SproutL is the first stem's sprouts, Sprout 2L is the second stem's sprouts, etc
  //Key2: SproutL2 is the second leaf from the ground, etc.
  if ((mouseX > 450)){ //First to pop up
    sproutL = ellipse(60, 380, 25, 20);
    sprout3L = ellipse(200, 370, 25, 20);
    sprout7L = ellipse(480, 360, 25, 20);
  }
  if ((mouseX > 480)){ //Second to pop up
    sprout2L = ellipse(130, 385, 25, 20);
    sprout4L = ellipse(300, 360, 25, 20);
    sprout6L = ellipse(410, 370, 25, 20);
    sproutL2 = ellipse(90, 320, 25, 20);
    sprout3L2 = ellipse(230, 320, 25, 20);
    sprout7L2 = ellipse(510, 330, 25, 20);
  }
  if ((mouseX > 520)){ //Third to pop up
    sprout5L = ellipse(340, 355, 25, 20);
    sprout8L = ellipse(580, 350, 25, 20);
    sprout2L2 = ellipse(160, 325, 25, 20);
    sprout3L3 = ellipse(200, 300, 25, 20);
    sprout4L2 = ellipse(270, 310, 25, 20);
    sprout6L2 = ellipse(440, 320, 25, 20);
    sprout7L3 = ellipse(480, 290, 25, 20);
  }
  if ((mouseX > 540)){ //Fourth to pop up
    sproutL3 = ellipse(60, 260, 25, 20);
    sprout2L3 = ellipse(130, 280, 25, 20);
    sprout3L4 = ellipse(230, 275, 25, 20);
    sprout4L3 = ellipse(300, 255, 25, 20);
    sprout5L2 = ellipse(370, 260, 25, 20);
    sprout6L3 = ellipse(410, 260, 25, 20);
    sprout7L4 = ellipse(510, 250, 25, 20);
    sprout8L2 = ellipse(550, 260, 25, 20);
  }

//Last to pop up: Flowers   Start
  if ((mouseX > 575)){ //Petal 1
    fill(247, 154, 185); //Pink Color
    ellipse(50, 200, 40, 40); //Pink

    fill(255, 180, 0); //Orange Color
    ellipse(190, 200, 40, 40); //Orange

    fill(191, 63, 63); //Red Color
    ellipse(120, 200, 40, 40); //Red

    fill(31, 144, 0); //Green Color
    ellipse(330, 200, 40, 40); //Green

    fill(255, 234, 0); //Yellow Color
    ellipse(260, 200, 40, 40); //Yellow

    fill(136, 73, 189); //Purple Color
    ellipse(470, 200, 40, 40); //Purple

    fill(17, 46, 173); //Blue Color
    ellipse(400, 200, 40, 40); //Blue

    fill(70, 63, 69); //Black Color
    ellipse(540, 200, 40, 40); //Black
}

  if ((mouseX > 565)){ //Petal 2
    fill(247, 154, 185); //Pink Color
    ellipse(100, 200, 40, 40); //Pink

    fill(255, 180, 0); //Orange Color
    ellipse(240, 200, 40, 40); //Orange

    fill(191, 63, 63); //Red Color
    ellipse(170, 200, 40, 40); //Red

    fill(31, 144, 0); //Green Color
    ellipse(380, 200, 40, 40); //Green

    fill(255, 234, 0); //Yellow Color
    ellipse(310, 200, 40, 40); //Yellow

    fill(136, 73, 189); //Purple Color
    ellipse(520, 200, 40, 40); //Purple

    fill(17, 46, 173); //Blue Color
    ellipse(450, 200, 40, 40); //Blue

    fill(70, 63, 69); //Black Color
    ellipse(590, 200, 40, 40); //Black
}

if ((mouseX > 570)){ //Petal 3
    fill(247, 154, 185); //Pink Color
    ellipse(75, 180, 40, 40); //Pink

    fill(255, 180, 0); //Orange Color
    ellipse(215, 180, 40, 40); //Orange

    fill(191, 63, 63); //Red Color
    ellipse(145, 180, 40, 40); //Red

    fill(31, 144, 0); //Green Color
    ellipse(355, 180, 40, 40); //Green

    fill(255, 234, 0); //Yellow Color
    ellipse(285, 180, 40, 40); //Yellow

    fill(136, 73, 189); //Purple Color
    ellipse(495, 180, 40, 40); //Purple

    fill(17, 46, 173); //Blue Color
    ellipse(425, 180, 40, 40); //Blue

    fill(70, 63, 69); //Black Color
    ellipse(565, 180, 40, 40); //Black
}

if ((mouseX > 555)){ //Petal 4
    fill(247, 154, 185); //Pink Color
    ellipse(60, 225, 40, 40); //Pink

    fill(255, 180, 0); //Orange Color
    ellipse(200, 225, 40, 40); //Orange

    fill(191, 63, 63); //Red Color
    ellipse(130, 225, 40, 40); //Red

    fill(31, 144, 0); //Green Color
    ellipse(340, 225, 40, 40); //Green

    fill(255, 234, 0); //Yellow Color
    ellipse(270, 225, 40, 40); //Yellow

    fill(136, 73, 189); //Purple Color
    ellipse(480, 225, 40, 40); //Purple

    fill(17, 46, 173); //Blue Color
    ellipse(410, 225, 40, 40); //Blue

    fill(70, 63, 69); //Black Color
    ellipse(550, 225, 40, 40); //Black
}

if ((mouseX > 560)){ //Petal 5
    fill(247, 154, 185); //Pink Color
    ellipse(90, 225, 40, 40); //Pink

    fill(255, 180, 0); //Orange Color
    ellipse(230, 225, 40, 40); //Orange

    fill(191, 63, 63); //Red Color
    ellipse(160, 225, 40, 40); //Red

    fill(31, 144, 0); //Green Color
    ellipse(370, 225, 40, 40); //Green

    fill(255, 234, 0); //Yellow Color
    ellipse(300, 225, 40, 40); //Yellow

    fill(136, 73, 189); //Purple Color
    ellipse(510, 225, 40, 40); //Purple

    fill(17, 46, 173); //Blue Color
    ellipse(440, 225, 40, 40); //Blue

    fill(70, 63, 69); //Black Color
    ellipse(580, 225, 40, 40); //Black
}

  if ((mouseX > 550)){ //Flower Centers
    fill(211, 86, 115); //Dark Pink Center
    ellipse(75, 205, 25, 25);

    fill(194, 139, 7); //Dark Orange Center
    ellipse(215, 205, 25, 25);

    fill(160, 38, 38); //Dark Red Center
    ellipse(145, 205, 25, 25);

    fill(21, 99, 0); //Dark Green Center
    ellipse(355, 205, 25, 25);

    fill(220, 202, 0); //Dark Yellow Center
    ellipse(285, 205, 25, 25);

    fill(96, 39, 144); //Dark Purple Center
    ellipse(495, 205, 25, 25);

    fill(8, 32, 132); //Dark Blue Center
    ellipse(425, 205, 25, 25);

    fill(33, 30, 31); //Dark Black Center
    ellipse(565, 205, 25, 25);
  }
//Stems   End
}

1) You can only see the flowers fully grow if you’re looking at the code on a full 640×480 canvas

This project was really difficult for me because there were so many options that I could have done and it was hard for me to really decide what I wanted to code for this project.

These were some initial sketches I did of possible things that I could have attempted to code (unsure if the drawings even make sense), but I decided to try and stick with my theme that I had in my last project, which is the idea of using sprouts. I wanted to try to make the sprouts look like they were growing depending on where the sun is (on the x-axis) and I wanted to change the color of the sky, grass, and the sun depending on where the mouse is (on the x-axis) and also allowing the sun to grow smaller and bigger depending on where it is on the canvas.

It was difficult for me to try and figure out how to code certain things, especially the growing stems for the plants because I tried to do that for my last project. I figured out a way to do it, but I’m sure there is a more efficient way to do it that I want to try and figure out next time.

Another aspect that I wanted to incorporate in this project was to try and draw different flowers like sunflowers, but I found it too difficult to do sadly. Maybe next time.

Project-03

sketch

//Cora Hickoff
//Section D 
//chickoff@andrew.cmu.edu
//Project-03

function setup() {
    createCanvas(640, 480);
    rectMode(CENTER);
    frameRate(10);
}

function draw() {

    //mouseX controls the degrees
    var deg = mouseX;
    var rad = radians(deg);

    background(144,180,180);
    //make background change color
    //when mouse midway point of canvas width
    if (mouseX > (width / 2)) {
        background (232,180,180);
    }

    //small gold circle
    fill(255, 214, 169);
    noStroke();
    //restrict mouseX to 0-135
    var m = max(min(mouseX, 40), 135);
    var size = m * 120.0 / 400.0;
    ellipse(10 + m * 190.0 / 400.0, 200.0, size, size);

    //white circle
    fill(255);
    noStroke();
    //restrict mouseX to 0-400
    var m = max(min(mouseX, 400), 35);
    var size = m * 120.0 / 300.0;
    ellipse(10 + m * 190.0 / 400.0, 200.0, size, size);

    //big gold circle
    fill(255, 214, 169);
    noStroke();
    //restrict mouseX to 0-335
    //mouseX, 920 causes mouseX 
    //to control bid golden circle
    //once white circle overlaps
    var m = max(min(mouseX, 920), 335);
    var size = m * 120.0 / 400.0;
    ellipse(10 + m * 190.0 / 400.0, 200.0, size, size);

    //peach square
    fill(240,140,130);
    //as mouseX moves across
    //canvas, its degrees determine
    //the square's rotation
    rotate(rad);
    rect(300 + m * 190.0 / 400.0, 200.0, size, size);

}

In this project, I wanted to make a shape rotate based on the mouse’s x coordinates. By adding the other ellipses, I realized that the end result made them all look like planets in a solar system and the rectangle looked as though it were orbiting them.

daphnel-Project 03-Dynamic Drawing

Dynamic Drawing

var circleW=150;
var circleH=150;
var circleX=320;
var circleY=240;
var earL=280;
var earR=200;
var earW=70;
var earH=320;
var innerearL=200;
var innerearR=280;
var innerearW=24;
var innerearH=280;
var smallerCircleW=50;
var smallerCircleH=50;
var smallerCircleX=160;
var armR=120;
var armL=360;
var eyes=15;
var eyesR=210;
var eyesL=265;
var pupil=8;
var pupilL=212;
var pupilR=267;
var rectY=165;
var rectW=150;
var rectH=150;
var antennaR=210;
var antennaL=265;
var angle=10;
var x1=50;
var y1=0;
var x2=250;
var y2=25;
var x3=50;
var y3=50;

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

function draw() {
    background(230, mouseX, mouseY);
    //made the background change based on the mouseX and mouseY positions
    strokeWeight(0);
    fill(255);
    push();
    translate(370,350);

//divided by 50 to make sure it rotates slower
    rotate(mouseX/50);

//ears
    ellipse(mouseX/7,earL,earH,earW);
    ellipse(mouseX/7,earR,earH,earW);

//inside of ears
    fill(255, 204, 204);
    ellipse(mouseX/7,innerearL,innerearH,innerearW);
    ellipse(mouseX/7,innerearR,innerearH,innerearW);

//the face
    fill(255);
    ellipse(mouseX / 7, circleY, circleW, circleH);

//the two circular arms
    ellipse(mouseX / 7, armR, mouseX/7, mouseX/7);
    ellipse(mouseX / 7, armL, mouseX/7, mouseX/7);
//body
    rect(mouseX / 7, rectY, rectW, rectH);
    fill(0);
//the two white eyes in the green blob
    ellipse(mouseX / 8,eyesR,eyes,eyes);
    ellipse(mouseX / 8,eyesL,eyes,eyes);
    fill(255);
    ellipse(mouseX/8,pupilR,pupil,pupil);
    ellipse(mouseX/8,pupilL,pupil,pupil);
//carrot body
    fill(mouseX, 153, 0);
    triangle(x1,y1,x2,y2,x3,y3);
//the greens of the carrot
    fill(102, 204, 0);
    ellipse(40,5,mouseX/7,mouseX/7);
    ellipse(25,15,mouseX/7,mouseX/7);
    ellipse(20,30,mouseX/7,mouseX/7);
    ellipse(50,25,mouseX/7,mouseX/7);
    ellipse(40,40,mouseX/7,mouseX/7);

//blush will show up on the bunny's cheeks when mouse goes past 400 px of
//the canvas
if (mouseX>400){
  fill(255, 153, 153);
  ellipse(mouseX/7,innerearL-5,13,25);
  ellipse(mouseX/7,innerearR,13,25);
}
    pop();
}

This project was actually extremely hard for me. I had a lot of ideas and inspirations but it was hard for me to actually execute them. I started off with something like this where I wanted the rectangles to move in a clockwise direction. After I got the rectangles moving the direction I wanted, I couldn’t really figure out how to slow down the rate at which they were moving and to make sure they stayed within the canvas, so this idea ended up being scrapped. I then started fiddling with the mouseX and mouseY functions and was able to use that for background in my current project. I threw in a circle since I originally wanted to create something where there was a circle in the middle and as the mouse moved to the left, the circle would split into 4, then 16 and so forth, but then that too was a little too hard for me to comprehend. I ended up connecting to together random shapes that somehow ended up looking like an Android figure. I tried using the translate, push, pop and rotate functions we learned in lab to finish off my project.

The result was a figure that looked something like this.

I tried to refine the work and make it look a little more presentable and nicer to look at as well as changed the color scheme a bit. I hope I can learn to use new and different functions to use in my future projects but as of right now, I still don’t have a full grasp of many functions so this was the best I could do.

Looking Outwards-03-Section D

99 Failures Pavilion

This is the 99 Failures Pavilion, a temporary pavilion which was named in support of the idea that failure is beneficial to knowledge and success. It was created by Architecture graduate students and design professionals at the Digital Fabrication Lab at the University of Tokyo in November of 2013.

Many structural models were tested in order to find the right geometry that would allow this flat, stainless steel to become sturdy in its 3D form.  The stainless steel sheets were then welded together and formed to mimic pillows. I find it fascinating that even steel can appear as soft as it does in this project. It looks weightless and balloon-like.

Another element that I believe has helped this pavilion’s success is the golden tree behind it. Since it’s autumn, the structure seems more like a shelter for the cold days to come, and makes the steel more comforting. This ability to transform a material is what I appreciate most about this work. Architecture should not only be about functionality, but also about creating spaces with feeling.

danakim-LookingOutwards-03

Michael Hansmeyer; L-Systems in Architecture

Michael Hansmeyer’s L-Systems in Architecture explores the possibilities that L-Systems can open up in architecture. L-Systems is a string-rewriting algorithm that was created by biologist Aristid Lindenmayer. Lindenmayer created this algorithm to model simplified plants and their growth processes. Hansmeyer’s is an architect and programmer. His interests lie in the idea that architecture should be judged by the experiences that it produces. He takes advantage of computational methods to enhance these experiences intellectually and sensually.

There are two parts to the project. The first half explores which qualities of a design are essential to the logic of the algorithm. It considers methods for visualizing L-Systems. The second half incorporates aspects of parametric systems to expand the algorithm’s language. This part of the project explores the different ways that the L-System can react to its environment and how these adaptations can physically be applied to architectural design.

Nature has been the muse of many architects due to it’s forms and geometries. Many times the product of nature’s inspiration is executed too literally. Hansmeyer utilizes these characteristics as ways to improve the function of a building rather than to solely determine it’s form.

Michael Hansmeyer; L-Systems

Michael Hansmeyer; L-Systems
Michael Hansmeyer; L-Systems

 

aranders-project-03

aranders-project-03

//Anna Anderson
//Section D
//aranders@andrew.cmu.edu
//project-03

var pbsize = 30
var pbcolor = 0
var pbposition = 275
var jellysize = 30
var jellycolor = 0
var jellyposition = 25

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

function draw() {
  background(218, 145, 223)
  noStroke();

  //left bread
  fill(255);
  rect(50, 100, 200, 200);
  ellipse(50, 125, 50, 50);
  ellipse(250, 125, 50, 50);

  //right bread
  fill(255);
  rect(350, 100, 200, 200);
  ellipse(350, 125, 50, 50);
  ellipse(550, 125, 50, 50);

  //peanut butter color
  pbcolor = min(max(0, mouseX), 100);
  fill(216, 152, pbcolor);

  //peanut butter position and size
  pbsize = max(min(mouseX, 150));
  pbposition = max(min(mouseY, 375));
  rect(pbposition, 125, pbsize, pbsize);

  //jelly color
  jellycolor = min(max(0, mouseX), 100);
  fill(225, jellycolor, 225);

  //peanut butter position and size
  jellysize = max(min(mouseX, 150));
  jellyposition = max(min(mouseY, 75));
  rect(jellyposition, 125, jellysize, jellysize);

}

I really like peanut butter and jelly and thought this was a good opportunity to digitally spread the goodness. This project went relatively smoothly and was fun to create!

Jihee_SectionD_Project-03-Dynamic-Drawing

jiheek1_project3

//Jihee Kim
//15-104 MWF 9:30
//jiheek1@andrew.cmu.edu
//project3 dynamic drawing
//section D


var backgroundRed = 124;
var backgroundGreen = 124;
var backgroundBlue = 124;
var angle = 0;
var move = 0;
var wbSize = 100;


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


function draw() {
    //the background gets lighter in grayscale from left to right
    background(backgroundRed, backgroundGreen, backgroundBlue);
    backgroundRed = map(mouseX, 0, width, 0, 124);
    backgroundGreen = map(mouseX, 0, width, 0, 124);
    backgroundBlue = map(mouseX, 0, width, 0, 124);

    if (mouseX > width) {
        backgroundRed = 0;
        backgroundGreen = 0;
        backgroundBlue = 0;
    }

    if (mouseX < 0) {
        backgroundRed = 124;
        backgroundGreen = 124;
        backgroundBlue = 124;
    }

    //draw debris from destyoed buildlings floating, rotating in the air
    fill(255);
    noStroke();
    push();
    translate(100, 100);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 2, 2); //particle rotates
    pop();
    angle = angle + 2;
    move = move + 0.04;

    push();
    translate(280, 190);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 3, 3);
    pop();

    push();
    translate(25, 60);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 2, 2);
    pop();

    push();
    translate(500, 20);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 2, 2);
    pop();

    push();
    translate(320, 20);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 2, 2);
    pop();

    push();
    translate(50, 20);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 2, 2);
    pop();

    push();
    translate(555, 175);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 3, 3);
    pop();

    push();
    translate(545, 172);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 1, 1);
    pop();

    push();
    translate(530, 172);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 1, 1);
    pop();

    push();
    translate(190, 140);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 2, 2);
    pop();

    push();
    translate(185, 110);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 4, 4);
    pop();

    push();
    translate(20, 400);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 5, 5);
    pop();

    push();
    translate(400, 320);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 5, 5);
    pop();

    push();
    translate(375, 335);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 5, 5);
    pop();

    //add some randomness to the particles
    //position of the mouse will determine some particles' speed
    push();
    if (mouseY >= 240) {
        rotate(millis()/100); //bottom half of canvas = fast spinning speed
    }

    if (mouseY <= 240) {
        rotate(millis()/500); //top half of canvas = slow spinning speed
    }
    translate(50, 100);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 2, 2);
    pop();

    push();
    if (mouseY >= 240) {
        rotate(millis()/100); //bottom half of canvas = fast spinning speed
    }

    if (mouseY <= 240) {
        rotate(millis()/500); //top half of canvas = slow spinning speed
    }
    translate(50, 20);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 2, 2);
    pop();

    push();
    if (mouseY >= 240) {
        rotate(millis()/100); //bottom half of canvas = fast spinning speed
    }

    if (mouseY <= 240) {
        rotate(millis()/500); //top half of canvas = slow spinning speed
    }
    translate(310, 55);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 2, 2);
    pop();

    push();
    if (mouseY >= 240) {
        rotate(millis()/100); //bottom half of canvas = fast spinning speed
    }

    if (mouseY <= 240) {
        rotate(millis()/500); //top half of canvas = slow spinning speed
    }
    translate(310, 200);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 5, 5);
    pop();

    push();
    if (mouseY >= 240) {
        rotate(millis()/100); //bottom half of canvas = fast spinning speed
    }

    if (mouseY <= 240) {
        rotate(millis()/500); //top half of canvas = slow spinning speed
    }
    translate(550, 170);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 3, 3);
    pop();

    push();
    if (mouseY >= 240) {
        rotate(millis()/100); //bottom half of canvas = fast spinning speed
    }

    if (mouseY <= 240) {
        rotate(millis()/500); //top half of canvas = slow spinning speed
    }
    translate(510, 140);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 1, 1);
    pop();

    push();
    if (mouseY >= 240) {
        rotate(millis()/100); //bottom half of canvas = fast spinning speed
    }

    if (mouseY <= 240) {
        rotate(millis()/500); //top half of canvas = slow spinning speed
    }
    translate(165, 135);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 2, 2);
    pop();

    push();
    if (mouseY >= 240) {
        rotate(millis()/100); //bottom half of canvas = fast spinning speed
    }

    if (mouseY <= 240) {
        rotate(millis()/500); //top half of canvas = slow spinning speed
    }
    translate(150, 300);
    rotate(radians(angle));
    translate(move, 0);
    ellipse(0, 0, 5, 5);
    pop();

    //a wrecking ball swings across the canvas and breaks buildings
    //draw the chain (an array of same sized ellipses or 'beads')
    //the swinging range beads increases from top to bottom
    fill(0);
    var bx1 = map(mouseX, 0, width, 100, 420); //limit of swing in x direction
    var by1 = map(mouseY, 0, height, 0, 20);
    ellipse(bx1, by1, 20, 20); //draw the first (top) bead of the chain
    var bx2 = map(mouseX, 0, width, 98, 424);
    var by2 = map(mouseY, 0, height, 20, 40);
    ellipse(bx2, by2, 20, 20); //draw second bead of the chain
    var bx3 = map(mouseX, 0, width, 95, 428);
    var by3 = map(mouseY, 0, height, 40, 60);
    ellipse(bx3, by3, 20, 20); //draw third bead of the chain
    var bx4 = map(mouseX, 0, width, 92, 432);
    var by4 = map(mouseY, 0, height, 60, 80);
    ellipse(bx4, by4, 20, 20); //draw fouth bead of the chain
    var bx5 = map(mouseX, 0, width, 88, 440);
    var by5 = map(mouseY, 0, height, 80, 100);
    ellipse(bx5, by5, 20, 20); //draw fifth bead of the chain
    var bx6 = map(mouseX, 0, width, 84, 452);
    var by6 = map(mouseY, 0, height, 100, 120);
    ellipse(bx6, by6, 20, 20); //draw sixth bead of the chain
    var bx7 = map(mouseX, 0, width, 79, 468);
    var by7 = map(mouseY, 0, height, 120, 140);
    ellipse(bx7, by7, 20, 20); //draw seventh bead of the chain
    var bx8 = map(mouseX, 0, width, 74, 480);
    var by8 = map(mouseY, 0, height, 140, 160);
    ellipse(bx8, by8, 20, 20); //draw eighth bead of the chain
    var bx9 = map(mouseX, 0, width, 68, 502);
    var by9 = map(mouseY, 0, height, 160, 180);
    ellipse(bx9, by9, 20, 20); //draw ninth bead of the chain
    var bx10 = map(mouseX, 0, width, 62, 528);
    var by10 = map(mouseY, 0, height, 180, 200);
    ellipse(bx10, by10, 20, 20); //draw tenth bead of the chain
    var bx11 = map(mouseX, 0, width, 56, 555);
    var by11 = map(mouseY, 0, height, 200, 220);
    ellipse(bx11, by11, 20, 20); //draw eleventh bead of the chain

    //draw the wrecking ball
    var wbx = map(mouseX, 0, width, 50, 595);
    var wby = map(mouseY, 0, height, 220, 265);
    ellipse(wbx, wby, wbSize, wbSize);

    //the wrecking ball gets bigger as it approaches both extremes of width
    if(mouseX < width/2) {
        wbSize = ((-mouseX+30) & (mouseY)); //gets bigger by left edge
    }
    if(mouseX > width/2) {
        wbSize = ((mouseX*0.5+50) & (mouseY)); //gets bigger by right edge
    }

    //draw the buildings
    //make so that buildings shrink when touched by wrecking ball
    //building 1
    if(mouseX > 0 & mouseX < 45) {
        fill(255);
        noStroke();
        rect(0, height-165, 45, 165); //building before being touched by ball
    }
    else{
        fill(255);
        noStroke();
        rect(0, height-180, 45, 180); //building gets shorter by 15
    }
    //draw windows
    fill(0);
    rect(5, height-175, 5, 10); //row1
    rect(15, height-175, 5, 10);
    rect(25, height-175, 5, 10);
    rect(35, height-175, 5, 10);

    rect(5, height-155, 5, 10); //row2
    rect(15, height-155, 5, 10);
    rect(25, height-155, 5, 10);
    rect(35, height-155, 5, 10);

    rect(5, height-135, 5, 10); //row3
    rect(15, height-135, 5, 10);
    rect(25, height-135, 5, 10);
    rect(35, height-135, 5, 10);

    rect(5, height-115, 5, 10); //row4
    rect(15, height-115, 5, 10);
    rect(25, height-115, 5, 10);
    rect(35, height-115, 5, 10);

    rect(5, height-95, 5, 10); //row5
    rect(15, height-95, 5, 10);
    rect(25, height-95, 5, 10);
    rect(35, height-95, 5, 10);

    rect(5, height-75, 5, 10); //row6
    rect(15, height-75, 5, 10);
    rect(25, height-75, 5, 10);
    rect(35, height-75, 5, 10);

    rect(5, height-55, 5, 10); //row7
    rect(15, height-55, 5, 10);
    rect(25, height-55, 5, 10);
    rect(35, height-55, 5, 10);

    //draw building 2
    if(mouseX > 55 & mouseX < 100) {
        fill(255);
        noStroke();
        rect(55, height-145, 45, 145);
    }
    else{
        fill(255);
        noStroke();
        rect(55, height-160, 45, 160); //building gets shorter by 15
    }
    //draw windows
    fill(0);
    rect(60, height-155, 5, 10); //row1
    rect(70, height-155, 5, 10);
    rect(80, height-155, 5, 10);
    rect(90, height-155, 5, 10);

    rect(60, height-135, 5, 10); //row2
    rect(70, height-135, 5, 10);
    rect(80, height-135, 5, 10);
    rect(90, height-135, 5, 10);

    rect(60, height-115, 5, 10); //row3
    rect(70, height-115, 5, 10);
    rect(80, height-115, 5, 10);
    rect(90, height-115, 5, 10);

    rect(60, height-95, 5, 10); //row4
    rect(70, height-95, 5, 10);
    rect(80, height-95, 5, 10);
    rect(90, height-95, 5, 10);

    rect(60, height-75, 5, 10); //row5
    rect(70, height-75, 5, 10);
    rect(80, height-75, 5, 10);
    rect(90, height-75, 5, 10);

    rect(60, height-45, 5, 10); //row6
    rect(70, height-45, 5, 10);
    rect(80, height-45, 5, 10);
    rect(90, height-45, 5, 10);

    rect(60, height-25, 5, 10); //row7
    rect(70, height-25, 5, 10);
    rect(80, height-25, 5, 10);
    rect(90, height-25, 5, 10);

    //draw building 3
    if(mouseX > 110 & mouseX < 160) {
        fill(255);
        noStroke();
        rect(110, height-95, 50, 95);
    }
    else{
        fill(255);
        noStroke();
        rect(110, height-130, 50, 130); //building gets shorter by 35
    }
    //draw windows
    fill(0);
    rect(115, height-125, 10, 10); //row1
    rect(130, height-125, 10, 10);
    rect(145, height-125, 10, 10);

    rect(115, height-110, 10, 10); //row2
    rect(130, height-110, 10, 10);
    rect(145, height-110, 10, 10);

    rect(115, height-90, 10, 10); //row3
    rect(130, height-90, 10, 10);
    rect(145, height-90, 10, 10);

    rect(115, height-75, 10, 10); //row4
    rect(130, height-75, 10, 10);
    rect(145, height-75, 10, 10);

    rect(115, height-55, 10, 10); //row5
    rect(130, height-55, 10, 10);
    rect(145, height-55, 10, 10);

    rect(115, height-40, 10, 10); //row6
    rect(130, height-40, 10, 10);
    rect(145, height-40, 10, 10);

    rect(125, height-10, 20, 10); //row7

    //draw building 4
    if(mouseX > 170 & mouseX < 210) {
        fill(255);
        noStroke();
        rect(170, height-105, 40, 105);
    }
    else{
        fill(255);
        noStroke();
        rect(170, height-120, 40, 120); //building gets shorter by 15
    }
    //draw windows
    fill(0);
    rect(173, height-115, 5, 10); //row1
    rect(183, height-115, 5, 10);
    rect(193, height-115, 5, 10);
    rect(203, height-115, 5, 10);

    rect(173, height-100, 5, 10); //row2
    rect(183, height-100, 5, 10);
    rect(193, height-100, 5, 10);
    rect(203, height-100, 5, 10);

    rect(173, height-85, 5, 10); //row3
    rect(183, height-85, 5, 10);
    rect(193, height-85, 5, 10);
    rect(203, height-85, 5, 10);

    rect(173, height-70, 5, 10); //row4
    rect(183, height-70, 5, 10);
    rect(193, height-70, 5, 10);
    rect(203, height-70, 5, 10);

    rect(173, height-55, 5, 10); //row5
    rect(183, height-55, 5, 10);
    rect(193, height-55, 5, 10);
    rect(203, height-55, 5, 10);

    //draw building 5
    if(mouseX > 225 & mouseX < 280) {
        fill(255);
        noStroke();
        rect(225, height-90, 55, 90);
    }
    else{
        fill(255);
        noStroke();
        rect(225, height-100, 55, 100); //building gets shorter by 10
    }
    //draw windows
    fill(0);
    rect(230, height-95, 5, 5); //row1
    rect(240, height-95, 5, 5);
    rect(250, height-95, 5, 5);
    rect(260, height-95, 5, 5);
    rect(270, height-95, 5, 5);

    rect(230, height-85, 5, 5); //row2
    rect(240, height-85, 5, 5);
    rect(250, height-85, 5, 5);
    rect(260, height-85, 5, 5);
    rect(270, height-85, 5, 5);

    rect(230, height-75, 5, 5); //row3
    rect(240, height-75, 5, 5);
    rect(250, height-75, 5, 5);
    rect(260, height-75, 5, 5);
    rect(270, height-75, 5, 5);

    rect(230, height-65, 5, 5); //row4
    rect(240, height-65, 5, 5);
    rect(250, height-65, 5, 5);
    rect(260, height-65, 5, 5);
    rect(270, height-65, 5, 5);

    rect(230, height-55, 5, 5); //row5
    rect(240, height-55, 5, 5);
    rect(250, height-55, 5, 5);
    rect(260, height-55, 5, 5);
    rect(270, height-55, 5, 5);

    rect(230, height-45, 5, 5); //row6
    rect(240, height-45, 5, 5);
    rect(250, height-45, 5, 5);
    rect(260, height-45, 5, 5);
    rect(270, height-45, 5, 5);

    rect(230, height-35, 5, 5); //row7
    rect(240, height-35, 5, 5);
    rect(250, height-35, 5, 5);
    rect(260, height-35, 5, 5);
    rect(270, height-35, 5, 5);

    rect(230, height-25, 5, 5); //row8
    rect(240, height-25, 5, 5);
    rect(250, height-25, 5, 5);
    rect(260, height-25, 5, 5);
    rect(270, height-25, 5, 5);

    rect(230, height-15, 5, 5); //row9
    rect(240, height-15, 5, 5);
    rect(250, height-15, 5, 5);
    rect(260, height-15, 5, 5);
    rect(270, height-15, 5, 5);

    //draw building 6
    if(mouseX > 290 & mouseX < 355) {
        fill(255);
        noStroke();
        rect(290, height-100, 65, 100);
    }
    else{
        fill(255);
        noStroke();
        rect(290, height-120, 65, 120); //building gets shorter by 20
    }
    //draw windows
    fill(0);
    rect(295, height-95, 15, 10); //row1
    rect(315, height-95, 15, 10);
    rect(335, height-95, 15, 10);

    rect(295, height-80, 15, 10); //row2
    rect(315, height-80, 15, 10);
    rect(335, height-80, 15, 10);

    rect(295, height-65, 15, 10); //row3
    rect(315, height-65, 15, 10);
    rect(335, height-65, 15, 10);

    rect(295, height-45, 15, 10); //row4
    rect(315, height-45, 15, 10);
    rect(335, height-45, 15, 10);

    rect(295, height-30, 15, 10); //row5
    rect(315, height-30, 15, 10);
    rect(335, height-30, 15, 10);

    rect(295, height-15, 15, 10); //row6
    rect(315, height-15, 15, 10);
    rect(335, height-15, 15, 10);

    //draw building 7
    if(mouseX > 370 & mouseX < 415) {
        fill(255);
        noStroke();
        rect(370, height-90, 45, 90);
    }
    else{
        fill(255);
        noStroke();
        rect(370, height-100, 45, 100); //building gets shorter by 10
    }
    //draw windows
    fill(0);
    rect(374, height-95, 7, 5); //row1
    rect(384, height-95, 7, 5);
    rect(394, height-95, 7, 5);
    rect(404, height-95, 7, 5);

    rect(374, height-85, 7, 5); //row2
    rect(384, height-85, 7, 5);
    rect(394, height-85, 7, 5);
    rect(404, height-85, 7, 5);

    rect(374, height-75, 7, 5); //row3
    rect(384, height-75, 7, 5);
    rect(394, height-75, 7, 5);
    rect(404, height-75, 7, 5);

    rect(374, height-65, 7, 5); //row4
    rect(384, height-65, 7, 5);
    rect(394, height-65, 7, 5);
    rect(404, height-65, 7, 5);

    rect(374, height-55, 7, 5); //row5
    rect(384, height-55, 7, 5);
    rect(394, height-55, 7, 5);
    rect(404, height-55, 7, 5);

    rect(374, height-45, 7, 5); //row6
    rect(384, height-45, 7, 5);
    rect(394, height-45, 7, 5);
    rect(404, height-45, 7, 5);

    rect(374, height-35, 7, 5); //row7
    rect(384, height-35, 7, 5);
    rect(394, height-35, 7, 5);
    rect(404, height-35, 7, 5);

    rect(374, height-25, 7, 5); //row8
    rect(384, height-25, 7, 5);
    rect(394, height-25, 7, 5);
    rect(404, height-25, 7, 5);

    rect(374, height-15, 7, 5); //row9
    rect(384, height-15, 7, 5);
    rect(394, height-15, 7, 5);
    rect(404, height-15, 7, 5);

    //draw building 8
    if(mouseX > 425 & mouseX < 466) {
        fill(255);
        noStroke();
        rect(425, height-95, 41, 95);
    }
    else{
        fill(255);
        noStroke();
        rect(425, height-110, 41, 110); //building gets shorter by 15
    }
    //draw windows
    fill(0);
    rect(428, height-105, 5, 10); //row1
    rect(438, height-105, 5, 10);
    rect(448, height-105, 5, 10);
    rect(458, height-105, 5, 10);

    rect(428, height-88, 5, 10); //row2
    rect(438, height-88, 5, 10);
    rect(448, height-88, 5, 10);
    rect(458, height-88, 5, 10);

    rect(428, height-71, 5, 10); //row3
    rect(438, height-71, 5, 10);
    rect(448, height-71, 5, 10);
    rect(458, height-71, 5, 10);

    rect(428, height-54, 5, 10); //row4
    rect(438, height-54, 5, 10);
    rect(448, height-54, 5, 10);
    rect(458, height-54, 5, 10);

    //draw building 9
    if(mouseX > 479 & mouseX < 530) {
        fill(255);
        noStroke();
        rect(479, height-105, 51, 105);
    }
    else{
        fill(255);
        noStroke();
        rect(479, height-140, 51, 140); //building gets shorter by 35
    }
    //draw windows
    fill(0);
    rect(482, height-135, 5, 10); //row1
    rect(492, height-135, 5, 10);
    rect(502, height-135, 5, 10);
    rect(512, height-135, 5, 10);
    rect(522, height-135, 5, 10);

    rect(482, height-115, 5, 10); //row2
    rect(492, height-115, 5, 10);
    rect(502, height-115, 5, 10);
    rect(512, height-115, 5, 10);
    rect(522, height-115, 5, 10);

    rect(482, height-95, 5, 10); //row3
    rect(492, height-95, 5, 10);
    rect(502, height-95, 5, 10);
    rect(512, height-95, 5, 10);
    rect(522, height-95, 5, 10);

    rect(482, height-75, 5, 10); //row4
    rect(492, height-75, 5, 10);
    rect(502, height-75, 5, 10);
    rect(512, height-75, 5, 10);
    rect(522, height-75, 5, 10);

    rect(482, height-55, 5, 10); //row5
    rect(492, height-55, 5, 10);
    rect(502, height-55, 5, 10);
    rect(512, height-55, 5, 10);
    rect(522, height-55, 5, 10);

    rect(482, height-35, 5, 10); //row6
    rect(492, height-35, 5, 10);
    rect(502, height-35, 5, 10);
    rect(512, height-35, 5, 10);
    rect(522, height-35, 5, 10);

    rect(495, height-10, 20, 10); //row7

    //draw building 10
    if(mouseX > 540 & mouseX < 585) {
        fill(255);
        noStroke();
        rect(540, height-120, 45, 120);
    }
    else{
        fill(255);
        noStroke();
        rect(540, height-150, 45, 150); //building gets shorter by 30
    }
    //draw windows
    fill(0);
    rect(545, height-145, 20, 10); //row1
    rect(570, height-145, 10, 10);

    rect(540, height-130, 15, 10); //row2
    rect(560, height-130, 10, 10);
    rect(575, height-130, 10, 10);

    rect(540, height-115, 5, 10); //row3
    rect(550, height-115, 10, 10);
    rect(565, height-115, 20, 10);

    rect(540, height-100, 10, 10); //row4
    rect(555, height-100, 20, 10);
    rect(580, height-100, 5, 10);

    rect(540, height-85, 5, 10); //row5
    rect(550, height-85, 10, 10);
    rect(565, height-85, 20, 10);

    rect(540, height-70, 15, 10); //row6
    rect(560, height-70, 10, 10);
    rect(575, height-70, 10, 10);

    rect(545, height-55, 20, 10); //row7
    rect(570, height-55, 10, 10);

    rect(540, height-40, 15, 10); //row8
    rect(560, height-40, 10, 10);
    rect(575, height-40, 10, 10);

    rect(540, height-25, 5, 10); //row9
    rect(550, height-25, 10, 10);
    rect(565, height-25, 20, 10);

    rect(540, height-10, 10, 10); //row10
    rect(555, height-10, 20, 10);
    rect(580, height-10, 5, 10);

    //draw building 11
    if(mouseX > 595 & mouseX < 640) {
        fill(255);
        noStroke();
        rect(595, height-110, 45, 110);
    }
    else{
        fill(255);
        noStroke();
        rect(595, height-135, 45, 135); //building gets shorter by 25
    }
    //draw windows
    fill(0);
    rect(602, height-125, 10, 10); //row 1
    rect(622, height-125, 10, 10);

    rect(602, height-105, 10, 10); //row2
    rect(622, height-105, 10, 10);

    rect(602, height-85, 10, 10); //row3
    rect(622, height-85, 10, 10);

    rect(602, height-65, 10, 10); //row4
    rect(622, height-65, 10, 10);

    rect(602, height-45, 10, 10); //row5
    rect(622, height-45, 10, 10);
}

sketch

For my project, I made a dynamic drawing that is controlled by the mouse, or the user. I varied several elements, including size, color, rotation and position.

The user can move the wrecking ball to wherever in the canvas and manipulate the size of the buildings. One can see that the size of the ball itself changes, according to position as well. The size of the wrecking ball is largest when the mouse is located on both extremes of the width. The height of the buildings decreases when approached by the ball.

As for colors, as you move the mouse from left to right, the background changes from dark to light.

Another element that the mouse controls is the particles floating in air. It could be considered stars or dust. When the mouse is in the bottom half of the canvas, the particles rotate at a faster pace than they do when the mouse is in the top half of the canvas.

I would say that some challenges came from how tedious my design was. I also wish that I could have made the windows on the buildings to change color in the same fashion that the background does to keep it more consistent.

Jihee Kim (Section D)– LookingOutwards-03.

A design based on algorithms that interested me is the auditorium in the Elbphilharmonie, which is a concert hall in Hamburg designed by an architecture firm called Herzog and de Meuron and opened in 2017. The Elbphilharmonie is a complex that resembles a city; it offers many different attractions, such as the main philharmonic hall, music hall and restaurants.

construction of the main auditorium
a closeup of individual, unique cells

TThe building complex as a whole is extremely intricate, with its many geometries and attractive materiality but an area that is more impressive in regards to its use of technology would be the largest concert hall. The concert hall was created based on algorithms. Over 10 years, architects Jacques Herzog and Pierre de Mueron created about 10,000 gypsum fiber acoustic panels that cover the walls. Basically, the entire auditorium is covered in algorithmic, NURBS-based cells that look like shallow dugouts in the sand. The concave cells look like they were hand-carved, but were actually milled with CNC milling machines, based on precise calculations made computationally. The algorithm that lies underneath varies the characteristic of each cell so that individual cells play their unique role in handling the sounds and perfectly fill up the walls. Some of the variables here are depth, radius and splits, as seen in the image directly below.

variables of each carved cell

With the help of an acoustician (Yasuhisa Toyota) the architects were able to create and fabricate a space that insures the highest acoustic qualities that a music hall can ask for. The variations that the algorithm randomly creates within its parameters significantly affect the sound in the auditorium. Depending on the shape of the surface that sound waves hit, the sound gets manipulated differently: some are absorbed by the surface, while others are disseminated, ultimately creating a balanced harmonic sound.

Algorithms in this case allowed the firm to manifest its style of conveying through materials and complex geometries and suggest at infinite possibilities of creating structures that require such finesse that might not be achievable through manual work.

Official Webpage of Project

 

 

aranders-lookingoutwards-03

A piece called Sunflowers made in 2013 by Rob and Nick Carter made an impression (sorry for the pun) on me. The work is a 3D replication of Vincent Van Gogh’s painting of the same name.  The duo recreated the painting by translating the 2D brushstrokes into 360 degree perspective. They then used 3D printing to cast the sculpture in bronze. I admire the work because of the way it brings Van Gogh’s painting to life. It is a precise piece that displays the signature way in which Van Gogh painted. The movement and energy of his brushstrokes is seen in the sculpture. The algorithms for the base of the sculpture were not that refined. The great detail came in with the use of zbrush.

link

jennyzha – looking outwards – 03

3-D Printable Connectors

diy table surface supports

This project uses 3D printers and materials to lend a hand to more hands on projects that link computational projects to physical DIY projects. Overall, what I love is that this project solves is the common problem of the complexities involving dIY furniture construction; therefore only enhancing a non-computer activity, rather than entirely replacing it.

Not only does this project help the building part of furniture construction, but it also has goals in more efficient packaging, given that the larger wooden pieces can be flat-packaged with these connectors.Even more, buyers would be able to create their own furniture from scratch if desired with these easy to use parts.

diy furniture connector plastic

Although I am not sure about what the artists inspirations were or what algorithms were used, I do know that the solution uses strong triangular shapes for structural support and requires only the most basic screwdrivers to finish the product.