Aaron Lee – Looking Outwards – 11

Toni Doves is a media artist active in New York who uses motion sensing for her film, installation and performance. For example, in her exhibition, participants would see their avatars on screen that emulate motions.

One of her prominent projects, ‘The dress that eats soul’, already gives a powerful presence without further explanation by its appearance. A huge mechanical female sculpture in front of movie screen emits different lights and effects that follows to the narrative.

According to artist’s description, the sculpture’s dress is triggered by the movement of the participant and starts to play video and tell a story. The projection on the overheads follows the direction of the participant’s head to enhance virtual reality. The video is dubbed with poem scripted by novelist Rene Steinke. Each video is unique and responsive to the participant’s movement.

The main reason I picked this artist is mainly due to my passion in cinema which Doves has a serious connection to. I was curious to find what aesthetic and technological impact one could bring to the art of cinema. It was also interesting how she was using responsive features of her work to address and develop personal connections to the participants.

Artist’s website: https://tonidove.com/

The dress that eats soul by Toni Doves, (watch from 22:00 and onward)

Minjae Jeong-Project 11-landscape

sketch

//Minjae Jeong
//Section B
//minjaej@andrew.cmu.edu
//Project-11

var trees = [];

function setup() {
    createCanvas(480, 400);
    // collection of trees
    for (var i = 0; i < 10; i++){
        var rx = random(width);
        trees[i] = makeTrees(rx);
    }
    frameRate(100);

}

function draw() {
    background('lightblue');
    drawRoad();
    updateTrees();
    removeTrees();
    addNewTrees();
    drawRedcar(180, 230);
    drawYellowcar(260, 330);
    drawSun();
}

function drawSun() {
    fill(255, 102, 0);
    ellipse(440,20, 130);

}

function drawRoad() {
    //grey road
    fill(163);
    rect(0, 220, 480, 180);

    //white line
    fill('white');
    rect(0, 290, 480, 5);
}

function drawRedcar(x , y) {
    strokeWeight(0);

    //body
    fill('red');
    rect(x, y, 100, 20);
    rect(x + 20, y - 20, 50, 20);

    //tires
    fill('black');
    ellipse(x + 20, y + 20, 21, 21);
    ellipse(x + 80, y + 20, 21, 21);

    //wheels
    fill('white');
    ellipse(x + 20, y + 20, 15, 15);
    ellipse(x + 80, y + 20, 15, 15);

    fill('red');
    ellipse(x + 20, y + 20, 3, 3);
    ellipse(x + 80, y + 20, 3, 3);

    //windows
    fill(102, 204, 255);
    rect(x + 28, y - 17, 35, 15);
}

function drawYellowcar(x , y) {
    strokeWeight(0);

    //body
    fill('yellow');
    rect(x, y, 100, 20);
    rect(x + 20, y - 20, 50, 20);

    //tires
    fill('black');
    ellipse(x + 20, y + 20, 21, 21);
    ellipse(x + 80, y + 20, 21, 21);

    //wheels
    fill('white');
    ellipse(x + 20, y + 20, 15, 15);
    ellipse(x + 80, y + 20, 15, 15);

    fill('blue');
    ellipse(x + 20, y + 20, 3, 3);
    ellipse(x + 80, y + 20, 3, 3);

    //windows
    fill(102, 204, 255);
    rect(x + 28, y - 17, 35, 15);
}

function updateTrees(){
    for (var i = 0; i < trees.length; i++){
        trees[i].move();
        trees[i].display();
    }
}

function removeTrees(){
    var treesToKeep = [];
    for (var i = 0; i < trees.length; i++){
        if (trees[i].x + trees[i].breadth > 0) {
            treesToKeep.push(trees[i]);
        }
    }
    trees = treesToKeep; // remember the surviving buildings
}

function addNewTrees() {
    //probability of new trees
    var newTreeLikelihood = 0.01;
    if (random(0,1) < newTreeLikelihood) {
        trees.push(makeTrees(width));
    }
}

// method to update position of tree every frame
function treeMove() {
    this.x += this.speed;
}

// draw the trees
function treeDisplay() {
    fill(119, 83, 0);
    noStroke();
    push();
    translate(this.x, height - 230);
    noStroke();
    rect(0, 0, 15, 50);
    pop();

    fill(0, 153, 0);
    noStroke();
    push();
    translate(this.x, height - 230);
    noStroke();
    ellipse(0, 20, 40);
    ellipse(10, 3, 40);
    ellipse(20, 20, 40);
    pop();
}

function makeTrees(birthLocationX) {
    var tree = {x: birthLocationX,
                y: 200,
                breadth: 50,
                speed: -1.0,
                move: treeMove,
                display: treeDisplay}
    return tree;
}

For this project, I wanted to create a project that displays cars and the surroundings, which are sky, trees, road, and a sun. It was more challenging than my expectation but will be fun and useful once I absorb it.

Shariq M. Shah – Looking Outwards 11


For Want of a Nail

Amy Franceschini is an artist and designer who challenges the “certainties” of space and time in a way that brings into inquiry the supposed conflict between mankind and nature. Throughout her work, there are developments of an intertwined relationship between people, nature, and space, in ways that reconfigure understandings of traditional space making. One project by her practice, Future Farmers, is called Wind Theater and it transforms and translates the physical experience of wind into one that is visual and auditory, using its movements to generate color fields. Another project, For Want of a Nail, brings into inquiry the complex history of nuclear energy in New Mexico, as it seeks to develop a dialogue between the materials and those affected by the materials. Franceschini’s work spans a variety of disciplines and challenges the notions of art, architecture, and research in ways that positions the work in intriguing ways.

Wind Theater

http://www.futurefarmers.com/projects

Kristine Kim – Project 10-Sonic -Sketch


!!!!!UPDATE!!!!!

GOT IT TO WORK ON WORDPRESS

sketch

// Kristine Kim
// Section D
// younsook@andrew.cmu.edu
// Project -10-Interactive Sonic Sketch


var vacuumnoise;
var fridgenoise;
var dogbarking;
var outsidenoise;
var keynoise;
//global variables for images
var vacuumpic;
var dogpic;
var keypic;

function preload() {
//load pictures
    var vacuumpicURL = "https://i.imgur.com/qbo0LSB.png[/img]"
    vacuumpic = loadImage(vacuumpicURL);
    var dogpicURL = "https://i.imgur.com/j41YK4G.png[/img]"
    dogpic = loadImage(dogpicURL);
    var keypicURL = "https://i.imgur.com/ozegqNz.png[/img]"
    keypic = loadImage(keypicURL);

//load sounds
    vacuumnoise = loadSound("https://courses.ideate.cmu.edu/15-104/f2019/wp-content/uploads/2019/11/vacuum.wav")
    
    fridgenoise =loadSound("https://courses.ideate.cmu.edu/15-104/f2019/wp-content/uploads/2019/11/fridge.wav")
    
    dogbarking = loadSound("https://courses.ideate.cmu.edu/15-104/f2019/wp-content/uploads/2019/11/dogbarking.wav")
    
    outsidenoise = loadSound("https://courses.ideate.cmu.edu/15-104/f2019/wp-content/uploads/2019/11/birdsoutside.wav")
    
    
    keynoise = loadSound("https://courses.ideate.cmu.edu/15-104/f2019/wp-content/uploads/2019/11/keys.wav")

// //vacuuming noise
//     vacuumnoise = loadSound("vacuum.wav");

//  //sound of fridge opening and closing   
//     fridgenoise =loadSound("fridge.wav");

// //sound of dog barking  
//     dogbarking = loadSound("dogbarking.wav");

// //sound of birds chirping outside    
//     outsidenoise = loadSound("birdsoutside.wav");

// //sound of key dropping on a table    
//     keynoise = loadSound("keys.wav");

}


function setup() {
    createCanvas(500, 400);
    useSound()
}
function soundSetup(){
//controlling the volume
    vacuumnoise.setVolume(1);
    fridgenoise.setVolume(1);
    dogbarking.setVolume(1);
    outsidenoise.setVolume(1);
    keynoise.setVolume(1);

}

function draw() {
    background(255, 247, 135);

//dark brown outline around everything
    stroke(102, 77, 27);
    strokeWeight(5);

//drawing the floor
    fill(199, 154, 58);
    rect(-5,280, 510,400);

//drawing the fridge
    fill(245);
    rect(40,100, 100, 200);
    //fridge shadow
    fill(176, 174, 169);
    rect(40, 170, 100, 10);

    // handle
    fill(0);
    rect(125,120,5,40);
    rect(125,190,5,80);

//drawing the windows
    fill(184, 241, 252);
    rect(170,30,130,100);
    rect(350,30,130,100);

    line(235,30,235,130);
    line(170,80,300,80);
    line(415,30,415,130);
    line(350,80,480,80);

    //table legs
    noStroke();
    fill(102, 77, 27);
    rect(210,240, 12, 70);
    rect(380,240, 12, 70);
    
    fill(71, 54, 20);
    rect(290,190, 12, 100);
    rect(450,190, 12, 100);

//drwing the table   
    fill(102, 77, 27);
    beginShape();
    vertex(280,190);
    vertex(480,190);
    vertex(280,190);
    vertex(200,240);
    vertex(400,240);
    vertex(480,190);
    endShape();

//drawing the vaccum image
    image(vacuumpic, 250, 110, 350,250);

//drawing the dog image
    image(dogpic,5,200,300,200);

//drawing the keys image
    image(keypic,260,195,40,40);
}

function mousePressed(){
//If pressed on keys, play sound and if pressed somewher else, pause the sound
    if (mouseX > 260 & mouseX < 300 && mouseY > 195 && mouseY < 235){
        keynoise.play();
        } else {
            keynoise.pause();
        }
//If pressed on dog, play sound and if pressed somewher else, pause the sound
    if (mouseX > 80 & mouseX < 280 && mouseY > 240 && mouseY < 320){
        dogbarking.play();
        } else {
            dogbarking.pause();
        }
//If pressed on vacuum, play sound and if pressed somewher else, pause the sound
    if (mouseX > 300 & mouseX < 480 && mouseY > 100 && mouseY < 300){
        vacuumnoise.play();
        } else {
            vacuumnoise.pause();
        }
//If pressed on fridge, play sound and if pressed somewher else, pause the sound
    if (mouseX > 40 & mouseX < 140 && mouseY > 100 && mouseY < 300){
        fridgenoise.play();
        } else {
            fridgenoise.pause();
        }
//If pressed on right window, play sound and if pressed somewher else, pause the sound
    if (mouseX > 170 & mouseX < 300 && mouseY > 30 && mouseY < 130){
        outsidenoise.play();
        } else {
            outsidenoise.pause();
        }

}

I wanted to create an environment and a setting for this project so I decided to create a kitchen/ living room. I was reminded of my childhood when I was working on this project because I used to play a lot of games where I was allowed to decorate my room or my house so I had a lot of fun with this one. The only problem that I had was that the sounds were not playing on WordPress but it works perfectly fine on a local server. I’m still having this problem, but I couldn’t figure it out. I have attached a zip file of my sounds so that it can be played on the local server.

Angela Lee – Looking Outwards – 11

A video showing Shin’m, Eunsu Kang’s environment and performance installation.

I’d like to focus on the media artist Eunsu Kang, the artist behind the installation Shin’m. Kang studied at Ewha Woman’s University, where she received her BFA and MFA. For her postgraduate studies, Kang received an MA from UCSC and a PhD from the University of Washington.

Shin’m is a hybrid of a performance and installation which explores the relationships between the body and space through spatial drawing of sound. Kang created this piece in collaboration with Diana Garcia-Snyder (a choreographer), Donald Craig, and Bo Choi (costume designer). I loved seeing the environment respond visually and sonically to the participants’ movements. I think it inspired the participant to try different movements to see what kind of environment they could generate. Moreover, though the piece is very technical, the sounds of nature add a different dimension to the environment and create a soothing, beautiful atmosphere.

Zee Salman- Sonic Sketch- Project 10

//UPDATED SOUND//

sketch

//Zee Salman
//Project 10
// sketch.js template for sound and DOM
//
// This is the 15104 Version 1 template for sound and Dom.
// This template prompts the user to click on the web page
// when it is first loaded.
// The function useSound() must be called in setup() if you
// use sound functions.
// The function soundSetup() is called when it is safe
// to call sound functions, so put sound initialization there.
// (But loadSound() should still be called in preload().)


function preload() {
    stomach = loadSound("https://courses.ideate.cmu.edu/15-104/f2019/wp-content/uploads/2019/11/447911__breviceps__growling-stomach-stomach-rumbles-1.wav");
    fart = loadSound("https://courses.ideate.cmu.edu/15-104/f2019/wp-content/uploads/2019/11/402628__inspectorj__whoopee-cushion-long-a-1.wav");
    laugh = loadSound("https://courses.ideate.cmu.edu/15-104/f2019/wp-content/uploads/2019/11/259611__stevious42__baby-laugh-1.wav");
    cry = loadSound("https://courses.ideate.cmu.edu/15-104/f2019/wp-content/uploads/2019/11/386923__gumballworld__baby-newborn-cry2-1.wav");
    stomach.setVolume(5);
}



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


function draw() {
    // you can replace any of this with your own code:
    background(200);
    //baby head
    noStroke();
    fill("brown");
    ellipse(width/2, height/4, 100, 120 );
    //arms
    rect(width/2.75, height/2.2, 140, 100);
    //baby top
    fill("pink");
    ellipse(width/2, height/2, 100, 140);
    ellipse(width/2.5, height/2.25, 50, 60);
    ellipse(width/1.65, height/2.25, 50, 60);
    //chest
    fill("brown");
    triangle(width/2.5,height/2.6, 300, 192, width/2,height/2);
    //baby tummy
    fill("white");
    ellipse(width/2, height/1.9, 70, 90);
    //baby diapers
    fill("gray")
    ellipse(width/2, height/1.63, 100, 90);
     //baby tummy
     fill("pink");
    rect(width/2.5, height/1.95, 100, 40);
    fill("white");
    rect(width/2.32, height/1.98, 69, 30);
    //baby legs
    fill("brown");
    ellipse(width/1.55,height/1.5, 70, 50);
    ellipse(width/2.65,height/1.5, 70, 50);
    fill("pink");
    ellipse(width/2.35,height/1.5, 50, 50);
    ellipse(width/1.7,height/1.5, 50, 50);
    //baby neck
    fill("brown");
    rect(width/2.22, height/4, 50, 90);
    //hair
    fill("black");
    ellipse(width/2, height/5.5, 90, 60);
    //eyes
    fill("black");
    ellipse(width/2.2, height/3.8, 15, 15);
    ellipse(width/1.85, height/3.8, 15, 15);
    //pacifier
    fill("white");
    ellipse(width/2, height/3.2, 30, 20);
    fill("pink");
    ellipse(width/2, height/3.2, 10, 15);
    

    
}
function mousePressed() {
    //click on the baby's bib/ stomach
    if (mouseX < width/2 + 30 &  mouseX > width/2 - 30 && mouseY < height/2 + 40 && mouseY > height/2- 40){
        stomach.play();
        
        }else{
        stomach.pause();
    }
    //click on the baby's neck/pacifier area
    if (mouseX < width/2 + 10  &  mouseX > width/2 - 30 && mouseY < height/2+20 && mouseY > height/4){
        laugh.play();

        }else{
        laugh.pause();
    }
    //click on the baby's diaper
    if (mouseX < width/2 + 10  &  mouseX > width/2 - 30 && mouseY < height/1.5 && mouseY > height/1.7){
        fart.play();
        }else{
        fart.pause();   
    }
    //click on the bab'ys left leg
    if (mouseX < width/1.55 + 10  &  mouseX > width/2.55 - 10 && mouseY < height/1.5+20 && mouseY > height/1.7){
        cry.play();
        }else{
        cry.pause();

    }

}

I wanted to create a sketch that was cohesive but still had different sounds that would be interesting when put together. I was inspired when I was walking past a woman who had two kids, one was crying and one was laughing. Babies make a variety of sounds and these are just a few interesting ones.

Sean Leo – Project 11 – generative skyscape

sleo-project_11

//Sean B. Leo
//sleo@andrew.cmu.edu
//Section C

//Project 11 - generative landscape
var terrainSpeed = 0.0005;
var terrainDetail = 0.001;
var clouds = []; //background clouds
var clouds2 = []; //foreground clouds
var c1, c2;

function setup() {
  createCanvas(480, 480);
    for (var i = 0; i < 10; i++){
        var rx = random(width);
        clouds[i] = makeClouds(rx);
        clouds2[i] = makeClouds2(rx);
    }
   frameRate(30);
}

function draw() {
  //background gradient colors
  c1 = color(40, 90, 255,10);
  c2 = color(250, 250, 240);
  setGradient(c1, c2);
   
    updateClouds();
    removeClouds();
    addRandomClouds(); 
    
}

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);
  }
}


function updateClouds(){
    // Update the cloud positions
    for (var i = 0; i < clouds.length; i++){
        clouds[i].move();
        clouds[i].display();
    }
  for (var i = 0; i < clouds2.length; i++){
        clouds2[i].move();
        clouds2[i].display();
    }
}


function removeClouds(){
  var cloudsToKeep = [];
   var cloudsToKeep2 = [];
    for (var i = 0; i < clouds.length; i++){
        if (clouds[i].x + clouds[i].breadth > 0) {
            cloudsToKeep.push(clouds[i]);
        }
    }
    clouds = cloudsToKeep;
  for (var i = 0; i < clouds2.length; i++){
        if (clouds2[i].x + clouds2[i].breadth > 0) {
            cloudsToKeep2.push(clouds2[i]);
        }
    }
  clouds2 = cloudsToKeep2;
}


function addRandomClouds() {
    // probability of new cloud
    var newCloudLikelihood = 0.01; 
    if (random(0,1) < newCloudLikelihood) {
        clouds.push(makeClouds(width));
      clouds2.push(makeClouds2(width));
    }
}


//cloud positions
function cloudMove() {
    this.x += this.speed;
}
    

//draw clouds
function cloudDisplay() {
    //var bHeight = this.x; 
    fill(230, 230, 230, 155); 
    noStroke(); 
  
    push();
    translate(this.x, this.y+20);
    ellipse(0, 0, this.d/2, this.d/3);
    fill(220, 220, 220, 155); 
    noStroke();
    ellipse(0 - 10, 0 + 5, this.d*2, this.d* 1.3);
    fill(240, 240, 240, 190); 
    noStroke();
    ellipse(0 + 15, 0, this.d*1.2, this.d/2);
    pop();
}
function cloudDisplay2() {
    //var bHeight = this.x; 
    fill(255, 255, 255, 200); 
    noStroke(); 
    push();
    translate(this.x, this.y+20);
    ellipse(0, 0, this.d*1.1, this.d/1.2);
    fill(245, 245, 245, 200); 
    noStroke();
    ellipse(0 - 10, 0 + 5, this.d*3, this.d/ 1.3);
    fill(255, 255, 255, 200); 
    noStroke();
    ellipse(0 + 15, 0, this.d*1.2, this.d/2);
    pop();
}

function makeClouds(birthLocationX) {
    var cloud = {x: birthLocationX,
                y: random(0, height / 2),
    	        d: random(20, 80),
                breadth: 100,
                speed: -.1,
                move: cloudMove,
                display: cloudDisplay}
    return cloud;
}
function makeClouds2(birthLocationX) {
    var cloud2 = {x: birthLocationX,
                y: random(0, height / 2),
    	        d: random(20, 80),
                breadth: 100,
                speed: -.1,
                move: cloudMove,
                display: cloudDisplay2}
    return cloud2;
}



Jasmine Lee – Project 11 – Landscape

genlandscape

//Jasmine Lee
//jasmine4@andrew.cmu.edu
//Section C 
//Project 11 (Generative Landscape)

var waterSpeed = 0.0002;
var waterDetailL1 = 0.0005; //controls amplitude of left side of waterfall
var waterDetailL2 = 0.0001;
var waterDetailL3 = 0.00025;
var waterDetailL4 = 0.00075;
var waterDetailR1 = 0.0001; //controls amplitude of right side of waterfall
var waterDetailR2 = 0.00025;
var waterDetailR3 = 0.0005;
var waterDetailR4 = 0.00075;
var waterDetailH1 = 0.0005; //controls amplitude of horizontal waves
var waterDetailH2 = 0.00095;
var waterDetailH3 = 0.00075;
var fish = [];
var newFishLikelihood = 2.9;

function setup() {
    createCanvas(480, 480);
    frameRate(20);

    //makes fish and places them in random x and y positions
    for (var i = 0; i < 8; i ++) {
        fish.push(makeFish(floor(random(240, 480)), floor(random(300, 360))));     
    }
    //displays the fish properly
    for (var i = 0; i < fish.length; i ++) {
        updateAndDisplayFish();
    }
}

function draw() {
    background(138, 212, 227); //teal
    noFill();
    stroke(255, 255, 255, 100); //transparent white

    //LEFT SIDE OF WATERFALL---------------------------------------------
    //1st line of waterfall
    for (var y = 0; y < 240; y++) {
        //t determines how far away the line is from x = 0 at y
        //millis() * waterSpeed slows down how fast the line is traveling)
        var t = ((y * waterDetailL1) + millis() * waterSpeed);
        var x = map(noise(t), 0, 1, 0, 220);
        line(x, y, (t - width), y);
    }

    //2nd line of waterfall
    for (var y = 0; y < 240; y++) {
        var t = ((y * waterDetailL2) + millis() * waterSpeed);
        var x = map(noise(t), 0, 1, 10, 235);
        line(x, y, (t - width), y);
    }

    //3rd line of waterfall
    for (var y = 0; y < 240; y++) {
        var t = ((y * waterDetailL3) + millis() * waterSpeed);
        var x = map(noise(t), 0, 1, 20, 250);
        line(x, y, (t - width), y);
    }

    //4th line of waterfall
    for (var y = 0; y < 240; y++) {
        var t = ((y * waterDetailL4) + millis() * waterSpeed);
        var x = map(noise(t), 0, 1, 50, 220);
        line(x, y, (t - width), y);
    }

    //RIGHT SIDE OF WATERFALL---------------------------------------------
    //1st line of waterfall

    for (var a = 0; a < 240; a ++) {
        //c gives us how far away the line is from x = 0 at y
        //millis() * waterSpeed slows down how fast the line is traveling)
        var c = ((a * waterDetailR1) + millis() * waterSpeed);
        var b = map(noise(c), 0, 1, 240, 480);
        line(b, a, ((width + 60) - c), a);
    }

    //2nd line of waterfall
    for (var a = 0; a < 240; a ++) {
        var c = ((a * waterDetailR2) + millis() * waterSpeed);
        var b = map(noise(c), 0, 1, 220, 480);
        line(b, a, ((width + 60) - c), a);
    }

    //3rd line of waterfall
    for (var a = 0; a < 240; a ++) {
        var c = ((a * waterDetailR3) + millis() * waterSpeed);
        var b = map(noise(c), 0, 1, 200, 480);
        line(b, a, ((width + 60) - c), a);
    }
  

    //4th line of waterfall
    for (var a = 0; a < 240; a ++) {
        var c = ((a * waterDetailR4) + millis() * waterSpeed);
        var b = map(noise(c), 0, 1, 300, 480);
        line(b, a, ((width + 60) - c), a);
    }


    //HORIZONTAL WAVES--------------------------------------------
    noFill();
    stroke(41, 152, 217, 100);

    //1st wave
    for (var x = 0; x < width; x ++) {
        //c gives us how far away the line is from x = 0 at y
        //millis() * waterSpeed slows down how fast the line is traveling)
        var t = ((x * waterDetailH1) + millis() * waterSpeed);
        var y = map(noise(t), 0, 1, 210, 240);
        line(x, y, x, height);
    }


    //2nd wave
    for (var x = 0; x < width; x ++) {
        var t = ((x * waterDetailH2) + millis() * waterSpeed);
        var y = map(noise(t), 0, 1, 220, 250);
        line(x, y, x, height);
    }

    //3rd wave
    for (var x = 0; x < width; x ++) {
        var t = ((x * waterDetailH3) + millis() * waterSpeed);
        var y = map(noise(t), 0, 1, 240, 300);
        line(x, y, x, height);
    }

    //functions used to display and control the fish
    updateAndDisplayFish();
    removeFish();

}

function updateAndDisplayFish() {
    //update the fish position and display
    for (var i = 0; i < fish.length; i ++) {
        fish[i].move();
        fish[i].displayF();
    }
}

function removeFish() {
    //Copy all fish we want to keep into a new array
    var fishToKeep = [];
    for (var i = 0; i < fish.length; i++) {
        if (fish[i].x + fish[i].fishWidth > 0) {
            fishToKeep.push(fish[i]);
        }
    }
    fish = fishToKeep; //stores the surviving fish
}

function fishMove() {
    //controls fish movement
    this.x += this.speed;

    //makes fish start back at right end of canvas once they reach the left
    if (this.x < 0) {
        this.x = width;
    } 
}

function fishDisplay() {
    //fish body
    fill(237, 175, 69, 100); //fish body
    noStroke();
    ellipse(this.x, this.y, this.fishWidth, this.fishHeight);
    //fish tail
    triangle(this.x + (this.fishWidth / 2) , this.y, this.x + 20, this.y + 5, this.x + 20, this.y - 5);
}

//creates fish object
function makeFish(birthLocationX, birthLocationY) {
    var fs = {x: birthLocationX,
                y: birthLocationY,
                fishWidth: random(15, 30),
                speed: -2.0,
                fishHeight: random(7, 10),
                move: fishMove,
                displayF: fishDisplay}
    return fs;
}

For my landscape, I wanted to depict a peaceful waterfall scene. Using different noise functions, I was able to create gently flowing water, and subtle waves. The fish in the freshwater loop continuously, as if they were swimming around in the water and looping back where we could not see them turn. The most difficult part was this project was creating the objects. I had trouble with getting the correct amount of fish to show up, and with keeping the fish on the page. Over time, the waterfall changes position until it seems as if there are two waterfalls. Each time the landscape is refreshed, the fish sizes and positions are randomized.

Initial sketch of my waterfall landscape.

Ammar Hassonjee – Project 11 – Generative Landscape

Train Landscape

/* Ammar Hassonjee
    ahassonj@andrew.cmu.edu
    Section C
    Project 11
  */

// global variables and arrays declared to hold objects
var traintracks = [];
var tracky = 0; //position of train tracks
var oases = []; // array for oases objects
var trees = []; // array for tree objects

function setup() {
    createCanvas(480, 480);
    // for loop that pushed train track objects to array
    for (var i = 0; i < 480; i += 20) {
        traintracks.push(makeTrainTracks(210, i));
        // creates a random amount of oases to add to the oases array each time
        // the program is loaded
        if (i % 240 === 0) { //random iteration

            // variables initialized to pass as parameters for making the oases objects
            var xloc = int(random(width / 4));
            var yloc = int(random(height));
            var shade = int(random(200, 255));
            var xsize = int(random(60, 100));
            var ysize = int(random(100, 150));
            oases.push(makeOasis(xloc, yloc, shade, xsize, ysize));
        }

    }

    frameRate(20);

}

function draw() {

    background(250, 245, 200);
    fill(97, 74, 66);
    rect(200, 0, 10, height); // train track boundaries
    rect(270, 0, 10, height); // train track boundaries

    strokeWeight(1);
    // calling the track functions to continously move the tracks and add oases objects to canvas
    updateTracks();
    removeTracks();
    addTracks();

    // function called for drawing the train object
    drawTrain();

}

// updating the position of each track and oases in each of the arrays
function updateTracks() {
    // for loop that calls train track objects and moves/displays them
    for (var i = 0; i < traintracks.length; i++) {
        traintracks[i].move();
        traintracks[i].display();
      }

      // for loop that calls oases objects and moves/displays them
    for (var j = 0; j < oases.length; j++) {
        oases[j].move();
        oases[j].display();
    }

          // for loop that calls tree objects and moves/displays them
    for (var k = 0; k < trees.length; k++) {
        trees[k].move();
        trees[k].display();
    }
}

function addTracks() {
    var position = traintracks[traintracks.length - 1].y; // initializing traintracks position
    traintracks.push(makeTrainTracks(210, position + 20)); // adding a traintracks object to the end of the array

    var chance = int(random(0, 40)); // making sure the chance of appending an oases object is low
    if (chance === 2) {
        // variables declared as parameters to pass to the oases object
        var xloc = int(random(width / 4));
        var yloc = height;
        var shade = int(random(200, 255));
        var xsize = int(random(40, 60));
        var ysize = int(random(100, 400));
        oases.push(makeOasis(xloc, yloc, shade, xsize, ysize));
    }

    // varying the chance of the trees appearing
    var chance2 = int(random(0, 25));
    if (chance2 === 4) {  // making sure the trees appear on both sides of the tracks
        var xpo = int(random(180)); // xvariable for first half of the canvas
        var ypo = height;
        var treeColor = int(random(100, 255));
        var treeSize = int(random(20, 40));
        trees.push(makeTree(xpo, ypo, treeSize, treeColor));
    } else if (chance === 6) {
        var xpo = int(random(300, width)); // x variable for second half of the canvas
        var ypo = height;
        var treeColor = int(random(100, 255));
        var treeSize = int(random(20, 30));
        trees.push(makeTree(xpo, ypo, treeSize, treeColor));
    }
}

function removeTracks() {
    // creating a duplicate array to keep track objects that are within the canvas
    var trackKeep = [];
    for (var i = 0; i < traintracks.length; i++) {
        if (traintracks[i].y > -10) {
            trackKeep.push(traintracks[i]);
        }
      }
    traintracks = trackKeep; // reassigning the tracks array to the duplicate array

    // creating a duplicate array to keep track objects that are within the canvas
    var oasesKeep = [];
    for (var i = 0; i < oases.length; i++) {
        if (oases[i].y > -40) {
            oasesKeep.push(oases[i]);
        }
      }
    oases = oasesKeep; // reassigning the oases array to the duplicate array

    // creating a duplicate array to keep track objects that are within the canvas
    var treeKeep = [];
    for (var i = 0; i < trees.length; i++) {
        if (trees[i].y > -40) {
            treeKeep.push(trees[i]);
        }
      }
    trees = treeKeep; // reassigning the trees array to the duplicate array
}

function trackMove() { // moving the position of each track and oases object
    this.y -= 10;
}

function trackDisplay() { // displaying each track object with rectangles
    strokeWeight(1);
    fill(97, 74, 66);
    rect(this.x, this.y, 60, 10);
}

function makeTrainTracks(xpos, ypos) { //object for making traintrack
    var trck = {x: xpos, y: ypos, move: trackMove,
                display: trackDisplay}
    return trck;
}

function makeOasis(xco, yco, color, xscale, yscale) { //object for making oases
    var oasis = {x: xco, y: yco, move: trackMove,
                display: oasisDisplay, tone: color,
                size1: xscale, size2: yscale};
    return oasis;
}

function oasisDisplay() { // displaying the oases objects as an ellipse
    fill(0, this.tone, this.tone);
    noStroke();
    ellipse(this.x, this.y, this.size1, this.size2);
    strokeWeight(1);
    stroke(0);
}

function makeTree(xp, yp, xsize, colour) { //function for making tree objects
    var tree1 = {x: xp, y: yp, move: trackMove, display: treeDisplay,
                    tone: colour, size1: xsize};
    return tree1;

}

function treeDisplay() { // displaying the tree objects by drawing from parameters
    noStroke();
    fill(0, this.tone, 0);
    ellipse(this.x, this.y, this.size1 * 1.5);
    fill(0, this.tone - 50, 0);
    ellipse(this.x, this.y, this.size1);
}

function drawTrain() { // drawing the train object as a static image

    noStroke();
    fill(200, 100, 100);
    rect(207, 220, 67, 160);
    rect(207, 390, 67, 160);

    strokeWeight(4);
    stroke(0);
    noFill()
    rect(230, 382, 20, 7);
    strokeWeight(2);
    rect(220, 230, 40, 120);
    rect(220, 410, 40, 120);

}

For this project, I chose to animate an aerial view over a train moving across a desert. I’ve always been interested in Wild West type scenes, so the image of a train moving past oases and small little cacti is one that stood out to me. I attached a sketch of my thought process at the bottom.

An image of a sketch from my notebook.

Kimberlyn Cho- Project 11- Landscape

ycho2-11

/* Kimberlyn Cho
Section C
ycho2@andrew.cmu.edu
Project 11 */

var gifts = [];

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

    //gifts already on conveyor at start
    for (var i = 0; i < 10; i++) {
        var rx = random(width);
        gifts[i] = makeGifts(rx);
    }
    frameRate(15);
}

function draw() {
    background(240);

    //draw gifts
    updateGifts();
    addGifts();
    removeGifts();

    //draw conveyor
    drawConveyor();
}

//update gift location
function updateGifts() {
    for (var i = 0; i < gifts.length; i++) {
        gifts[i].move();
        gifts[i].display();
    }
}
 
//remove gifts after conveyor from array
function removeGifts() {
    var giftsToKeep = [];
    for (var i = 0; i < gifts.length; i++) {
        if (gifts[i].x + gifts[i].breadth > 0) {
            giftsToKeep.push(gifts[i]);
        }
    }
    gifts = giftsToKeep;
}

//add new gifts to array
function addGifts() {
    var newGiftLikelihood = 0.04;
    if (random(0,1) < newGiftLikelihood) {
        gifts.push(makeGifts(width));
    }
}

//move gifts per frame
function giftMove() {
    this.x += this.speed;
}

//draw each gift
function giftDisplay() {
    //giftbox
    var py = 150;
    noStroke();
    fill(this.r, this.g, this.b);
    rect(this.x, py, this.breadth, this.h);
    //ribbons
    fill(255);
    rect(this.x + this.breadth / 4, py, this.ribbon, this.h);
    rect(this.x, py + this.h / 2, this.breadth, this.ribbon);
}

//gift Object
function makeGifts(birthLocationX) {
    var gift = {x: birthLocationX, 
                h: -random(10, 40),
                ribbon: random(1, 5),
                r: random(100, 255),
                g: random(100, 255),
                b: random(100, 255),
                breadth: random(20, 80),
                speed: -1.0,
                move: giftMove,
                display: giftDisplay}
    return gift;
}

function drawConveyor() {
    //conveyor
    strokeWeight(0);
    fill(220);
    rect(0, height / 2, width, 30, 25);
    strokeWeight(2);
    stroke(255);
    rect(4, (height / 2) + 4, width - 8, 30 - 8, 25);
    //conveyor gears
    for (var y = 0; y < 18; y++) {
        var ny = 15 + y * 20;
        strokeWeight(2);
        stroke(200);
        noFill();
        ellipse(ny, height / 2 + 15, 18);
        strokeWeight(0);
        fill(255);
        ellipse(ny, height / 2 + 15, 8);
    }
    //ground
    fill(150);
    strokeWeight(0);
    rect(0, height * 4 / 5, width, height / 5);
    //legs
    strokeWeight(0);
    fill(190);
    rect(100, height / 2 + 30, 12, 80);
    rect(88, height / 2 + 110, 35, 15, 2);
    //scanning machine
    rect(350, 145, 200, 130, 8);
    rect(350, 50, 10, 110, 8);
    rect(350, 50, 135, 15, 8);
    fill(255, 0, 0, 50);
    rect(360, 65, 130, 80);
}

For this project, I was interested in the purpose of a conveyor belt and how it is able to move a group of objects at a set rate. I used objects to randomize the size and color of gifts that would pass through the conveyor belt. I kept the background graphics to a grayscale to emphasize the gifts that pass through the screen. I found this assignment to be very helpful in understanding how objects work since we had to create our own objects as opposed to being given an object and just using it in the draw function.

initial sketches to implement the conveyor belt