manuelr – project03 – curtains

sketch

var posx = 20;
var posy = 20;
var posyb = 20;
var posx1 =20;
var posy1 = 20;
var dirX = 1;
var diam = 30;
var falling = 1.1;
var diam1 =30;

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

}

function draw() {
    background (157,156,201);

    for (var x = 5; x < width; x = x+50){
        for (var y = 5; y < height; y = y+50){
            push();
            translate(x, y);
            fill(255,255,102); //yellow            
            ellipse(posx1,posy,diam,diam);
            pop();
        }   
    } 
    //
    if (mouseX > width/2) {
        for (var x = diam; x < width; x = x+50){
            for (var y = diam; y < height; y = y+50){
                push();
                translate(x, y);
                fill(204,255,153);  //green         
                ellipse(-posx1,posy1,diam1,diam1);
                diam1 += .0001;
                pop();
            }   
        } 
    }
    //bluish
    if (mouseX < width/2) {
        for (var x = diam; x < width; x = x+50){
            for (var y = diam; y < height; y = y+50){
                push();
                posyb += falling*0.01;
                posy1+= falling*0.01*-1;
                translate(x, y);
                fill(153,255,255);           
                ellipse(posy1,posy1,diam,diam);
                pop();
            }   
        } 
    }
    // pink
    if (mouseY > height/2) {
        for (var x = diam; x < width; x = x+50){
            for (var y = diam; y < height; y = y+50){
                push();
                posyb += falling*0.01;
                posy1+= falling*0.01*-1;
                translate(x, y);
                fill(255,102,255);           
                ellipse(posx,posyb,diam1,diam1);
                pop();
            }   
        } 
    }
    // orange
    if (mouseY < height/2) {
        for (var x = diam; x < width; x = x+50){
            for (var y = diam; y < height; y = y+50){
                push();
                posyb += falling*0.01*-1;
                posx1 += falling*0.01*1;
                translate(x, y);
                fill(224,96,92);           
                ellipse(posx,posyb,diam,diam);
                pop();
            }   
        } 
    }
}




I wanted to create a curtain of balls that slide through the canvas in an uncomfortable way depending on the direction of the mouse. Are you able to make them dissapear? What if you wait for a little bit?

serinal – project 03 (section C)

sketch

//Serina Liu
//Section C
//serinal@andrew.cmu.edu
//Project-03

var sizex = 320;
var sizey = 240;
var R = 0;
var G = 0;
var B = 0;
var circle = 320;
var dir = 1; 
var speed = 10;
 
function setup() {
  createCanvas(640, 480);
  background (25);

}

function draw() {

    if (mouseX < width*0.44) {
        background (255, 228, 225);
    } else if (mouseX > width*0.6) {
        background (224, 255, 255);
    } else {
        background (255, 215, 0);
    }
    //changing the background color in three different intervals 
    R = 0;
    G = 0;
    B = 0;

    if (mouseX < width*0.44) {
        sizex= 190;
        sizey= 250;
        R= 256;
    } else if (mouseX > width*0.6) {
        sizex= 700;
        sizey= 900;
        B= 256;
    } else {
        sizex=400;
        sizey=470;
        G= 256;
    }
    //size of rectangle changing in three different intervals
    //color of rectangle also changing in three different intervals

    noStroke();
    fill(256, 256, 256);
    ellipseMode (CENTER);
    ellipse (320, 230, circle ,circle);
    //ellipse

    circle += dir*speed;
    if (circle > 550) {
        dir = -dir;
        circle =550;
    } else if (circle < 0) {
        dir = -dir;
        circle = 0;
    }
    //ellipse moving outward and inward

    var rectangle=(width-mouseX);
    fill (R, G, B);
    rectMode (CENTER);
    rect (rectangle, mouseY, sizex/8, sizey/30);
    //mirrors the rectangle in the opposite direction 

    fill(R, G, B);
    rectMode(CENTER);
    rect(mouseX, mouseY, sizex/8, sizey/30);
    //moving rectangle with mouse

}

It is hard to work on motion heavy ones because they tend to give me a headache after looking at them for too long, but I had fun with this one. I think the more practice that I am getting is definitely helping me. I was inspired by a lot of the motion graphics that you see nowadays, with the pastel color backgrounds, whites and then a loud pop of color. I wanted to just focus on the rectangle mainly changing things, but included the ellipse zoom in and out for some added visual simulation.

dchikows – Section C – Project-03-Dynamic-Drawing

Sketch

// David Chikowski
// Section C
// dchikows@andrew.cmu.edu
// Project-03-Dynamic-Drawing


var angle = 0;

function setup() {
  createCanvas(640,480);
  strokeWeight(30); //line thicknesses
}

function draw() {
   background(155, 244, 66); // bright lime Green
    if (mouseY < (240)) // if Y cordinate of mouse goes bellow 240 background changed to lime green 
        background(175, 60, 201); // Purple


  var m = max(min(mouseY, 480), 0); //sets limits for lines

  stroke(255);
  line(m - 50, m - 80, 0, 480); 
  //white line

  stroke(24,96,200);
  line(m + 380,m + 120,640,480);
  //blue line

  stroke(255,40,30);
  line(m + 278,m + 400,640,0);
  //red line

  stroke(50,100,50);
  line(m + 140,m + 200,640,480);
  //Green line
  
  //Creates a circle that rotates around the 
  //top point of the white line 
  fill(219, 154, 35); //elipse color
  noStroke();
  push();
  translate(m - 50, m - 80); //set to follow the top point of the white line
  rotate(radians(angle));
  ellipse(10, 10, 10, 10);
  pop();
  angle = angle + 10;

  noStroke();
  fill(155, 244, 66); // bright lime Green
    if (mouseY > (240)) // if Y cordinate of mouse goes bellow 240 ellipse changes to lime green
        fill(175, 60, 201); // if Y cordinate of mouse goes above 240 ellipse changes to Purple
  ellipse(56, 46, mouseY - 200, mouseY - 155); 


}

 

 

 

I started to develop my dynamic drawing with the four lines and then worked out from there making adjustments as I went through the process. I decided to strictly use mouseY to control the image so the user could do it faster.

 

 

var angle = 0;

function setup() {
createCanvas(640,480);
strokeWeight(30); //line thicknesses
}

function draw() {
background(155, 244, 66); // bright lime Green
if (mouseY < (240)) // if Y cordinate of mouse goes bellow 240 background changed to lime green
background(175, 60, 201); // Purple

 

var m = max(min(mouseY, 480), 0); //sets limits for lines

stroke(255);
line(m – 50, m – 80, 0, 480);
//white line

stroke(24,96,200);
line(m + 380,m + 120,640,480);
//blue line

stroke(255,40,30);
line(m + 278,m + 400,640,0);
//red line

stroke(50,100,50);
line(m + 140,m + 200,640,480);
//Green line

//Creates a circle that rotates around the
//top point of the white line
fill(219, 154, 35); //elipse color
noStroke();
push();
translate(m – 50, m – 80); //set to follow the top point of the white line
rotate(radians(angle));
ellipse(10, 10, 10, 10);
pop();
angle = angle + 10;

noStroke();
fill(155, 244, 66); // bright lime Green
if (mouseY > (240)) // if Y cordinate of mouse goes bellow 240 ellipse changes to lime green
fill(175, 60, 201); // if Y cordinate of mouse goes above 240 ellipse changes to Purple
ellipse(56, 46, mouseY – 200, mouseY – 155);

 

}

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!

Project 3-Dynamic Art

Dave Dynamic

//Yoonseo(Dave) Choi
//Section B
//yoonseo1@andrew.cmu.edu
//Assignment-03-B
//variable for Bezier curvature 
var Curv;
//variable for Red, Green, Blue color. 
  var R = 0;
  var B = 0;
  var G = 0;
  function setup() {
  createCanvas(640, 480); //setting Canvas size to 600x480
  //No fill for any geometry
  noFill();
  //initializing Curv 
  Curv = 0;
}
function draw() {
  //adding random number to Red for change of color when it is < 255 
  
  //adding random number to Blue for change of color when it is < 255 
 
   //adding random number to Green for change of color when it is < 255  

  //When any of R,G,B elements are over 255, it resets to 0.
  if (R >= 255){
    R = 0;
  }
  if (G >= 255){
    G = 0;
  }
  if (B >= 255){
    B = 0;
  }
  //variable for color c
  var c = color(R,B,G);
  //continuously assign color variable to stroke
  stroke(c, 10);
  //setting up standard place for x and y coordinate. 
  var x = width/2;
  var y = height/2;
  //Dividing the canvas into four difference quadrant. 
  if (mouseX > x & mouseY < y ) { //when mouse is on right top quadrant
    Curv += mouseX/60; //Curv value goes up randomly from 1 to 5
    R += mouseX/120 + mouseY/50;// Red is sum of differenct X and Y value
   }
   if (mouseX < x & mouseY < y){//when mouse is on left top quadrant
    Curv -= mouseY/30; //Curv value goes down randomly from 4 to 12
    B += mouseX/40 + mouseY/80;// Blue is sum of differenct X and Y value
   }
   if (mouseY > y & mouseX > x){//when mouse is on right bottom quadrant
    Curv += mouseY/60;//Curv value goes up randomly from 4 to 12
   }
   if (mouseY > y & mouseX < x){//when mouse is on left bottom quadrant
    Curv -= mouseX/30;//Curv valvue goes down randomly from 1 to 5
    G += mouseX/70 + mouseY/100;// Green is sum of differenct X and Y value
   }
   //when Curv is larger than height or width, or less than 0 , it will reset to 0.
  if ( Curv > height || Curv < 0 || Curv > width){ 
    Curv = 0;
   }
   //setting background to black 
  background(0);
  //bezier curves.
  //each for statement is used to generate multiple bezier curve based on increment of i value
  //bezier curve assigns, anchor points and control points to create paramatric curve. 
  //bezier(anchor pts, anchor pts, control pts, control pts, control pts2,control pts2, anchor pts2,anchor pts2)
  for (var i = 0; i < mouseX; i += 30){
    bezier(mouseX-(Curv+i/2.0), mouseY-Curv+i, Curv*2, Curv, Curv*2, Curv*2, mouseX, 0);
  }
  //based on the i and z constraint, number of lines are decided. 
  // i or z's constraints are defined by mouse X adn Y position
  // all the position of the anchor points are based on the mouse X and Y 
  for (var z = 200; z < mouseY; z += 30){
    bezier(mouseX-(Curv+z/2.0), mouseY-Curv+z, Curv*4, Curv/6, Curv*3, Curv*2, width-mouseX, 0);
  }
 for (var i = 0; i < height-mouseY; i += 30){
    bezier(mouseX+(Curv+i/2.0), mouseY+Curv+i, Curv*2, Curv, Curv*2, Curv*2, 0, mouseY);
  }
  for (var z = 200; z < width-mouseX; z += 30){
    bezier(mouseX+(Curv+z/2.0), mouseY-Curv+z, Curv*4, Curv/6, Curv*3, Curv*2, width, height-mouseY);
  }
  

}

For this Dynamic art project, I focused on the movement of line in a curve form. At first, I wanted to express very light wing like motion based on the mouse position. I abstracted the initial concept and created the following digital illustration of movement. Fortunately, I found a example at p5js website that resembles part of what I imagined. I took that example and modified to create my own dynamic art.

Bettina-LookingOutwards03-SectionC

Screenshot from MIT computation fabrication lab’s youtube video.

In looking through examples, I was curious to find work that had function outside of “being pretty” or “showing data”. As a peer expressed, “the most beautiful things are functional”. While this is a long contended perspective, I agree that with the power of generating from code/data, there is power to make very useful things. This multicopter from MIT’s fab-lab can vary it’s physical structure, such as wingspan, power, height, etc. to adjust to the user’s needs. This level of customizability gives users more control than simply choosing from a set list of specs.

From a practical standpoint, printing this using a 3D printer would be economically viable. Mass production using other materials may be tricky because of molds; however if 3D printers could print the molds themselves, I could see this concept used widely.

dchikows – Section C – Looking Outward – 03

MIT runs the Mediated Matter Lab. The group focusses on “Nature-inspired design and design-inspired Nature” to produce research that intersects with design, biology, material science, and digital fabrication. Glass II is a project conducted by the group to focus on digital fabrication and design. G3PD2, is a very exact additive manufacturing technology to create 3D prints of transparent glass structures. The new manufacturing method is the best for this application because it has a four axis pivot, integrated thermal sensors, and is able to produce prints faster. Glass II made to demonstrate the machine’s power is also beautiful. It creates an amazing patterns of light on the ground that all lead back to the structure. Since the structure is so transparent and sizeable the transition from the light and the structure feels as if it is flawless. Glass II was showcased at the Milan Triennale in 2017. I find this project very exciting as I am currently learning Solid Works.

See Glass II

 

Instalation of Glass II

selinal-Project-02

sketch

//Selina Lee
//Section C
//selinal@andrew.cmu.edu
//Project 02

var nosesi = 75 //size of nose
var noseco = 40 //R value for nose
var noseco2 = 120 //G value for nose
var glintx = 210 //x-location for glint
var glinty = 190 //y for glint

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

}

function draw() {
    //create facial surface
    stroke(0);
    strokeWeight(3);
    fill(230, 80, 160);
    ellipse(320, 240, 440, 330);

    //creating parameters for the smile
    var lipx = constrain(mouseX, 130, 220); //defining the interactive limits of the mouse location
    var lipy = constrain(mouseY, 250, 320); 

    //creating the mouth
    noFill();
    stroke(0);
    strokeWeight(1);
    beginShape();
    curveVertex(lipx, lipy);
    curveVertex(lipx, lipy);
    curveVertex(width/2 - lipx/2, lipy + 50);
    curveVertex(width/2 + lipx/2, lipy + 50);
    curveVertex(width - lipx, lipy);
    curveVertex(width - lipx, lipy);
    endShape();

    //creating the nose
    fill(noseco, noseco2, 130);
    stroke(0);
    strokeWeight(1);
    ellipse(320 , 240, nosesi, nosesi/2);

    //defining eyebrow raise and parameters
    var eyebroy = constrain(mouseY, 120, 170);

    stroke(150, 100, 100);
    strokeWeight(10);
    line(160, 180, 250, eyebroy); //left brow
    line(480, 180, 390, eyebroy); //right brow

    //creating blinking eyes
    var pupil = random(20, 35); 

    stroke(0);
    fill(0);
    ellipse(200, 190, pupil, pupil); //left eye
    ellipse(440, 190, pupil, pupil); //right eye

    strokeWeight(0);
    fill(255);
    ellipse(glintx, glinty, 10, 10); //left eyeglint
    fill(255);
    ellipse(width - glintx, glinty, 10, 10); //right eyeglint
    

}
    


function mousePressed() {
    nosesi = random (20, 130); //nose width
    noseco = random (0, 250); //value of R for nose
    noseco2 = random (110, 130); //value of G for nose
    glintx = random (180, 220); //random placement of white eyeglint ellipeses on x-axis
    glinty = random (180, 200); //random placement of eyeglint on y-axis
}

rgroves – project02 – Variable Face

sketch

//Rebecca Groves
//Section B
//rgroves@andrew.cmu.edu
//Week 02 Variable Face

//color of fur
var reds = [60, 110, 184, 220]; 
var r = 60;
var b = 60;
var g = 60;
//color of chin
var chinvariables = [1, 2, 3, 4, 5];
var v = 1;
//color of eyes
var eyereds = [210, 194, 253, 147, 152];
var eyer = 210;
var eyeb = 203;
var eyeg = 91;
//size of eyes
var eyeseperation = 230;
var eyewidth = 60;
var eyeheight = 45;
var pupilwidth = 10;
var eyecurve = 30
//size of nose
var nosemultiplier = 1;
var jowelwidth = 90;
var jowelheight = 75;
//right mustache
var rtop = 365;
var rbottom = 400;
var rlength = 70;
//left mustache
var ltop = 340;
var lbottom = 370;
var llength = 50;


function setup() {
    createCanvas(600, 600);
    background(222,226,222);
}

function draw() {
	//headshape
	noStroke();
	fill(r, b, g);
	if (r == 60){
		b = 60;	
		g = 60;
	} else // blue grey
	if (r == 110){
		b = 124;
		g = 138;
	} else // orange
	if (r == 184){
		b = 115;
		g = 55;
	} else 
	if (r == 220){
		b = 220;
		g = 220;
	}
	beginShape();
	vertex(150, 600);
	vertex(150, 90);
	vertex(220, 180);
	vertex(600 - 220, 180);
	vertex(600 - 150, 90);
	vertex(600 - 150, 600);
	endShape();

	//eyes
	ellipseMode(CENTER);
	fill(eyer, eyeb, eyeg);
	if (eyer == 210){ // yellow green
		eyeb = 203;	
		eyeg = 91;
	} else // turquoise
	if (eyer == 194){ 
		eyeb = 248;
		eyeg = 182;
	} else // yellow
	if (eyer == 253){ 
		eyeb = 212;
		eyeg = 37;
	} else // brown
	if (eyer == 147){
		eyeb = 66;
		eyeg = 38;
	} else // blue
	if (eyer == 152){
		eyeb = 186;
		eyeg = 205;
	}
	rectMode(CENTER);
	rect(eyeseperation, 290, eyewidth, eyeheight, 0, eyecurve, 0, eyecurve);
	rect(600- eyeseperation, 290, eyewidth, eyeheight, eyecurve, 0, eyecurve, 0);
	//pupils
	fill(60);
	ellipse(eyeseperation, 290, pupilwidth, eyeheight);
	ellipse(600 - eyeseperation, 290, pupilwidth, eyeheight);
	//eye highlight
	fill(220);
	ellipse(eyeseperation + 10, 290 - (eyeheight * .15), 20, 15);
	ellipse(600 - eyeseperation + 10, 290 - (eyeheight * .15), 20, 15)

    //ears
    noStroke();
    fill(r - 50, b - 70, g - 50);
    triangle(150, 90 + 20, 220 - 20, 180, 150, 180);
    triangle(600 - 150, 90 + 20, 600 - (220 - 20), 180, 600 - 150, 180);

    //chin
    if (v == 4) { //make chin occasionally white
    	fill(230);
    	ellipse(300, 370 + (jowelheight * .4), 55, 55); 
    } else {
    	fill(r - 50, b - 70, g - 50);
    	ellipse(300, 370 + (jowelheight * .4), 55, 55);
    }
    

    //jowels
    if (v == 4) { //make jowels occasionally solid
    	fill(r, b, g);
    	ellipse(300 - 35, 370, jowelwidth, jowelheight);
    	ellipse(300 + 35, 370, jowelwidth, jowelheight);
    } else {
    	fill(230);
    	ellipse(300 - 35, 370, jowelwidth, jowelheight);
    	ellipse(300 + 35, 370, jowelwidth, jowelheight);
    }
    //left mustache
	noStroke();
	fill(r, b, g);
	ellipseMode(CORNERS);
	ellipse(300, ltop, 300 - llength, lbottom);
	//right mustache
	ellipse(300, rtop, 300 + rlength, rbottom);

    //nose
	fill(211, 177, 160);
	rect(300, 325, 50 * nosemultiplier, 15 * nosemultiplier, 5);
	triangle(300 - (20 * nosemultiplier), 320, 300 + (20 * nosemultiplier), 320, 300, 300 + (50 * nosemultiplier));
	strokeWeight(3);
	stroke(156, 102, 81);
	line(300, 300 + (50 * nosemultiplier), 300, 335)
}

function mousePressed(){
	reds = [60, 110, 184, 220];
	r = random(reds);
    eyereds = [210, 194, 253, 147, 152];
    eyer = random(eyereds);
    chinvariables = [1, 2, 3, 4, 5];
    v = random(chinvariables);
    eyeseperation = random(210, 260);
    eyewidth = random(45, 70);
    eyeheight = random(20, 50);
    pupilwidth = random(5, 20);
    eyecurve = random(20, 50);
    nosemultiplier = random(.75, 1.25);
    jowelwidth = random(70, 140);
    jowelheight = random(65, 110);
    rtop = random(370, 370 - (jowelheight * .5));
    ltop = random(370, 370 - (jowelheight * .5));
    rbottom = rtop + random(20, 70);
    while (rbottom > (370 + (jowelheight * .5))){
    	rbottom = rtop + random(20, 70);
    }
    lbottom = ltop + random(20, 70);
    while (lbottom > (370 + (jowelheight * .5))){
    	lbottom = ltop + random(20, 70);
    }
    rlength = (30, jowelwidth - 40);
    llength = (30, jowelwidth - 40);
}

For this project I was inspired by my childhood cats. They were both tuxedo cats, and most people could only tell them apart by the markings around their mouths – one had a little black mustache and one had a white chin. Here are pictures of them:

1/5 of the time it generates a cat with a solid color face and a white chin and 4/5 of the time it generates a cat with a uniquely shaped mustache. The fur color, eye color and shape, and nose size also change.