I wanted to create a beat making machine because I enjoy listening to music with interesting beat. I made the beat making machine create drum sounds when clicked.
//Yoshi Torralva
//yrt@andrew.cmu.edu
//Section-E
//Project-11-Generative-Landscape
var runningTree = [];
function setup() {
createCanvas(480, 480);
//placing trees on first canvas frame
for (var i = 0; i < 10; i++){
var rx = random(width);
runningTree[i] = runningTreeObject(rx);
}
frameRate(8);
}
function draw() {
background(18, 36, 64);
fill(255, 240, 186);
ellipse(100, 200, 100, 100)
fill(18, 36, 64);
ellipse(120, 190, 80, 80)
fill(74, 74, 7);
//back horizon line
rect(0, 400, width, 200);
//adding functions to move trees across canvas
updateRunTree();
removeTree();
addingTrees();
//front horizon line
fill(51, 54, 1);
rect(0, 420, width, 200);
}
//updating tree movement
function updateRunTree(){
for (var i = 0; i < runningTree.length; i++){
runningTree[i].move();
runningTree[i].display();
}
}
//deleting trees after leaving canvas
function removeTree(){
var keepTreeLoop = [];
for (var i = 0; i < runningTree.length; i++){
if (runningTree[i].x + runningTree[i].widthTree > 0) {
keepTreeLoop.push(runningTree[i]);
}
}
runningTree = keepTreeLoop;
}
//adding new trees
function addingTrees() {
var randomTreeAdding = 0.1;
if (random(0,1) < randomTreeAdding) {
runningTree.push(runningTreeObject(width));
}
}
//moving the tree everytime it is redrawn
function movingTree() {
this.x += this.speed;
}
// draw the building and some windows
function Tree() {
var minHeightOfTree = 60;
var treeHeight = this.heightOfTree * minHeightOfTree;
noStroke();
push();
//moving bases to the bottom horizon line
translate(this.x, 420);
//tree stumps
fill(this.wood);
rect(0, -treeHeight, this.widthTree, treeHeight);
//greenery of the tree
//variations of green called from the tree object
fill(this.colors);
ellipse(random(10,20), -treeHeight + random(10,15), treeHeight, treeHeight);
//for loop made to show motion of trees in the grass
//10 opaque variations of the dust from running trees
for (var i = 0; i < 10; i++) {
fill(20,0,0,30);
noStroke();
//random location not made in object as it redraws
ellipse(random(10, 50), random(10,50), this.scaleOfGreens, this.scaleOfGreens);
}
pop();
}
function runningTreeObject(startX) {
var object = {x: startX,
widthTree: 20,
speed: -5.0,
//multiply to randomize height of tree
heightOfTree: round(random(1, 20)),
//size of tree bush
scaleOfGreens: round(random(100,300)),
move: movingTree,
display: Tree,
//varied green color
colors: randomColor(),
//varied wood color
wood: randomWoodColor()
}
return object;
}
//color of leaves
function randomColor() {
return [Math.floor(random(0)), Math.floor(random(30,100)), Math.floor(random(10,20))]
}
//varied color of wood
function randomWoodColor() {
return [Math.floor(random(20,50)), Math.floor(random(0,20)), Math.floor(random(0))]
}
Initial sketch of Generative Landscape
With this project, I wanted to generate a landscape that would give dynamic motion to actual elements in the landscape. I decided to give movement to the trees as if they were running on the ground. I added varied opaque clouds that show trailing dirt clouds. I placed made the background night time with a moon to depict the trees running in the night.
/* Mari Kubota
49-104 Section 1
mkubota@andrew.cmu.edu
Project 11
*/
var lamps = [];
var stars = [];
var buildings = [];
function setup() {
createCanvas(480, 280);
// create an initial collection of objects
for (var i = 0; i < 10; i++){
var rx = random(width);
lamps[i] = makeLamp(rx);
stars[i] = makeStar(rx);
buildings[i] = makeBuilding(rx);
}
frameRate(10);
}
function draw() {
//creates gradient sky
c1 = color(0, 28, 84);
c2 = color(222, 241, 255);
setGradient(c1, c2);
//creates roads
noStroke();
fill(100);
rect(0, height*.75, width, height/4);
fill(200);
stroke(50);
rect(0,height*.9, width, height/9);
//calls functions with objects
updateAndDisplayStars();
removeStarsThatHaveSlippedOutOfView();
addNewStarsWithSomeRandomProbability();
updateAndDisplayBuildings();
removeBuildingsThatHaveSlippedOutOfView();
addNewBuildingsWithSomeRandomProbability();
updateAndDisplayLamps();
removeLampsThatHaveSlippedOutOfView();
addNewLampsWithSomeRandomProbability();
}
function updateAndDisplayLamps(){
// Update the building's positions, and display them.
for (var i = 0; i < lamps.length; i++){
lamps[i].move();
lamps[i].display();
}
}
function updateAndDisplayStars(){
// Update the building's positions, and display them.
for (var i = 0; i < stars.length; i++){
stars[i].move();
stars[i].display();
}
}
function updateAndDisplayBuildings(){
// Update the building's positions, and display them.
for (var i = 0; i < buildings.length; i++){
buildings[i].move();
buildings[i].display();
}
}
//////////////////////////////////////////////////////
function removeLampsThatHaveSlippedOutOfView(){
// takes away lamps once they leave the frame
var lampsToKeep = [];
for (var i = 0; i < lamps.length; i++){
if (lamps[i].x + lamps[i].breadth > 0) {
lampsToKeep.push(lamps[i]);
}
}
lamps = lampsToKeep; // remember the surviving buildings
}
////////////////////////////////////////////////////////
function removeStarsThatHaveSlippedOutOfView(){
//removes stars from array stars and puts them in new array
//once they've moved off the edge of frame
var starsToKeep = [];
for (var i = 0; i < stars.length; i++){
if (stars[i].x + stars[i].breadth > 0) {
starsToKeep.push(stars[i]);
}
}
stars = starsToKeep; // remember the surviving stars
}
function removeBuildingsThatHaveSlippedOutOfView(){
var buildingsToKeep = [];
for (var i = 0; i < buildings.length; i++){
if (buildings[i].x + buildings[i].breadth > 0) {
buildingsToKeep.push(buildings[i]);
}
}
buildings = buildingsToKeep; // remember the surviving buildings
}
////////////////////////////////////////////////////////////////////////
function addNewLampsWithSomeRandomProbability() {
// With a very tiny probability, add a new building to the end.
var newLampLikelihood = 0.03;
if (random(0,1) < newLampLikelihood) {
lamps.push(makeLamp(width));
}
}
function addNewStarsWithSomeRandomProbability() {
// With a very tiny probability, add a new building to the end.
var newStarLikelihood = 0.02;
if (random(0,1) < newStarLikelihood) {
stars.push(makeStar(width));
}
}
function addNewBuildingsWithSomeRandomProbability() {
// With a very tiny probability, add a new building to the end.
var newBuildingLikelihood = 0.007;
if (random(0,1) < newBuildingLikelihood) {
buildings.push(makeBuilding(width));
}
}
///////////////////////////////////////////////////////////////////////////
// method to update position of building every frame
function lampMove() {
this.x += this.speed;
}
function starMove() {
this.x += this.speed;
}
function buildingMove() {
this.x += this.speed;
}
//////////////////////////////////////////////////////////////////////////////
// draws lamps
function lampDisplay() {
fill(255,255,0,45);
noStroke();
ellipse(this.x, height -25 - this.h,this.r,this.r); //halo of light from lamp
fill(102,166,218);
rect(this.x-1.5, height - 25-this.h, this.breadth, this.h); //lamp post
fill(255);
ellipse(this.x, height -25 - this.h, this.r2, this.r2); //lightbulb
stroke(255);
strokeWeight(0.5);
noFill();
quad(this.x - 1.5, height - 20 - this.h,
this.x - 5, height - 35 - this.h,
this.x + 5, height - 35 - this.h,
this.x + this.breadth - 1.5, height - 20 - this.h); //draws the lamp box
}
function starDisplay(){
//halo of light around star
noStroke();
fill(255, 255, 0, 30);
ellipse(this.x + this.breadth/2, this.h, this.breadth * 5, this.breadth * 5);
stroke(255,255,0);
strokeWeight(0.5);
noFill();
//draws diamonds that make up star
quad(this.x, this.h,
this.x + this.breadth / 2,this.h - this.tall / 2,
this.x + this.breadth, this.h,
this.x + this.breadth / 2,this.h + this.tall / 2);
}
function buildingDisplay() {
var floorHeight = 20;
var bHeight = height;
noStroke();
fill(0);
push();
translate(this.x, height - 40);
rect(0, -bHeight, this.breadth, bHeight);
for (var i = 0; i < this.nFloors; i+=2) {
fill("yellow");
rect(5, -15 - (i * floorHeight), this.breadth - 10, 15);
}
pop();
}
//////////////////////////////////////////////////////////////////////////
function makeLamp(posX) {
var lamp = {x: posX,
breadth: 3,
speed: -2.5,
h: random(40,60),
r: random(20,35),
r2: 4,
move: lampMove,
display: lampDisplay}
return lamp;
}
function makeStar(posX) {
var star = {x: posX,
breadth: 3,
speed: -0.5,
tall: random(5,10),
h: random(20, 100),
move: starMove,
display: starDisplay}
return star;
}
function makeBuilding(birthLocationX) {
var bldg = {x: birthLocationX,
breadth: 60,
speed: -1.0,
nFloors: round(random(10,20)),
move: buildingMove,
display: buildingDisplay}
return bldg;
}
//////////////////////////////////////////////////////////////////////////////
//gradient sky function
function setGradient(c1, c2) {
noFill();
for (var y = 0; y < height; y++) {
var inter = map(y, 0, height, 0, 1);
var c = lerpColor(c1, c2, inter);
stroke(c);
line(0, y, width, y);
}
}
For this project, I created a landscape of a city during the night time. The three objects in the landscape are the buildings, lamps, and stars. All of the objects appear randomly in random quantities. The only consistency is the height at which the buildings and lamps appear. The lamps’s colors are randomized and made transparent in order to create a halo effect. The objects all move across the canvas at different speeds in order to create a sense of depth. The stars move slowest, followed by the buildings, and the lamp posts move the fastest.
/* Youie Cho
Section E
minyounc@andrew.cmu.edu
Project-11-Landscape*/
var terrainSpeed = 0.0001;
var terrainDetail = 0.005;
var houses = [];
var tY = 130;
function setup() {
createCanvas(400, 300);
frameRate(10);
// initial collection of houses
for (var i = 0; i < 10; i++){
var rx = random(width);
houses[i] = makehouse(rx);
}
}
function draw() {
background(219, 110, 163);
snowyTerrain();
snow();
house();
// Happy November text moving upwards
fill(196, 71, 132);
textSize(12);
textFont('Helvetica');
text('Happy November', 150, tY);
tY -= 0.05;
// moon
fill(255, 238, 194);
ellipse(330, 40, 40, 40);
}
function snow() {
for (var i = 0; i < 50; i++) {
ellipse(random(0, width), random(0, height), 1, 1);
}
}
function snowyTerrain() {
noStroke();
fill(252, 230, 240);
beginShape();
for (var x = 0; x < width + 1; x++) {
var t = (x * terrainDetail) + (millis() * terrainSpeed);
var y = map(noise(t), 0,1, height * 0.5, height * 0.8);
vertex(x, y);
}
vertex(width, height);
vertex(0, height);
endShape();
}
function house() {
push();
translate(0.1 * width, 0.1 * height);
scale(0.8);
stroke(0);
noFill();
updateAndDisplayhouses();
removehousesThatHaveSlippedOutOfView();
addNewhousesWithSomeRandomProbability();
pop();
}
// houses' positions are updated and displayed
function updateAndDisplayhouses(){
for (var i = 0; i < houses.length; i++) {
houses[i].move();
houses[i].display();
}
}
// houses outside of the canvas are removed
function removehousesThatHaveSlippedOutOfView() {
var housesToKeep = [];
for (var i = 0; i < houses.length; i++){
if (houses[i].x + houses[i].breadth + 70 > 0) {
housesToKeep.push(houses[i]);
}
}
houses = housesToKeep;
}
// new house is added at the end with small probability
function addNewhousesWithSomeRandomProbability() {
var newhouseLikelihood = 0.01;
if (random(0, .5) < newhouseLikelihood) {
houses.push(makehouse(width + 70));
}
}
// method to update position of house every frame
function houseMove() {
this.x += this.speed;
}
// draw the houses
function houseDisplay() {
var floorHeight = 15;
var bHeight = this.nFloors * floorHeight;
// house block
fill(145, 55, 26);
noStroke();
push();
translate(this.x, height - 40);
rect(0, -bHeight + 20, this.breadth, bHeight);
// roof
fill(61, 27, 18);
triangle(-10, -bHeight + 20, this.breadth/2, -bHeight * 2, this.breadth + 10, -bHeight + 20)
// snow on the roof
stroke(255);
strokeWeight(6);
strokeJoin(ROUND);
fill(255);
triangle(0, -bHeight, this.breadth/2, -bHeight * 2, this.breadth, -bHeight)
//window that flickers
strokeWeight(0.5);
stroke(0);
fill("yellow")
noStroke();
var wL = this.nFloors * 6 // variable to determine location
var wW = random(25, 27); //variable to determine width and height
rect(wL, -bHeight + wL * 2, wW, wW - 10);
// windowsill
stroke(0);
line(wL + wW / 2, -bHeight + wL * 2, wL + wW / 2, -bHeight + wL * 2 + wW - 10);
line(wL, -bHeight + wL * 2 + wW / 2 - 5, wL + wW, -bHeight + wL * 2 + wW / 2 - 5);
pop();
}
function makehouse(birthLocationX) {
var hs = {x: birthLocationX,
breadth: 70,
speed: -4,
nFloors: round(random(2,5)),
move: houseMove,
display: houseDisplay}
return hs;
}
I wanted to create a scene that represented the Christmas season, which I like a lot. I made the terrains become snowy hills, and added colors that made the scenery seem pleasant. It was fun to play around with different factors of my drawings, especially to control different things in a way they depend on other elements. For instance, I made my window and windowsills randomly move together to create an effect of the yellow light flickering from each house. It was also fun to add snow on the roofs using rounded joining corners. If I were to continue to work on this, I would want to do something more interesting with the text movement.
The Game: The Game is a video game design by Angela Washko. The game presents contents relating politics, tactic practices of male pick-up artist, seduction community and feminism advocating aspects. Like a dating simulator, players can experience coaching lessons of seduction from pick-up artists. The game provides players opportunities to explore the structure of social behaviors as well as revealing the danger and complexity of this path.
Angela Washko, an artist, writer and facilitator, is devoted in creating new topics of feminism in the spaces. Living and working in Pittsburgh, Angela Washko is currently an assistant professor of College of Art at carnegie Mellon University.
/*
Aaron Lee
Section C
sangwon2@andrew.cmu.edu
Project-11-Generative Landscape
*/
var stars = [];
function setup() {
createCanvas(400,600);
for (var i = 0; i < 15; i ++) { //initial placement of stars
var starsX = random(width);
var starsY = random(height);
stars[i] = makestars(starsX, starsY);
}
frameRate(10);
}
function draw() {
background("black");
showstars();
deletestars();
makeNewstars();
spaceship();
}
//----------------------------------------stars--------------------------------------------------
function showstars() { //this makes the stars move down
for(var i = 0; i < stars.length; i++) {
stars[i].move();
stars[i].display();
}
}
function deletestars() { //deletes stars that disappear from sight
var starsToKeep = [];
for (var i = 0; i < stars.length; i++) {
if(stars[i].y > 600) {
starsToKeep.push(stars[i]);
}
}
}
function makeNewstars() { //creates more stars coming down
var newstarsLiklihood =0.05
if (random(0,1) < newstarsLiklihood) {
stars.push(makestars(random(width), 0));
}
}
function starsMove() { //sets the move property of stars
this.y += this.speed;
}
function starsDisplay() { //what stars look like
var starsSize = this.starsSize;
fill("#FFFF00");
noStroke();
push();
translate(this.x, this.y);
rotate(frameCount / 200.0);
star(0, 0, 5, 10, 5);
pop();
}
function star(x, y, radius1, radius2, npoints) {
let angle = TWO_PI / npoints;
let halfAngle = angle / 2.0;
beginShape();
for (let a = 0; a < TWO_PI; a += angle) {
let sx = x + cos(a) * radius2;
let sy = y + sin(a) * radius2;
vertex(sx, sy);
sx = x + cos(a + halfAngle) * radius1;
sy = y + sin(a + halfAngle) * radius1;
vertex(sx, sy);
}
endShape(CLOSE);
}
function makestars(birthLocationX, birthLocationY) { //function that makes the stars
var stars = {x : birthLocationX, //stars are born in random places
y : birthLocationY,
speed : random(1, 5), //sets random speed of stars
starsSize : random(10, 25), //sets random size of stars
move : starsMove,
display : starsDisplay}
return stars;
}
//----------------------------------------spaceship--------------------------------------------------
function spaceship() { //function makes the spaceship window frame
fill("#C0C0C0");
strokeWeight(5);
stroke("black");
beginShape();
vertex(0, 600);
vertex(0, 520);
vertex(400, 520);
vertex(400, 600);
endShape(CLOSE);
beginShape();
vertex(0, 80);
vertex(0, 0);
vertex(400, 0);
vertex(400,80);
endShape(CLOSE);
beginShape();
vertex(0, 0);
vertex(80, 0);
vertex(80, 600);
vertex(0, 600);
endShape(CLOSE);
beginShape();
vertex(320, 0);
vertex(400, 0);
vertex(400, 600);
vertex(320, 600);
endShape(CLOSE);
fill("#808080");
ellipse(120, 40, 30, 30);
ellipse(200, 40, 30, 30);
ellipse(280, 40, 30, 30);
ellipse(120, 560, 30, 30);
ellipse(200, 560, 30, 30);
ellipse(280, 560, 30, 30);
}
When I first thought of the generative landscape, I associated with the infinite and the random arrangement of the stars in galaxy. Then I came up with a narrative that a spaceman is observing stars inside the spaceship. Overall I used monotone for the spaceship in order to give focus to the stars
Rosa Menkman, a Dutch artist, specializes in glitch art and resolution theory. She investigates visual compression and glitches to create an artwork by combining different sensory systems. Developing glitch art as a genre, the artist proposes a programming structure that takes the use of compression artifacts into dicrete cosine transform blocks. Such an approach successfullly builds a subtle relationship between an artifact and a process.
What attracts me the most is her creative insight into illustrating compressive art. The glitches mark a transformation of audios and sounds that are hard to describe or see into a visual language that can have colors, scopes, continuity and variance. Such clear yet bold compositions give us a more insightful knowledge of how different types of art can work through visualizing those elements. What’s more, it can be interesting to study such patterns to find out the aesthetics and the universal “golden ratios” behind all those different genres and expressions.
Janet Echelman is an artist who defies categorization. She creates experiential sculpture at the scale of buildings that transform with wind and light.
How it’s made: Atomized water particles and colored lighting, 60 ‘ x 230′ x 5’
This is the first part of a permanent installation which opened on September 12, 2018 in the heart of Philadelphia’s thriving downtown. It is integrated with Kieran Timerlake’s Dilworth Park Plaza (opened to public in 2014), on the west side of City Hall, where many transit lines run below. The artist was commissioned by the Center City District to incorporate the site’s historic associations with water and transportation. The trains passing below will activate four-foot-tall curtains of colorful atomized mist that shows the path of a specific transit line. “These rail lines bring over 70,000 passengers to the site each day.”
Permanent artwork installation made from moving mist and colored light, “Pulse” traces in the surface of the fountain the paths of the subway and trolley lines that converge under the plaza in real time.
This piece is really interesting because the specialized pumps create an ephemeral fog-like mist made of filtered, softened water onto which lighting is projected so it is completely safe for children to play in. I learned that this design and plaza integration took 9 years from the start of construction to the first reveal and launch of the green line phase and they’re fundraising to open the blue and orange lines, each will correspond to different SEPTA transit lines. I think this project starts to show how Philly is really harnessing the strength of their Center City District, a non profit org, to show how public efforts can successfully be directed towards creating better lives and experiences for people in the city. As much as this art celebrates history (first water pumping station in this area and also across from Pennsylvania Railroad Station) it also embraces the future by bringing technology into public space for not only spectatorship, but also interaction.
CREDITS
Artist: Janet Echelman Studio Echelman Team: Melissa Henry, Daniel Zeese, Cameron Chateauneuf, Drew Raines, Melanie Rose Peterson, Rachel Kaede Newsom, Becky Borlan, Daniel Lear The Olin Studio: Susan Weiler, Richard Roark, Ben Monette, Greg Burrell, Kasey Toomey ARUP Lighting: Brain Stacy, Christoph Gisel Urban Engineers: Andrew Scott Kieran Timberlake: Steve Kieran, Marilia Rodrigues CMS: Nadine Nemec, Chris Cook, Roy Kaplan Center City District: Paul Levy Images: Sean O’Neill, Melvin Epps, Sahar Coston-Hardy
I was inspired by space games and how it shows movement of landscape using the background stars and moving objects. Soource: Galaga
For this project, I wanted to maximize randomization of the space objects, but still have some sort of coherency. Mostly, I was trying to become more comfortable with creating different classes of objects.