Kyle Leve-Project-07-Curves

sketch

// Kyle Leve
// kleve@andrew.cmu.edu
// Section A
// Project-07-Curves

var a = 40;
var b = 40;

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

function draw() {
    background(255);
    translate(width/2, height/2); // Sets all the curves to the center of the canvas
    drawAstroid1(); // Draws first curve
    drawAstroid2(); // Draws second curve
    drawAstroid3(); // Draws third curve
    drawAstroid4(); // Draws fourth curve
    if (mouseX >= 0 & mouseX <= width/2) { // Makes silver side shrink/appear and red side grow/disappear
        a += -0.1 * mouseY;
        b += 0.1 * mouseY;
    }
    if (mouseX > width/2 & mouseX <= width) { // Makes red side shrink/appear and silver side grow/disappear
        a += 0.1 * mouseY;
        b += -0.1 * mouseY;
    }
}

function drawAstroid1() { // First curve
    beginShape();
    fill('red');
    for(var i = 0; i < 240 * TWO_PI; i++) { // Draws overlapping vertices to make curves
        stroke(0);
        vertex(500 * (cos(i)**a), 500 * (sin(i)**a));
    }
    endShape(); 
}

function drawAstroid2() { // Second curve
    beginShape();
    fill('silver');
    for(var i = 0; i < 240 * TWO_PI; i++) { // Draws overlapping vertices to make curves
        stroke(0);
        vertex(-500 * (cos(i)**b), 500 * (sin(i)**b));
    }
    endShape(); 
}
function drawAstroid3() { // Third curve
    beginShape();
    fill('red');
    for(var i = 0; i < 240 * TWO_PI; i++) { // Draws overlapping vertices to make curves
        stroke(0);
        vertex(500 * (cos(i)**a), -500 * (sin(i)**a));
    }
    endShape(); 
}
function drawAstroid4() { // Fourth curve
    beginShape();
    fill('silver');
    for(var i = 0; i < 240 * TWO_PI; i++) { // Draws overlapping vertices to make curves
        stroke(0);
        vertex(-500 * (cos(i)**b), -500 * (sin(i)**b));
    }
    endShape(); 
}

I found this project to be really interesting because I found myself using functions that I had not used in the past. I decided in this project that I wanted to have contrasting sides where when something was happening to one side, the opposite was happening to the other. This is what ended up happening with the silver and red sides of the canvas. When one side expands, the other shrinks and vice versa. This is due to both mouseX and mouseY however each one has their own distinct properties. MouseX controls how the two sides behave while mouseY controls the speed at which they happen. This project helped me better understand how to have separate entities behave in similar yet contrary ways.

Kyle Leve-LO-Week-07

An interactive project that focuses on computational information visualization that I find interesting is a program by Kim Rees that illustrates the path of space tourism. This project can be found on NBC News and it explains what the future process of people exploring space will be. It shows the full cycle of space tourism from liftoff, to journeying through space, to the descent back to Earth. What I noticed about this project is how well it is done and how much detail was put into it. As you go through each step, the points are placed at points regarding the height at which they take place. This allows for the user to visualize the whole cycle of the journey and understand just how much of an experience space travel will be. The software is easy to use and it provides a fun and interactive experience that correlates its design to the actual process.

http://interactive.nbcnews.com/virgin-galactic/

Link to the interactive project.

This undated image provided by Virgin Galactic shows Virgin Galactic’s first SpaceShipTwo, an air-launched suborbital spaceplane type designed for space tourism. It is manufactured by The Spaceship Company, a California-based company owned by Virgin Galactic. Space tourism companies are employing designs including winged vehicles, vertical rockets with capsules and high-altitude balloons. While developers envision ultimately taking people to orbiting habitats, the moon or beyond, the immediate future involves short flights into or near the lowest reaches of space without going into orbit. (Virgin Galactic via AP)

https://www.dailymail.co.uk/sciencetech/article-3447431/Space-tourism-projects-glance.html

 

Kyle Leve-Project-06-Abstract-Clock

sketch

// Kyle Leve
// kleve@andrew.cmu.edu
// Section A
// Project-06-Abstract-Clock

var spacing = 30;
var angle = 0;
var H;
var M;
var S;
var r;
var g;
var b;

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

function draw() {
	var H = hour(); // Time variable
	var M = minute(); // Time variable
	var S = second(); // Time variable
	var r = random(0, 255); // Random color value
	var g = random(0, 255); // Random color value
	var b = random(0, 255); // Random color value

	if (S === 0) { // Sets star in the center to blink random colors every minute
		fill(r, g, b);
		textSize(70);
		text('*', width / 2 - 13, height / 2 + 37);
	}

	for (i = 0; i <= width; i += spacing) { // Sets diagonal vertical star line
		for (i = 0; i <= height; i += spacing) {
			if (H < 12) { // Makes star color white if a.m
				fill(255);
				textSize(30);
				text('*', i - 20, i);
			} else if (H >= 12) { // Makes star color yellow if p.m
				fill('yellow');
				textSize(30);
				text('*', i - 20, i);
			}
			if (M === 0 & S <= 5) { // Makes star line blink random colors every hour
				fill(random(r, g, b))
				textSize(30);
				text('*', i - 20, i);
			}
		}
	}
	for (i = 0; i <= width; i += spacing) { // Sets other diagonal star line
		for (i = 0; i <= height; i += spacing) {
			if (H < 12) { // Makes star color white in a.m
				fill(255);
				textSize(30);
				text('*', i + 10, height - i);
			} else if (H >= 12) { // Makes star color yellow in p.m
				fill('yellow');
				textSize(30);
				text('*', i + 10, height - i);
			}
			if (M === 0 & S <= 5) { // Makes star line blink random colors every hour
				fill(random(r, g, b))
				textSize(30);
				text('*', i + 10, height - i);
			}			
		}
	}
	// Every donut is set to draw after the previous one and each donut is set to be drawn in about 5 seconds

	if (S >= 0 & S < 5) { // Creates top red donut
		fill('red');
		push();
		translate(width / 2, height / 4);
		rotate(radians(angle / 5));
		textSize(50);
		text('*', 0, 0);
		pop();
		angle = angle + 6;
	}
	if (S >= 5 & S < 10) { // Creates right red donut
		fill('red');
		push();
		translate(width * 0.75, height / 2);
		rotate(radians(angle / 5));
		textSize(50);
		text('*', 0, 0);
		pop();
		angle = angle + 6;
	}
	if (S >= 10 & S < 15) { // Creates bottom red donut
		fill('red');
		push();
		translate(width / 2, height * 0.75);
		rotate(radians(angle / 5));
		textSize(50);
		text('*', 0, 0);
		pop();
		angle = angle + 6;
	}
	if (S >= 15 & S < 20) { // Creates left red donut
		fill('red');
		push();
		translate(width / 4, height / 2);
		rotate(radians(angle / 5));
		textSize(50);
		text('*', 0, 0);
		pop();
		angle = angle + 6;
	}
	if (S >= 20 & S < 25) { // Creates top purple donut
		fill('purple');
		push();
		translate(width / 2, height / 4);
		rotate(radians(angle / 5));
		textSize(50);
		text('*', 0, 0);
		pop();
		angle = angle + 6;
	}
		if (S >= 25 & S < 30) { // Creates right purple donut
		fill('purple');
		push();
		translate(width * 0.75, height / 2);
		rotate(radians(angle / 5));
		textSize(50);
		text('*', 0, 0);
		pop();
		angle = angle + 6;
	}
	if (S >= 30 & S < 35) { // Creates bottom purple donut
		fill('purple');
		push();
		translate(width / 2, height * 0.75);
		rotate(radians(angle / 5));
		textSize(50);
		text('*', 0, 0);
		pop();
		angle = angle + 6;
	}
	if (S >= 35 & S < 40) { // Creates left purple donut
		fill('purple');
		push();
		translate(width / 4, height / 2);
		rotate(radians(angle / 5));
		textSize(50);
		text('*', 0, 0);
		pop();
		angle = angle + 6;
	}
	if (S >= 40 & S < 45) { // Creates top orange donut
		fill('orange');
		push();
		translate(width / 2, height / 4);
		rotate(radians(angle / 5));
		textSize(50);
		text('*', 0, 0);
		pop();
		angle = angle + 6;
	}
		if (S >= 45 & S < 50) { // Creates right orange donut
		fill('orange');
		push();
		translate(width * 0.75, height / 2);
		rotate(radians(angle / 5));
		textSize(50);
		text('*', 0, 0);
		pop();
		angle = angle + 6;
	}
	if (S >= 50 & S < 55) { // Creates bottom orange donut
		fill('orange');
		push();
		translate(width / 2, height * 0.75);
		rotate(radians(angle / 5));
		textSize(50);
		text('*', 0, 0);
		pop();
		angle = angle + 6;
	}
	if (S >= 55 & S < 60) { // Creates left orange donut
		fill('orange');
		push();
		translate(width / 4, height / 2);
		rotate(radians(angle / 5));
		textSize(50);
		text('*', 0, 0);
		pop();
		angle = angle + 6;
	}
}

I found this project to be a little difficult because I did not have an initial idea. I decided to make something where the image would continuously change colors based off of the time. The overlapping donuts represent every 20 seconds and the stars flash random colors either every minute or every hour. In addition, the diagonal star lines are either white or yellow depending on if it is a.m or p.m respectively. This project allowed me to get more comfortable with time functions and setting things up within certain time constraints.

My initial sketch once I came up with an idea.

Kyle Leve-LO-Week-06-Section A

One project that I discovered that displays a sense of randomness is the composition In C by Terry Riley. This piece of music has many different interpretations to it because it is an open-ended piece. The ideal number of players is around 35, however there have been many instances where significantly more or less players have performed it. Rather than having a written part for each instrument, In C only shows fragments of measures. It is each musician’s job to decide when to play each fragment and when to move onto the next one. No two players will be playing the exact same thing. What makes this piece “random” is that it is impossible for two performances to be the same if not even similar. The instrumentation always varies, and the piece can range from 15 minutes to over an hour. In addition, the musicians demonstrate a sense of randomness because they do not have a set time when they change to another rhythm, so every time they play it, it is different. What I admire about this project is that Riley was able to create a piece that allows each player to make their own artistic decisions and have freedom from the written page.

Sheet music of In C (https://nmbx.newmusicusa.org/terry-rileys-in-c/)

Performance of In C

Kyle Leve-Project-05-Wallpaper

sketch

// Kyle Leve
// kleve@andrew.cmu.edu
// Section A
// Project-05-Wallpaper

var x = 0;
var y = 10;
var spacing = 20;
var spacing2 = 440;
var spacing3 = 50;
var cirX = 15;
var cirY = 10;
var cirX2 = 240;
var cirY2 = 10;
var cirX3 = 50;
var cirY3 = 50;
var curveX = 240;
var curveY = 240;

function setup() {
    createCanvas(480, 480);
    background(0, 100, 200);
    noLoop();
}

function draw() {
	for (y = 0; y <= height; y += spacing) { // Creates repeated purple horizontal lines
		stroke('purple');
		strokeWeight(3);
		line(x, y, width, y);
	}

	for (cirX = 0; cirX < (0.5 * width); cirX += spacing) { // Creates light blue repeated circles
		for (cirY = 0; cirY < height; cirY += spacing) {
		    fill('skyblue');
		    stroke('blue');
		    strokeWeight(2);
		    ellipse(cirX + 10, cirY + 10, 15, 15);
		}
	}

	for (cirX2 = 240; cirX2 <= width; cirX2 += spacing) { // Creates light green repeated circles
		for (cirY2 = 0; cirY2 < height; cirY2 += spacing) {
		    fill('lightgreen');
		    stroke('green');
		    strokeWeight(2);
		    ellipse(cirX2 + 10, cirY2 + 10, 15, 15);
		}
	}

	for (cirX3 = 0; cirX3 <= 480; cirX3 += spacing2) { // Creates the four silver circles in the corners
		for (cirY3 = 0; cirY3 <= 480; cirY3 += spacing2) {
			fill('silver');
			stroke(0);
			ellipse(cirX3 + 20, cirY3 + 20, 15, 15);
		}
	}
    // Creates the purple and orange patterns in the center
	fill('violet');
	stroke('purple')
	strokeWeight(5);
	curve(curveX, height, curveX, height, curveX, 0.75 * height, 800, 280);
	
	fill('orange');
	stroke('red')
	strokeWeight(5);
	curve(curveY, height, curveY, height, curveY, 0.75 * height, -320, 280);
	
	fill('violet');
	stroke('purple')
	strokeWeight(5);
	curve(curveX, 0.75 * height, curveX, 0.75 * height, curveX, 0.5 * height, 800, 140);
    
    fill('orange');
	stroke('red')
	strokeWeight(5);
	curve(curveY, 0.75 * height, curveY, 0.75 * height, curveY, 0.5 * height, -320, 140);
	
	fill('violet');
	stroke('purple')
	strokeWeight(5);
	curve(curveX, 0.5 * height, curveX, 0.5 * height, curveX, 0.25 * height, 800, 0);
    
    fill('orange');
	stroke('red')
	strokeWeight(5);
	curve(curveY, 0.5 * height, curveY, 0.5 * height, curveY, 0.25 * height, -320, 0);
    
    fill('violet');
	stroke('purple')
	strokeWeight(5);
	curve(curveX, 0.25 * height, curveX, 0.25 * height, curveX, 0, 800, -100);
	
	fill('orange');
	stroke('red')
	strokeWeight(5);
	curve(curveY, 0.25 * height, curveY, 0.25 * height, curveY, 0, -320, -100);
}

Starting this project I knew I wanted to experiment with different sides of the canvas. I decided to make the center of the canvas a divider where I would have the same thing on both sides, however different colors. I experimented with the curve function to create the centerpiece rather than doing the circles that I had intended. Overall, I enjoyed this project because my ideas were able to develop and evolve after the initial draw phase.

Kyle Leve-LO-Week 05-Section A

One of the first projects that made me notice graphics was the movie Avatar. Created by James Cameron, after years of waiting for technology to advance enough to capture the movie, the movie finally debuted in 2009. I remember watching the movie and being amazed at the depth the movie had. I felt as though I was on Pandora experiencing all the lights and sounds around me. Weta Digital was the leading visual effects company throughout the project, and they used about 4,000 Hewlett-Packard servers and 35,000 processor cores to create and store all the visual elements of the movie. Even though there were real human characters in the movie, most of the characters and the entire setting had to be computer generated. What made this project so special however, was the amount of detail put into every aspect of the setting. The setting was captured in a way that had never been done before. Even though it was computer-generated, it looked so real and even now looking back at the movie, I still get the same feelings as I did nine years ago.

For more info: https://en.wikipedia.org/wiki/Avatar_(2009_film)#Visual_effects

Kyle Leve-Project-04-String-Art

sketch

// Kyle Leve
// Section A
// kleve@andrew.cmu.edu
// Project-04-String Art

var cirX = 200;
var cirY = 150;

function setup() {
    createCanvas(400, 300);
    background(0);
}

function draw() {
	// Creates red lines
	for (var a = 0; a < 1.5; a += 0.04) {
		strokeWeight(0.4);
		stroke('red');
		x1 = lerp(0, width / 2, a);
		y1 = lerp(0, height * 2, a);
		x2 = lerp(width * 2, 0, a);
		y2 = lerp(height / 2, 0, a);

		line(x1, 0, width, y1);
		line(x2, height, 0, y2);
		line(x1, height, width, y2);
		line(x2, 0, 0, y1);
	}
	// Creates white fade at the bottom
	for (var b = 0; b < 300; b++) {
		strokeWeight(0.5);
		stroke(255);
		line(b * 10, 10, b, 310);
	}
	// Creates ellipse in the center
	fill(0);
	ellipse(cirX, cirY, 100, 100);

	// Creates gray lines
	for (var c = 0; c < 1.2; c += 0.03) {
		strokeWeight(0.2);
		stroke(170);
		x1 = lerp(0, width / 5, c);
		y1 = lerp(0, height * 5, c);
		x2 = lerp(width * 5, 0, c);
		y2 = lerp(height / 5, 0, c);

		line(x1, 0, width, y1);
		line(x2, height, 0, y2);
		line(x1, height, width, y2);
		line(x2, 0, 0, y1);
	}

	// Creates two dark red triangles in the circle
	for (var d = 0; d < 0.75; d += 0.08) {
		strokeWeight(1.25);
		stroke('darkred');
		x1 = lerp(150, 200, d);
		y1 = lerp(150, 200, d);
		x2 = lerp(150, 200, d);
		y2 = lerp(150, 200, d);

		line(x1 + 25, 120, 175, y1 - 30);
		line(x2 + 50, 150, 200, y2);
		line(x1 + 50, 150, 200, y2);
		line(x2 + 25, 120, 175, y1 - 30);
    }
    nofill(); // I am not sure what this does but it makes the picture look cool!
}

I found this project to be really difficult since I did not know where to start. I ended up just trying to use the lerp() function until something showed up on the canvas, but once it did I began to understand what I was doing. Throughout the project I was able to learn how to grow and shrink lines and move them around. Overall, I found this project to be very informative and interesting to learn.

Kyle Leve-LO-04-Section A

A project that I discovered is FlowComposer. FlowComposer is a music generating software created by Sony CSL as a part of their Flow Machines program. The function of this software is to generate backing tracks of jazz standards that emulate the style and groove of specific big-name jazz artists. This project seems to have started in 2014 and since then has continued to grow. What I admire about this software is that it is seeming to work on one of the main problems of robotic emulation: lack of expression. Even though there is no way for a machine to fully capture a person’s emotions, it is a start to being able to get a machine to copy the style of musicians. The software is also about to re-harmonize melodies, create variations, and render the audio with different instruments. This software is a way for jazz musicians to play with a rhythm sections if they do not have access to a live rhythm section.

For more info:

FlowComposer: composing with AI

Kyle Leve-Project-03-Dynamic-Drawing

sketch

// Kyle Leve
// Section A
// kleve@andrew.cmu.edu
// Project-03-Dynamic-Drawing

var dirSq = 1;
var dirCir = 1;
var sqX = 150, sqY = 220;
var cirX = 400; cirY = 220;
var speed = 2;
var angleSq = 0;
var angleCir = 0;
var sqWidth = 130;
var sqHeight = 150;
var cirWidth = 150;
var cirHeight = 190;
var dirSqW = 1, dirSqH = 1, dirCirW = 1, dirCirH = 1;

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

function draw() {
	if (mouseX <= 100) { //change the background at different mouse locations
		background('red');
	}
	if (100 < mouseX & mouseX <= 200) {
		background('orange');
	}
	if (200 < mouseX & mouseX <= 300) {
		background('yellow');
	}
	if (300 < mouseX & mouseX <= 400) {
		background('green');
	}
	if (400 < mouseX & mouseX <= 500) {
		background('blue');
	}
	if (500 < mouseX & mouseX <= 600 || mouseX > 600) {
		background('purple');
	}

	fill(0); // black square around the blue square
	push();
	translate(sqX, sqY);
	rotate(radians(angleSq));
	rectMode(CENTER);
	rect(0, 0, sqWidth, sqHeight);
	pop();

	fill('blue'); //blue square
	push();
	translate(sqX, sqY);
	rotate(radians(angleSq)); //make the squares spin
	rectMode(CENTER);
	rect(0, 0, 100, 100);
	pop();
	angleSq = angleSq + 1;
	if (mouseY >= 300) { //change the spin direction of mouseY is greater than 300
		angleSq = angleSq - 2;
	}

	if (mouseX >= 300) { //makes the square go up and down and bounce off walls
		sqY += dirSq * speed;
	if (sqY > height - 100 || sqY < 0) {
		dirSq = -dirSq;
	}
	}

	if (mouseX < 300) { //makes the square go left and right and bounce off walls
		sqX += dirSq * speed;
	if (sqX > width - 100 || sqX < 0) {
		dirSq = -dirSq;
	}
	}

	sqWidth += dirSqW * speed; //makes the black square's width grow and shrink
	if (sqWidth > 300) {
		dirSqW = -dirSqW;
		sqWidth = 300;
	} else if (sqWidth < 100) {
		dirSqW = -dirSqW;
		sqWidth = 100;
	}

	sqHeight += dirSqH * speed; //makes the black square's height grow and shrink
	if (sqHeight > 300) {
		dirSqH = -dirSqH;
		sqHeight = 300;
	} else if (sqHeight < 100) {
		dirSqH = -dirSqH;
		sqHeight = 100;
	}

	fill(0); //black circle
	push();
	translate(cirX, cirY);
	rotate(radians(-angleCir)); //makes the black circle spin in the opposite direction from the square 
	ellipseMode(CENTER);
	ellipse(0, 0, cirWidth, cirHeight);
	pop();

	fill('red'); //red circle
	push();
	translate(cirX, cirY);
	rotate(radians(-angleCir)); //makes the red circle spin in the opposite direction from the blue square
	ellipseMode(CENTER);
	ellipse(0, 0, 120, 150);
	pop();
	angleCir = angleCir + 1;
	if (mouseY >= 300) { //changes spin direction
		angleCir = angleCir - 2;
	}

	if (mouseX >= 300) { //makes the circle go left and right when the square goes up and down
		cirX += dirCir * speed;
	if (cirX > width - 60 || cirX - 60 < 0) {
		dirCir = -dirCir;
	}
	}
	if (mouseX < 300) { //makes the cirle go up and down when the square goes left and right
		cirY += dirCir * speed;
	if (cirY > height - 75 || cirY - 75 < 0) {
		dirCir = -dirCir;
	}
	}

	cirWidth += dirCirW * speed; //makes the black circle's width grow and shrink
	if (cirWidth > 300) {
		dirCirW = -dirCirW;
		cirWidth = 300;
	} else if (cirWidth < 120) {
		dirCirW = -dirCirW;
		cirWidth = 120;
	}
	cirHeight += dirCirH * speed; //makes the black circle's height grow and shrink
	if (cirHeight > 300) {
		dirCirH = -dirCirH;
		cirHeight = 300;
	} else if (cirHeight < 150) {
		dirCirH = -dirCirH;
		cirHeight = 150;
	}

}

Doing the project I wanted to experiment with different movements rather than having a stationary picture. I decided to use a lot of the recent topics we learned such as rotation, motion, and variables to create two objects that behaved in contrary motion with each other. I found it very interesting to have to create one object and have the other object be based on how to first object was behaving.

Kyle Leve – Looking Outwards- 03

“Robot, Doing Nothing” visual

A project that I came across that I find interesting is “Robot, Doing Nothing” by Emmanuel Gollob and Johannes Braumann. What I found intriguing about this project is that it was conducted all in the time in which Gollob and Braumann were doing nothing. I feel that this demonstrates that even when someone is doing nothing, their brain is still active and formulating new ideas and projects to work on. Nevertheless, looking at the project itself fascinated me. There was nothing particularly complicated or complex about what is going on, however I found myself being relaxed my what I was watching. The slow rotations of the machine as well as the different colored strings made what I was watching very soothing. I could see this technology being used in the future in calm settings in which someone goes to relax. I can see many therapeutic applications with this machinery that can be used to reduce anxiety and stress.

Link: https://vimeo.com/233122890