Nina Yoo Section E LookingOutwards- 03

Andrew Kudless takes basic geometry alongside nature in order to create designs that seem to use less materials, but also create strong structures. A lot of his work can be used as a replacement/upgrade for current objects we have now as well as buildings. I am inspired as a designer because being able to create unique patterns while also considering the logistics of it and using the nature’s strongest forms, is something that is difficult to achieve. His simple yet mathematical designs creates another pathway for other designers to consider what nature and years or math research has to offer. The algorithm that generates this work derives from patterns found in nature and relates it to geometrical patterns and tries to find a way where the two creates the best results for a certain object. Andrew Kudless expresses art in his work by choosing which patterns go together and whether or not he decides to create a complicated structure or creates a structure that provides the minimum in order to convey his idea.

https://www.pinterest.com/matsys/computational-design/

 

 

Nina Yoo Project-03- Dynamic Drawing Section E

sketch

/* Nina Yoo
Section E
nyoo@andrew.cmu.edu
Dynamic Drawing*/

var colorBack = 120;
var colorDia = 183;
var colorEye = 240;
var colorPupil = 0;
var pupilWidth = 19;
var pupilHeight = 19;
var tongueH =  50;
var sizeDia = 300; //rotate this and leave a afterimage
var angle = 0;
var tonguesizecha =1;

function setup() {
    createCanvas(600, 600);
    noStroke();
    //everything in relation to mouseY


}


function draw() {
 	 background(colorBack);


 	 
 	// For dia movemet and color
 	var DiaSizeCha = map(mouseY, 0, height, sizeDia, 600);

 	 //dia

 	 var anglemap = map (mouseY, 0, height, angle, 5);

 	 rotate(anglemap, 300 );
 	  


 	 var colorDiamap = map(mouseY, 0, height, 0, 256);

 	 fill(colorDiamap, 153, 153);
 	 noStroke();
 	 rectMode(CENTER);
 	 rect(300,300, DiaSizeCha, DiaSizeCha);
 	 pop(); // pop allows thhe face to separate from dia


 	 	
 	 //face
 	fill(233,194,144);
 	ellipse(300,300, 265, 265);

 	//mouth
 	fill(0);
 	arc(300, 365, 37, 30,0, PI);


 	//tongue map
 	var tongueMove = map(mouseY, 0, height, tonguesizecha, 5);

 	//tounge 
 	fill(240, 100, 100);
 	arc(300, 372, 37, tongueH*tongueMove,0, PI);

 	//outereye
 	push();
 	var colorEyemap = map(mouseY, 0, height, 0, 256);
 	fill(colorEyemap, 100,100);
 	arc (230, 288, 54,54,0 , PI);
 	pop();

 	push()
 	 var colorEyemap = map(mouseY, 0, height, 0, 256);

 	fill(colorEyemap, 100, 100);
 	arc (375, 288, 54,54, 0, PI);

 	//pupil move/map
 	var pupilMove = map( mouseY, 0, height, pupilHeight, 2);

 	//pupil  

 	fill(colorPupil, 20, 30);
 	arc(230, 288, pupilWidth +pupilMove, pupilHeight+pupilMove, 0, PI);


 	fill(colorPupil, 20, 30);
 	arc(375,288, pupilWidth + pupilMove, pupilHeight + pupilMove, 0, PI);







}

This assignment helped me think about multiple applications being used all at once. In order to accomplish this I made mouseY be depended on a lot. The idea was to make the user think that the mouse controlled the tongue and therefore control everything else. Having there be a common factor in all moving objects helped organize the code. This code also helped me better understand variables and the “map” function.

Project 03 Dynamic Drawing

sketch

/* Jaclyn Saik 
Section E
jsaik@andrew.cmu.edu
Assignment-00-A
*/

//general set up 

var circleX = 50  //x position of circles
var circleY = 50 //y positions of circles
var circleOFFSET = 3
var circleSIZE = 50 //diameter of circle, set so later can be manipulated by mouse
var conOFFSET = 100 //offset value used to space out the triangles
var angle = 0
var angle2 = 0
var angleCHANGE = 6


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

function draw() {
    background(25, mouseX/5, 25, mouseY/3); 
    //modifies alpha value so it's relative to y value, determines shape trail
    //X value of mouse controls background color 

    circleSIZE = constrain(mouseX/5, 20, 300); //circle size controlled by mouse X position, but constrained within 2 and 300
    circleSIZE = circleSIZE/2 //reduced size again in half so managebale within canvas


    //changing texts set up

    fill(255);
    if (mouseX > width/2) {
        text('NICE!!!!!!!!!', 100, 300); //all text switches when the mouse's 
        //X position is in second half of canvas
    }  else { text('wow', 100, 310)
    }

    fill(255);
    if (mouseX > width/2) {
        text('cool', 150, 350);
    }  else { text('YIKES!', 150, 340)
    }

    fill(255);
    if (mouseX > width/2) {
        text('rock on!', 500, 50);
    }  else { text('super!!!', 500, 60)
    }

    fill(255);
    if (mouseX > width/2) {
        text('that is crazy dude!', 450, 200);
    }  else { text('NUTS!', 440, 190)
    }
    

    //stroke set up

    if (mouseY < height/2) {
        stroke(237, 107, 170);
        strokeWeight(mouseX/20) //stroke weight is determines by mouse's X position
    } else { noStroke(); //stroke is determined by mouse's Y position 
    }


    //Circle position and rotation set up

    //line 1

    //line 1, circle 3
    push();
    translate(width/2, height/2); //moves origin to the center of canvas
    rotate(radians(angle)); 
    fill(44, 131, 204);
    ellipse(circleX+circleOFFSET, circleY+circleOFFSET, circleSIZE, circleSIZE); //blue circle
    fill(232, 86, 71);
    ellipse(circleX-circleOFFSET, circleY-circleOFFSET, circleSIZE, circleSIZE); //red circle
    fill(255);
    ellipse(circleX, circleY, circleSIZE, circleSIZE); //white circle in front 
    angle = (angle + angleCHANGE); //determines angle of rotation 
    pop();


    //line 1, circle 4
    push();
    translate(width/2+conOFFSET, height/2+conOFFSET); //moves new origin, using offset to keep it regular 
    //I use translate throughout to change the rotation center for each ellipse
    rotate(radians(angle));
    fill(44, 131, 204);
    ellipse(circleX+circleOFFSET, circleY+circleOFFSET, circleSIZE, circleSIZE); //blue circle
    fill(232, 86, 71);
    ellipse(circleX-circleOFFSET, circleY-circleOFFSET, circleSIZE, circleSIZE); //red circle
    fill(255);
    ellipse(circleX, circleY, circleSIZE, circleSIZE);
    pop();
    
    //line 1, circle 2
    push();
    translate(width/2-conOFFSET, height/2-conOFFSET);
    rotate(radians(angle));
    fill(44, 131, 204);
    ellipse(circleX+circleOFFSET, circleY+circleOFFSET, circleSIZE, circleSIZE); //blue circle
    fill(232, 86, 71);
    ellipse(circleX-circleOFFSET, circleY-circleOFFSET, circleSIZE, circleSIZE); //red circle
    fill(255);
    ellipse(circleX, circleY, circleSIZE, circleSIZE);
    pop();
    
    //line 1, circle 5
    push();
    translate(width/2+conOFFSET*2, height/2+conOFFSET*2);
    rotate(radians(angle));
    fill(44, 131, 204);
    ellipse(circleX+circleOFFSET, circleY+circleOFFSET, circleSIZE, circleSIZE); //blue circle
    fill(232, 86, 71);
    ellipse(circleX-circleOFFSET, circleY-circleOFFSET, circleSIZE, circleSIZE); //red circle
    fill(255);
    ellipse(circleX, circleY, circleSIZE, circleSIZE);
    pop();

    // line 1, circle 1
    push();
    translate(width/2-conOFFSET*2, height/2-conOFFSET*2);
    rotate(radians(angle));
    fill(44, 131, 204);
    ellipse(circleX+circleOFFSET, circleY+circleOFFSET, circleSIZE, circleSIZE); //blue circle
    fill(232, 86, 71);
    ellipse(circleX-circleOFFSET, circleY-circleOFFSET, circleSIZE, circleSIZE); //red circle
    fill(255);
    ellipse(circleX, circleY, circleSIZE, circleSIZE);
    pop();


    //line 2

    //line 2, circle 3
    push();
    translate(width/2, height/2);
    rotate(radians(angle2));
    fill(44, 131, 204);
    ellipse(circleX+circleOFFSET, circleY+circleOFFSET, circleSIZE, circleSIZE); //blue circle
    fill(232, 86, 71);
    ellipse(circleX-circleOFFSET, circleY-circleOFFSET, circleSIZE, circleSIZE); //red circle
    fill(255);
    ellipse(circleX, circleY, circleSIZE, circleSIZE); //white circle in front 
    angle2 = (angle2 - angleCHANGE);
    pop();


    //line 2, circle 4
    push();
    translate(width/2+conOFFSET, height/2+conOFFSET);
    rotate(radians(angle2));
    fill(44, 131, 204);
    ellipse(circleX+circleOFFSET, circleY+circleOFFSET, circleSIZE, circleSIZE); //blue circle
    fill(232, 86, 71);
    ellipse(circleX-circleOFFSET, circleY-circleOFFSET, circleSIZE, circleSIZE); //red circle
    fill(255);
    ellipse(circleX, circleY, circleSIZE, circleSIZE);
    pop();
    
    //line 2, circle 2
    push();
    translate(width/2-conOFFSET, height/2-conOFFSET);
    rotate(radians(angle2));
    fill(44, 131, 204);
    ellipse(circleX+circleOFFSET, circleY+circleOFFSET, circleSIZE, circleSIZE); //blue circle
    fill(232, 86, 71);
    ellipse(circleX-circleOFFSET, circleY-circleOFFSET, circleSIZE, circleSIZE); //red circle
    fill(255);
    ellipse(circleX, circleY, circleSIZE, circleSIZE);
    pop();
    
    //line 2, circle 5
    push();
    translate(width/2+conOFFSET*2, height/2+conOFFSET*2);
    rotate(radians(angle2));
    fill(44, 131, 204);
    ellipse(circleX+circleOFFSET, circleY+circleOFFSET, circleSIZE, circleSIZE); //blue circle
    fill(232, 86, 71);
    ellipse(circleX-circleOFFSET, circleY-circleOFFSET, circleSIZE, circleSIZE); //red circle
    fill(255);
    ellipse(circleX, circleY, circleSIZE, circleSIZE);
    pop();

    // line 2, circle 1
    push();
    translate(width/2-conOFFSET*2, height/2-conOFFSET*2);
    rotate(radians(angle2));
    fill(44, 131, 204);
    ellipse(circleX+circleOFFSET, circleY+circleOFFSET, circleSIZE, circleSIZE); //blue circle
    fill(232, 86, 71);
    ellipse(circleX-circleOFFSET, circleY-circleOFFSET, circleSIZE, circleSIZE); //red circle
    fill(255);
    ellipse(circleX, circleY, circleSIZE, circleSIZE);
    pop();
   

}

 

Jaclyn Saik Project 03

This project was definitely the most challenging because it was so open ended. I was originally inspired by another geometric animation I saw on Colossal, where there were a bunch of very small white dots that had slight colored shadows, which made them look extremely mesmerizing and gave them an appearance of movement even in the moments they were static. With my sketch, I wanted to play with the idea of rotating and spinning elements that are changes by the mouse.  While making the circles rotate around an origin, I played with making them all revolve around the mouse, but I ended up making something that was a steadier in composition so that you could more easily interact with it with your mouse. I had the mouse position change the little text that cheers you on, as well as the stroke and color changes. I had a lot of fun making the objects create a trailed background, and I think it made the project look even crazier, which is what I was going for.

Dani Delgado Looking Outwards-03

A snapshot of the Lumen Project in the day.

The project I chose to research was “Lumen” – a beautiful structure that stands in the intersection of architecture, design, biology, and engineering. This cutting-edge project was developed in 2018 by the Jenny Sabin Studio in Ithaca, NY in order to create an adaptive environment that provides physical comfort and physiological wonder at all times of the day. At night, the fabric provides and phosphorescent light, as it is woven with materials that can capture, collect, and release light.  Then, in the day, this same fabric structure protects its visitors from harsh sunlight and releases mist based on proximity to cool them down.

Lumen at night
Lumen in the daytime

This project was developed using mathematics simulations, which I do not know much about, and later used digital modeling programs (presumably AutoDesk) to more fully develop the environment. Originally, I was attracted to this project solely based on its stunning visuals; however, once I learned about the sheer amount of interdisciplinary work that went into this project, I was in awe. The combination of the STEM and creative fields is what I believe the future to be, as we cannot advance as a people without acknowledging both aspects of the human mind. This train of thought directly connects to the Jenny Sabin Studio, as they try to focus on the intersection of architecture and science. These two different perspectives can clearly be observed in looking at this final work.

The full Lumen project at night to show the scale of the work

Above: A Youtube video showing a VR  digital model of the Lumen Project.

Website: http://www.jennysabin.com/lumen

Eunice Choe – Project-03

sketch

/*Eunice Choe
Section E
ejchoe@andrew.cmu.edu
Project-03*/

var sunD = 70;
var skyR = 65;
var skyG = 82;
var skyB = 97;
var cloudD = 100;
// heat waves
var diam = 50;
var dir = 1;
var speed = 2;
// ferris wheel
var ferrisDiam = 350;
var ferrisCarDiam = 50;
// ferris wheel base
var baseDiam = 100;

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

function draw() {

// background changing from dark to light - changing color
    background(skyR, skyG, skyB);
    skyR = map(mouseY, 0, height, 187, 65);
    skyG = map(mouseY, 0, height, 222, 82);
    skyB = map(mouseY, 0, height, 255, 97);
// sun & cloud moving with mouse - changing position
    noStroke();
    fill(247, 225, 136);
    var m = constrain(mouseY, 380, 0);
    var q = constrain(mouseY, 150, 0);
    ellipse(m, constrain(mouseY, 100, height), sunD, sunD);
    fill(255, 255, 255);
    ellipse(q, constrain(mouseY, 150, height), cloudD, cloudD);
    ellipse(q + 50, constrain(mouseY, 150, height), cloudD * .85 , cloudD * .85);
    ellipse(q - 60, constrain(mouseY, 150, height), cloudD * .5 , cloudD * .5);
// heat waves from sun - changing size
if (mouseY < 100){
    push();
    stroke(255);
    noFill();
    ellipse(380, 100, diam, diam);
    ellipse(380, 100, diam*1.5, diam*1.5);
    ellipse(380, 100, diam*2, diam*2);
    pop();
    diam += dir * speed;
    if (diam > 300){
      diam = 0;
    }
}
// ground
    noStroke();
    fill(177, 177, 177);
    rect(0, 400, width, height);
// ferris wheel base
    push();
    fill(183, 103, 44);
    ellipse(width / 2, height / 2, baseDiam, baseDiam);
    strokeWeight(20);
    stroke(183, 103, 44);
    line(width / 2, height / 2, 380, 550);
    line(width / 2, height / 2, 100, 550);
    pop();
// ferris wheel
    push();
    stroke(183, 103, 44);
    strokeWeight(10);
    noFill();
    ellipse(width / 2, height / 2, ferrisDiam, ferrisDiam);
    pop();
// ferris wheel spokes
    push();
    translate(width / 2, height / 2);
    stroke(183, 103, 44);
    strokeWeight(3);
    rotate(millis() / mouseX / 6);
    line(ferrisDiam / 2, 0, 0, 0);
    line(-ferrisDiam / 2, 0, 0, 0);
    line(0, ferrisDiam / 2, 0, 0);
    line(0, -ferrisDiam / 2, 0, 0);
    pop();
// ferris wheel cars
    push();
    fill(202, 87, 87);
    translate(width / 2, height / 2);
    rotate(millis() / mouseX / 6); // changing speed depending on mouseX position
    ellipse(ferrisDiam / 2, 0, ferrisCarDiam, ferrisCarDiam);
    fill(93, 87, 202);
    ellipse(-ferrisDiam / 2, 0, ferrisCarDiam, ferrisCarDiam);
    fill(189, 118, 222);
    ellipse(0, ferrisDiam / 2, ferrisCarDiam, ferrisCarDiam);
    fill(87, 202, 101);
    ellipse(0, -ferrisDiam / 2, ferrisCarDiam, ferrisCarDiam);
    pop();


}

This project was really difficult for me, but I had fun experimenting with different variables. I wanted to incorporate movement with a spinning circle so I created a moving ferris wheel. I also chose to show contrast with the day/night theme and the varying speeds of the ferris wheel.

Dani Delgado Project-03 – Dynamic Drawing

sketch

/*Dani Delgado 
Section E
ddelgad1@andrew.cmu.edu
Project-03
*/

//background color variables
var bgB = (20, 100);
var bgG = (20, 100);

//line weight variables
var rectW = 40;
var rectX = rectW * 2;

//angles for rotation
var a1 = 0;

//moon growing variable
var moong = 100;
var speed = 3;
var direc = 1; 

//eye glow variables
var eyeLW = 0;
var eyeLH = 0;
var eyeRW = 0;
var eyeRH = 0;

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

function draw() {
	//color changing background; constrain the colors to make it appear darker
	bgR = mouseX;
	bgB = constrain(mouseX, 10, 100);
	bgG = constrain(mouseY, 20, 100);

	background (10, bgG, bgB);

	//draw the moon
	//the moon rotates based on the mouseY coordinate 
	fill(215, 211, 190);
	push();
	a1 = (mouseY / height) * 180;
	rotate(radians(a1));
	ellipse(20, 10, 225, 225);
	pop();
	a1 = a1 - 3;

	//draw the "trees" that are behind the primary animal
	fill (60, 34, 10);
	rect(rectX - 80, 0, rectW, height);
	rect(rectX * 2, 0 , rectW, height);
	rect(rectX * 4, 0, rectW, height);
	rect(rectX * 6, 0, rectW - 6, height);
	rect(rectX, 0, rectW - 14, height);

	//draw the yellow moving bird which moves on the -mouseX and -mouseY coordinates 
	//start with the bird body
	fill(255, 221, 51);
	ellipse(-mouseX + 640, -mouseY + 480, 40, 40);
	//make bird tail
	triangle(-mouseX + 655, -mouseY + 510, -mouseX + 700, -mouseY + 515, -mouseX + 705, -mouseY + 525);
	//make bird eye and beak
	fill(20);
	ellipse(-mouseX + 649, -mouseY + 488, 10, 10);
	fill(255, 140, 25);
	triangle(-mouseX + 635, -mouseY + 500, -mouseX + 640, -mouseY + 505, -mouseX + 640, -mouseY + 495);

	//draw the red moving bird which moves on the mouseX and mouseY coordinates
	//start with the bird body
	fill(255, 120, 51);
	ellipse(mouseX, mouseY, 40, 40);
	//make bird tail
	triangle(mouseX + 15, mouseY + 30, mouseX + 60, mouseY + 35, mouseX + 65, mouseY + 45);
	//make bird eye and beak
	fill(20);
	ellipse(mouseX + 9, mouseY + 8, 10, 10);
	fill(255, 140, 25);
	triangle(mouseX - 5, mouseY + 20, mouseX, mouseY + 25, mouseX , mouseY + 15);


	// draw the "trees" that are in front of the moving birds 
	noStroke();
	fill(60, 34, 10);
	rect(rectX * 3, 0, rectW, height);
	rect(rectX * 5, 0, rectW, height);
	rect(rectX * 7, 0, rectW - 2, height);
	rect(rectX, 0, rectW - 10, height);

	//draw the primary animal
	//draw the body of the primary animal
	fill(82, 48, 0);
	rect(width / 3.20, height / 1.5, 300, 200, 90, 90, 0, 0);
	//draw the belly fur highlight
	fill(130, 90, 10);
	rect(width / 2.28, height / 1.10, 150, 60, 90, 90, 0, 0);
	//draw primary animal's head
	//draw the basic head shape (circle)
    fill(102, 68, 0);
    ellipse(width / 2.5, height / 2.5, 200, 200);
    //draw the facial features (ears, snout, nose)
    arc(width / 2 - 70, height / 2.5 + 10, 60, 65, 2, 5.6, PI, OPEN);
	arc(width / 1.5 - 20, height / 2.5 + 10, 60, 65, 3.75, 8, PI + QUARTER_PI, OPEN);
	fill(150, 100, 10);
	arc(width / 2 - 60, height / 2.5 + 25, 28, 32, 2, 5.6, PI, OPEN);
	arc(width / 1.5 - 5, height / 2.5 + 25, 28, 32, 3.75, 7.5, PI, OPEN);

	ellipse(width / 2.5 + 50, height / 1.6, 100, 70);
	fill(60, 8, 0);
	ellipse(width / 2 + 16, height / 1.43, 40, 30);

	//draw the eyes
	//eyes will glow when you mouse over them 
	eyeLW = width / 2 - 25;
    eyeLH = height / 2 + 15;
    eyeRW = width / 2 + 60;
    eyeRH = height / 2 + 15;

    var eyedim = 35 
	if ((mouseX > eyeLW) & (mouseX < eyeLW + eyedim) &&
		(mouseY > eyeLH) && (mouseY < eyeLH + eyedim) ||
		(mouseX > eyeRW) & (mouseX < eyeRW + eyedim) &&
		(mouseY > eyeRH) && (mouseY < eyeRH + eyedim)) {
		fill(255, 238, 153);
	} else {
		fill(60, 8, 0);
	}
	ellipse(eyeLW, eyeLH, eyedim, eyedim);
	ellipse(eyeRW, eyeRH, eyedim, eyedim);
}

I started out this project in a very abstract way, only drawing moving ellipses and rectangles that followed the mouse at varying degrees of offset. However, when I woke up one day this week and my first thought was about an animal in the woods, I decided that exploring that concept would be a cute direction. And so, I drew this little scene.

Christine Chen-LookingOutwards-03

Above is Iris Van Herpen’s piece Decrypt Kymono, which is part of her Data Dust series, created in 2018
Source: https://futur404.com/wp-content/uploads/2018/01/iris-van-herpen-ss18-futur404-decrypt-kimono-gown.jpg

Iris Van Herpen is famous designer for 3D fashion. One of my favorite pieces from her is the Decrypt Kymonoshown above. Herpen utilized an inverted parametrically-drawn pattern as the algorithm to generate the design for the dress. The pattern of the dress was created with microscopic pieces that is foamed-lifted, laser-cut, and then heated-bonded onto the half-transparent, lightweight silk. The end result of the design is a stunning delicate piece that flows and synthesizes along with the body’s movement, reflecting the aesthetic beauty of the human body form.  Herpen manifested her organic style of artistic sensibilities in the piece through personifying the aspects of nature with the piece’s movements and patterns, which are all designed through careful calculations and considerations.

What I admire most about Herpen is how she can create such natural, organic patterns with such an artificial method. Her designs represent the fusion of the artificial and natural. One quote from her that left a deep impression on me is “Don’t forget how engineered nature is, itself. I think we as humans don’t even come close to the intelligence within nature.” It is interesting how a lot of times people tend to think that the artificial world is complex and that nature represents simplicity. However, if we think about it, it is really the opposite. The nature world is so complex and uncontrollable that we humans have long sought to discover ways to manage parts and bits of it, only to realize that nature is still far more powerful than us.

Elena-Deng-Project-03-Dynamic-Drawing

sketch

/*Elena Deng
Section E
  edeng1@andrew.cmu.edu
  Project-03
}
*/

var x=68; //position (X)
var y=240; // position (Y)





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

}

function draw() {
  background(30); //background color
  noStroke();
  rectMode(CENTER);

  if (mouseIsPressed) {
    background(255); //changes background color when mouse is pressed
  }



  fill(121,114,map(mouseY,0,height,170,190)); //changing the B value of the rectangle
  rect(x,map(mouseX,0,width,y-10,y+10),23,map(mouseY,0,height,50,80)); //(map(n,a,b,x,y))can set the range at which something changes


  fill(map(mouseY,0,height,230,250),147,map(mouseX,0,width,50,map(mouseY,0,height,90,150)));
  rect(x+28,map(mouseX,0,width,y-20,y+20),23,map(mouseY,0,height,200,100));


  fill(93,map(mouseX,0,width,80,110),166);
  rect(x+56,map(mouseX,0,width,y-20,y+20),23,map(mouseY,0,height,180,250));


  fill(map(mouseY,0,height,180,220),90,69);
  rect(x+84,y,23,map(mouseY,0,height,100,300));

  fill(map(mouseY,0,height,220,265),218,map(mouseX,0,width,115,130));
  rect(x+112,map(mouseX,0,width,y-30,y+30),23,map(mouseY,0,height,280,120));

  fill(196,map(mouseX,0,width,20,50),56); //changing the G value of the rectangle color
  rect(208,y,23,map(mouseY,0,height,10,300));

  fill(121,114,map(mouseY,0,height,150,240));
  rect(236,y,23,map(mouseY,0,height,170,300));

  fill(map(mouseY,0,height,180,220),95,map(mouseX,0,width,10,60));
  rect(264,map(mouseX,0,width,y-10,y+10),23,map(mouseY,0,height,80,150));

  fill(map(mouseX,0,width,120,150),148,186);
  rect(292,map(mouseX,0,width,y-20,y+20),23,map(mouseY,0,height,300,150));

  fill(map(mouseY,0,height,150,240),75,62);
  rect(320,y,23,map(mouseY,0,height,100,350));

  fill(map(mouseY,0,height,230,250),147,map(mouseX,0,width,40,90));
  rect(348,map(mouseX,0,width,y-30,y+30),23,map(mouseY,0,height,50,250));

  fill(93,map(mouseX,0,width,60,100),166);
  rect(376,y,23,map(mouseY,0,height,200,100));

  fill(map(mouseY,0,height,240,265),218,123);
  rect(404,map(mouseX,0,width,y-40,y+40),23,map(mouseY,0,height,100,300));

  fill(map(mouseY,0,height,180,200),map(mouseX,0,width,30,60),56);
  rect(432,y,23,map(mouseY,0,height,250,100));

  fill(209,90,map(mouseX,0,width,50,80));
  rect(460,map(mouseX,0,width,y-20,y+20),23,map(mouseY,0,height,100,200));

  fill(map(mouseX,0,width,120,140),147,186);
  rect(488,y,23,map(mouseY,0,height,250,100));

  fill(map(mouseY,0,height,195,215),95,(map(mouseX,0,width,30,50)));
  rect(516,map(mouseX,0,width,y-20,y+20),23,map(mouseY,0,height,150,50));

  fill(map(mouseY,0,height,235,255),147,69);
  rect(544,map(mouseX,0,width,y-15,y+15),23,map(mouseY,0,height,40,80));
//used the map tool to change y position
//used map tool to change Y size of rectangle
//used map tool to change various R,G,B values to make a sort of variation between colors
}

This project was really fun! At first I got a slow start because I didn’t know what my four variations would be, but I had the general idea of what I wanted the end result to be. I really like the color palette I chose and my idea to change the mouse pressed came from what I learned about color theory lately.

Christine Chen-Project-03-Dynamic Drawing

Christine Chen-Project-03-Dynamic Drawing

/*
Christine Chen
Section E
cyc1@andrew.cmu.edu
Project-03-Dynamic Drawing
*/

var angle = 0; //angle for square rotation

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

function draw() {
    scale(0.95); //scaling it down so graphics won't be cut by WordPress
    //left side is for sadness
    //right side is for happiness

    //LEFT OF CANVAS IS BLUE
    if (mouseX < 320){
        background(129, 164, 235);
    }

    //RIGHT OF CANVAS IS ORANGE
    if (mouseX > 320){
        background(257, 141, 47);
    }

    //LINE OF SCALE
    fill(255);
    rect(100, 240, 440, 5); //long horizontal line for scale
    rect(320, 233, 5, 20); //line for midpoint

    //ROTATING SQUARE
    var x = mouseX
    push();
    if (x < 320){ //square turns red when on left
        fill(255, 0, 0);
    } else {
        fill(0, 255, 36);//square turns green when on right
    }

    if (x <= 100){ //restricts movement of x to be on the line of scale
        x = 100;
    } else if (x >= 540) { 
        x = 540;
    }

    translate(x, 240); //square would move horizontally according to x
    rotate(radians(angle));
    rectMode(CENTER); 
    rect(0, 0, 15, 15);
    pop();


    var squareSpeed = 0; 
    if (x < 320){ //square speeds up towards left
        squareSpeed = (320 - x + 320)/90;
    } else if (x > 320) { //square speeds up towards right
        squareSpeed = x/90;
    }

    angle = angle + squareSpeed;

    //----------EMOJI CODES----------
    var blue = color(180, 244, 255);
    var yellow = color(255, 228, 0);
    var size = 100;

    //FACE
    if (x < 320){ //emoji turns sad and increases size towards left
        noStroke();
        fill(blue); 
        var control = (320 - x + 320)/500; 
    } else { //emoji turns happy and increases size towards right
        noStroke();
        fill(yellow); 
        var control = x/500; 
    }

    ellipse(x, 170, size * control, size * control);

    //EYES
    fill(0);
    ellipse(x + 10, 155, 5, 5); //right eye
    ellipse(x - 10, 155, 5, 5); //left eye

    //MOUTH
    if (x > 320){ //happy mouth
        fill(228, 103, 126); //pink
        arc(x, 165, 35, 35, 0, PI); //arc with top opening
    } else { //sad mouth
        fill(79, 111, 203); //blue
        arc(x, 185, -35, -35, PI, TWO_PI); //arc with bottom opening
    }

    //NEGATIVE SIGN 
    let negativeColor = color(208); //resting color is gray
    if (x < 320){ //negative sign turns red 
        negativeColor = color(255, 0, 0);
    }
    fill(negativeColor);
    rect(40, 240, 20, 5);


    //POSITIVE SIGN
    let positiveColor = color(208); //resting color is gray
    if (x > 320){ //positive sign turns green
        positiveColor = color(0, 255, 36);
    }
    fill(positiveColor);
    rect(580, 240, 20, 5); //horizontal line
    rect(587.5, 233, 5, 20); //vertical line

}

I found this project quite challenging to start with as there are so many ways to address this project. In the end, I decided to create my own version of the emoji slider. I have always thought that the emoji slider on Instagram is not dramatic enough, so I took this project as a chance to create my own ideal version of the emoji slider with exaggerated features. Instead of having only one type of emotion, I used one end of the scale for sadness and the other one for happiness. I spent a lot of time figuring out how to make the face increase in size and the rotation square increase in speed on they approach the two ends of the scale. I finally figured out the equations after quite a while and it was definitely a fruitful gain for me! 🙂

Alice Fang–Project 03– Dynamic Drawing

sketch

/*
Alice Fang
Section E
acfang@andrew.cmu.edu
Project-03
*/

/*
When mouseX is > width/2, 
	-magenta circle shrinks while cyan circle grows
	-blue circle rotates clockwise, yellow circle couterclockwise

When mouseX is < width/2,
	-magenta circle grows while cyan circle shrinks
	-blue circle rotates counterclockwise, yellow circle clockwise

When mouseX is within the red circle
	-green circle rotates clockwise
	-green circle becomes smaller
	-green circle rotates more quickly
	-things become dark! goodbye light

Sometimes there is a delay with the growth/shrink of magenta and cyan circles-
neither I nor Prof. Dannenberg know exactly why 🙁 */

//circle diameters
var yellowD = 100;
var cyanD = 80;
var redD = 240;
var greenD = 80;
var magentaD = 320;
var blueD = 160;

var scale1 = 5; //constant rate of growth for cyan/magenta circles
var scale2 = -5; //constant rate of shrinking for cyan/magenta circles

//rotataion speed
var angle1 = 0; //blue circle
var angle2 = 0; //yellow circle
var angle3 = 0; //green circle (mouseX inside red circle)
var angle4 = 0; //green circle (mouseX outside red circle)
var angle5 = 0; //cyan circle
var angle6 = 0; //magenta circle

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

function draw() {
	background(255);

	if (dist(160, 280, mouseX, mouseY) < redD/2) {
		background(0); //switch background to black
	} else {
		background(255); 
	}

	var cyanS = constrain(cyanD, 40, 500); //limit growth of cyan
	var magentaS = constrain(magentaD, 40, 500); //limit growth of magenta
	
	if (mouseX > width / 2) {
		cyanD += scale1; //cyan increases in size
		magentaD += scale2; //magenta decreases in size
		angle1 += 5; //blue rotates clockwise
		angle2 -= 3; //yellow rotates counterclockwise
	} 
	if (mouseX < width /2) {
		cyanD += scale2; //cyan decrease in size
		magentaD += scale1; //magenta increase in size
		angle1 -= 3; //blue rotates counterclockwise, decreases speed 
		angle2 += 5; //yellow rotates clockwise, increases speed 
	}

	//cyan circle
	push();
	translate(width/2, height/2); 
	rotate(radians(angle5));
	angle5 -= 1; //rotation speed
	fill('rgba(0, 255, 255, 0.5)'); 
	ellipse(200, 160, cyanS, cyanS);
	pop();

	//magenta circle
	push();
	translate(width/2, height/2);
	rotate(radians(angle6));
	angle6 += 1; //rotation speed, 
	fill('rgba(255, 0, 255, 0.5)'); 
	ellipse(80, 40, magentaS, magentaS);
	pop();

	//red circle
	if (dist(160, 280, mouseX, mouseY) < redD/2) { //if mouse is inside red circle
		fill('rgba(0, 0, 0, 0.7)'); //become black
		ellipse(160, 280, redD, redD);
	} else {
		fill('rgba(255, 0, 0, 0.7)');
		ellipse(160, 280, redD, redD);
	}

	//blue circle
	push();
	translate(360, 240);
	rotate(radians(angle1));
	ellipseMode(CORNER);
	fill('rgba(0, 0, 255, 0.5)'); 
	ellipse(0, 0, blueD, blueD);
	pop();

	//yellow circle
	push();
	translate(360, 240);
	rotate(radians(angle2));
	ellipseMode(CORNER);
	fill('rgba(255, 255, 0, 0.7)');
	ellipse(80, 80, yellowD, yellowD);
	pop();

	//green circle
	if (dist(160, 280, mouseX, mouseY) < redD/2) { //if mouse is inside red circle
		push();
	    translate(160, 280);
	    rotate(radians(angle3));
	    angle3 += 8; //rotation speed, clockwise
	    fill('rgba(0, 255, 0, 0.7)');
	    ellipse(180, 0, greenD/2, greenD/2);
	    pop();
	} else { 
		push();
		translate(160, 280);
		rotate(radians(angle4));
		angle4 += -1; //rotation speed, counterclockwise
		fill('rgba(0, 255, 0, 0.7)'); 
	    ellipse(180, 0, greenD, greenD);
	    pop();
	}

	textSize(20);
	fill(255);
	if (dist(160, 280, mouseX, mouseY) < redD/2) { //if mouse is inside red circle
		text("goodbye!", mouseX, mouseY);
	} else {
		text("hello!", mouseX, mouseY);
	}
}

For this project, I was inspired by the RGB overlay. Originally, I wanted to set a condition where if two circles overlapped, the intersection would fill white, as would happen if you overlay-ed real RGB values. In the end, I decided to create something that was bright and bubbly, playing with opacity and color.

RGB colors! My inspiration for this project.

Also, a quick note. I sort of mentioned this in the comments, but nothing is random. Everything is dependent on the position of mouseX relative to the canvas (width/2), or to the red circle. The growth of the cyan and magenta circles lag a little, but will respond.