Liu Xiangqi-Project03

sketch


// Liu Xiangqi xiangqil@andrew.cmu.edu Section-A Project-03
var backR = 255;
var backG = 219;
var backB = 77;
var radian = 0;
var size = 150;
var roundR = 255;
var roundG = 102;
var roundB = 0;
function setup() {
    createCanvas(640, 480)
}
 
function draw() {
    background(backR, backG, backB);
    noStroke();
    //change the background color 
    backR = map(mouseX, 0, width, 255, 0);
    backG = map(mouseX, 0, width, 219, 20);
    backB = map(mouseX, 0, width, 77, 51);
    
    if (mouseX > width ) {
        backR = 0;
        backG = 20;
        backB = 51;
    }
    
    if (mouseX < 0) {
        backR = 255;
        backG = 219;
        backB = 77;
    }
    
    //change the position of the moon/sun
    push();
    radian = map(mouseX, 0, width, 0, 1.57);
    translate(320,0);
    rotate(radian);
    
    //change the color
    roundR = map(mouseX, 0, width, 255, 255);
    roundG = map(mouseX, 0, width, 102,255);
    roundB = map(mouseX, 0, width, 0, 0); 
    fill(roundR, roundG, roundB);
    ellipse(200, 75, 150, 150);
    
    //change the size of the breach
    size = map(mouseX, 0, width, 0, 150);
    fill(backR, backG, backB)
    ellipse(200, 150, size, size);
    pop();
}   

I don’t know why the moon stuck in the middle of the canvas. It moves smoothly to the upper-left corner on my browser.

rnayyar- Dynamic Drawing; project 3

I had a lot of issues coming up with an idea but looking at my ceiling fan for a little while helped me come to this quirky conclusion. Windmills are neat, I like them a lot, and I was inspired to create this. The mouseX position correlates to the current weather inside the canvas and the mouseY position correlates to the blade speed depending on the weather 🙂
Figuring out how to make the blades go faster took a long time. I tried to make a variable called Windspeed for the “rotate(milli()/1000);” part, and just have it as “rotate(Windspeed);” but that broke my code… and so did many other variations of that variable attempt… So I just had to manually change it with a conditional and by switching 1000 to 500 and 200 depending on the mouseY… That was fun. 
sketch

//Rhea Nayyar
// Section C
//rnayyar@andrew.cmu.edu
//Project 03-C; Dynamic Drawing

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

function draw() {
	background("SkyBlue"); //sky
   if (mouseX>=150){
     background(105); //cloudy sky
   }
   if(mouseX>=350){
     background(random(80,145)); //stormy sky
   }
  fill('YellowGreen'); //field
  rect(0,400,640,480);
  fill("OliveDrab"); //mountains
  quad(-70,400, 100,400,45,310,-30,390);
  quad(0,400,300,400,100,330,21,400);
  quad(275,400,480,400,480,310,420);
  push();
  translate(width/2,height/2);
  fill('DarkRed'); //Windmill stalk
  quad(-40,0, 30,0, 70, 200, -60,200);
  fill("DimGrey"); //disk behind windmill blades
  ellipse(0,0,50,50);
  fill(0); //door
  stroke('Yellow'); //molding
  rect(-10,150,30,50);
  fill("White"); //windmill blades
  noStroke();
   if (mouseY>=200){
     rotate(millis()/500); //mid-speed (cloudy)
   }
   if (mouseY>=420){
     rotate(millis()/100); //super-speed (stormy)
   }
  rotate(millis()/1000); //regular speed (normal)
  rotate(radians(100));
  quad(0,0,95,0,85,30,10,30);
  rotate(radians(260));
  quad(0,0,95,0,85,30,10,30);
  rotate(radians(270));
  quad(0,0,95,0,85,30,10,30);
  rotate(radians(275));
  quad(0,0,95,0,85,30,10,30);
  pop();
}

Sarita Chen – Project 03 – Dynamic Drawing

sketch

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

}

function draw() {
	// Changes the colours from Red to Blue when the mouse is moved horizontally.
	 colR= map(mouseX,220,width,220,180);
	 colG= map(mouseX,180,width,100,180);
	 colB= map(mouseX,190,width,100,255);
	 background(colR,colG,colB);
	 noStroke();
	// Declares variables for height and width of shapes.
	 varOpp = width - mouseX;
	 var cH = 70;
	 var cW = 70;

	// Changes the size when the mouse is moved horizontally.
	 var cH = map(mouseX,0,width,250,0);
	 fill(255,255,255);
	 ellipse(width/2,height/4,cW,cH);

	 fill(180,170,255);
	 rect(mouseX+200,height/3,cW,cH);

	 fill(255,170,255);
	 rect(mouseX,height/2,cW,cH);

	 fill(255,170,255);
	 rect(varOpp,height/2,cW,cH);

	  fill(180,170,255);
	  rect(varOpp-200,height/2,cW,cH);

	 fill(255,170,255);
	 rect(mouseX,height/4,cW,cH);

	 fill(255,170,255);
	 rect(varOpp,height/1.5,cW,cH);
}

I took inspiration from the first deliverables assignment, so I’d say what I came up with is pretty simple. What I want to work on for next time is adding more depth to the movement of graphics, since this is pretty 2-dimensional.

Looking Outwards 3- fahz

 

An example of a Fahz by Nicholas Desbiens
An example of a Fahz by Nicholas Desbiens
Base of fahz by Nicholas Desbiens
Base of fahz by Nicholas Desbiens. Tick marks show the precise location of each profile.

Fahz initially started as a project by Nicholas Desbiens in 2015 for Mother’s Day. It created a customized 5″ vase that seamlessly incorporated the faces of him and his two children in the vase’s surface structure. Utilizing a custom software program he calls the “Fahz-o-matic” built by Rhino, Grasshopper, Python and Processing, he made a digital model of each person’s profile headshot. The variables for this probably include the distance from each point on the face to the y-axis. Then, he rotated the 2D models about the y-axis generating a 3-D vase. Finally, 3D printers bring the algorithms to life. The material used is a plastic called PLA. Desbiens’s intentional decisions include utilizing negative space. The coding also determines how to join each slice of the vase together. Because the height and depth of each face on an individual vase is different, the program needs to decide which two faces are joined together and how many to join together. (12 faces generated a “dog-bowl” rather than a vase)

Closeup of fahz by Nicholas  Desbiens Tick marks show the precise location of each profile.
Closeup of synthetic sandstone fahz by Nicholas Desbiens

This project was inspired by Edgar Rubin’s Figure–Ground Vase. It is inspirational that coding can bring 2D art from 100 years ago into a customized 3D sculpture today. This Digital Pottery project has now expanded into a business that allows customers to submit profile pictures and get a customized vase. Building on Professor Levin’s idea, each individual vase is already fascinating, but the program that creates infinite varieties of it is priceless.

Sources

fahz

Desbiens Design Research – fahz

Check out the video:

Nicholas and Martha Desbiens talking about fahz on Kickstarter

Liu Xiangqi-Lookingoutwards-03

The project “A Unified Approach to Grown Structures” by MIT Media Lab interests me a lot. It utilizes computational approach and associated protocol to imitate growth-a natural process. I admire this a lot because it reminds people of a neglected truth that growth is achieved by duplication of cells and mutations. And also it challenges the definition of life–if life can be artificial? Is life developed randomly? The growth procedure is essentially a deformation and iteration. The initial geometric representation is deformed by data from geometric input representation(phenotype), intermediate representation(genotype) and a coarse implicit representation(developed from two previous representations). As the input representation changes, the deformation is repeated.

unified-approach

A Unified Approach to Grown Structures by MIT Media Lab

<A Unified Approach to Grown Structure

Jiyoung Ahn – 03 – Dynamic drawing

I tried to review things that I have learned. I created a pattern, and tried to show different effects like color,scale change by using one interaction (by just moving x-axis cursor).

sketch

//Jiyoung Ahn
//section A
//jiyounga@andrew.cmu.edu
//project 03

  var intervX = 60; 
  var intervY = 60; 
  var Xspace = 35; 
  var Yspace= 35; 


  var crvd1 = 0;
  var crvd2 = 10;
  var crvd3 = 20;
  var crvd4 = 30;  

  var rectS1 = 10;
  var rectS2 = 20;
  var rectS3 = 30;
  var rectS4 = 40;

  var dir = 1;
  var speed = 5;
  var diam = 50;

  var rectt= 2;

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

}


function draw() {


  var colorOne = map(mouseX, 246, height, 246,235,159); 
  var colorTwo = map(mouseX, 114, height, 159,208,246); 
  var colorThree = map(mouseX, 76, height, 196,246,159); 

  background(colorOne,colorTwo,colorThree);// color background change 

  var x = 300;
  var dir = 1;
  var speed = 5;

 


  
  for (var y = 0; y < 6; y++) {
    if ( y % 2== 0){
      for (var x =0; x <11; x++){
        var my = Yspace + y * intervY;
        var mx = Xspace + x * intervX;
        noStroke ();
        rectMode (CENTER);
        deg = radians (30);

        fill (135,192,250);
        rect (mx, my, rectS4, rectS4, crvd1);
        
        fill (170,204,239);
        rect (mx, my, rectS3, rectS3, crvd2);
        
        fill (249,253,143);
        rect (mx, my, rectS2, rectS2, crvd3);
        
        fill (255);
        rect (mx, my, rectS1, rectS1, crvd4);

         rotate(radians(map(mouseX, 0, height, 0, rectt)));// rotates when move mouse to X axis.
      }
    }

    else {

      for (var x = -10; x< 10; x++){
        var my = Yspace+ y * intervY;
        var mx = intervX/2 + Xspace + x * intervX

        fill (255, 171, 230);
        rect (mx, my, rectS4, rectS4);
        
        fill (251,209,239);
        rect (mx, my, rectS3, rectS3);
        
        fill (177,221,160);
        rect (mx, my, rectS2, rectS2);
        
        fill (255);
        rect (mx, my, rectS1, rectS1);
        
      }
  
    }
    if ((mouseX>80) & (mouseX<340)){  
    crvd4= map(mouseX,280,580,150,300);
    rectS4= map(mouseX,280,580,45,100);
    }  //pink, blue squares expand when you move mouse left to right
    

  }
}

It was quite a challenge for me to create a pattern with six lines. I had to figure out how to place them continuously.

 

Looking Outwards 3 – Lydia Jin

24665717146_a4b22340b2_b

The project is a mini guitar printed out by a 3D printer. I really like how guitar looks delicate and actually shows a lot of details in its design. The tiny guitar sculpture serves as a guitar stand making it both artistic and practical. The material is plastic with a white matte finish. The guitar can also stand by itself. I am not very sure about the algorithm behind its design. There is limited description on the making of the product. The guitar is for sale of 20 dollars each. It shows that the artist Georg Kreuter is really into details and his products look very exquisite. In the ads on his website, the artist put the white guitar next to a regular sized black guitar. This shows that he likes contrasts. The creation was printed in 2016 and the name is Gibson Les Paul.
24665717086_1fb616395d_h

http://www.shapeways.com/product/P6LSXDESU/gibson-les-paul-scale-1-6?optionId=58806394

Brian Bizier Project 03

Brian Bizier Project 03

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

	noStroke();
}

function draw(){

	background("royalblue");


	fill("tan");
	rect(width-mouseX,125,250,150);

	fill("darkslategray");
	rect(300,height-mouseY,150,250);

	fill("seagreen");
	ellipse(150,475,width-mouseX,height-mouseY);

	fill("red");
	rect(mouseX+20,mouseY,10,10);

	fill("red")
	rect(mouseX-20,mouseY,10,10);

	fill("ivory");
	rect(mouseX,mouseY+20,10,10);

	fill("ivory");
	rect(mouseX,mouseY-20,10,10);

}

I’m happy that I finally figured out some of those darn mouse-related things. Stuff I want to work on for next time: Getting objects to move “independently” and incorporating randomness. 🙂

Dynamic Drawing-Lydia Jin

sketch

var offset=50;
var barX=offset
var barY;
var barW;
var barH=30;
var sliderX = offset
var sliderY;
var sliderW=50;
var sliderH=30;
var modify=50;
var colorR=133;
var colorG=209;
var colorB=228;

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

function draw() {
	background(colorR,colorG,colorB);
	fill(255);
	barY=height-50;
	barW=width-2*offset;
	rect(barX,barY,barW,barH);
	//draw slider box
	fill(247,176,193);
	sliderY=barY
	rect(sliderX,sliderY,sliderW,sliderH);
	//draw slider
	fill(144,217,148);
	ellipse(modify,modify,modify/2);
	//draw circle in the top left corner
	fill(116,100,185);
	ellipse(640-modify,480-modify,modify/2);
	//draw circle in the bottom right corner
	fill(255,204,222);
	ellipse(640-modify,modify,modify/2);
	//draw circle in bottom left corner
	fill(255,107,29);
	ellipse(modify,480-modify,modify/2);
	//draw circle in top right corner
	push();
	translate(width/2,height/2);
	rotate(millis()/sliderX);
	fill(62+sliderX/5,116,44);
	rotate(radians(0));
	ellipse(50,50,50,100);
	rotate(radians(50));
	ellipse(100,100,50,100);
	rotate(radians(100));
	ellipse(150,150,50,100);
	rotate(radians(150));
	ellipse(200,200,50,100);
	pop();
	//draw leaves falling down, leaves rotate in different speeds. 
	//Leaves turn from green to brown as slider moves.
}

function mouseMoved(){
	var sliderMax=width-offset-sliderW;
	if (mouseY>=barY & mouseY<=barY+barH){
        sliderX=max(min(mouseX,sliderMax),barX);
	    modify=sliderX/0.8+50;
	// if statement restrains that mouse can only be moved within the slider bar. The modify changes shapes of the circles. 
	}


}

The drawing I am presenting is named falling leaves. The user can put their mouse on the slider and move the mouse within the slider bar to see changes of how the tornado turned leaves from green to brown. The leaves spin really fast in the beginning and slows down once the slider is at the right end. The 4 circles represent people as they come and go and disappear. It should leave a sad feeling in the end as the leaves slowly whirls.

zhuoyinl-Project-03

my-sketch.js

//Zhuoying Lin
//section A
//zhuoyinl@andrew.cmu.edu
//project03


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

function draw() {
	background('lightPink');

	//box
	fill(255-(0.1*mouseX));
	noStroke();
	rect(0, 400-(0.75*mouseX), 0.125*mouseX, 0.125*mouseX);
	rect(mouseX, 0, 0.125*mouseX, 0.125*mouseX);
	rect(560-mouseX, 400, 0.125*mouseX, 0.125*mouseX);
	rect(560, 0.75*mouseX, 0.125*mouseX, 0.125*mouseX);

	//circles
	push();
	fill(255-(0.5*mouseX));
	noStroke();
	translate(320, 240);
	rotate((millis())/(mouseX*10));
	ellipse(-50, 0, 100, 100);
	fill(0+(0.5*mouseX));
	ellipse(50, 0, 100, 100);
	pop();

}

I tried to make some uniformed variables that changing with mouse movement and form a pattern. Here is my solution.