Connor McGaffin – Looking Outwards 11

Seaquence is a musical social experiment from Grey Area Labs, created by Gabriel Dunne, Ryan Alexander, and Daniel Massey. The core interface of Seaquence is appropriately a sequencer, which users can compose short compositional loops with. These compositions are assigned to “organisms” which physically reflect the audio qualities of the music they emit, such as pitch, frequency, and the sostenuto of notes. These organisms congregate in the radius of a central point in their canvas-like “environment”. The more organisms in proximity to another, the more dynamic the music arrangement becomes.

As stated, the algorithms in this project takes proximity, timing, and “drunken walk” progressions into consideration. The nature of organism movement is reminiscent of the responsive “worm” lab from several weeks ago.

I am incredibly drawn to this project, and this Looking Outwards post took me forever to complete because I spent so much time playing with Seaquence.  I think I gravitate towards this piece because of its ability to create such elaborate compositions through such a simple interface. Its ease of use is incredible and empowering.

From these observations, I find it reasonable to assume that the collaborators on this project shared similarly aligning design sensibilities. There is an emphasis on minimalism to achieve complexity. This consideration of both micro and macro levels of interaction make an understanding of intuitive human interaction evident.

the project

grey area labs

Looking Outwards 11 rrandell

https://www.creativeapplications.net/js/prelude-in-acgt-sonification-of-personal-dna-data/

This is a link to the artists work and a clip of his piece ‘Prelude in ACGT’ and below is a photo of his physical manifestation of the work

This Looking outwards is about artist Pierry Jaquillard. I would consider his piece ‘Prelude in ACGT’ sound art and not music, but there certainly is a musical aspect to his work. This piece combines sound and biology in a rather unique way. He examined his own personal DNA and tried to explore it through coding and then make something musical from this exploration. To create sound out of DNA, he coded 5 interfaces that allow certain factors to change. One of the interfaces allows you to access his chromosome library and chose a ‘piece’ of it to play. 3 of the interfaces actually examine the DNA and visualize sound in tandem with his raw DNA. Pierry uses a midi library JavaScript to generate midi signals those signals are then sent into Ableton live to actually generate electronic sounds which is then exported, stored, and translated into sheet music. I am very inspired by his interest and drive to create an intersection with these two fields of interest.

Miranda-Luong-Project-10

sketch

/* Miranda Luong
Section E
mluong@andrew.cmu.edu
Project-10: Generative Landscape
*/
var trees  = [];
var hillSpeed = 0.00005;
var hillDetail = 0.005;

function setup() {
    createCanvas(640, 240); 
    
    // create an initial collection of 30 trees
    for (var i = 0; i < 30; i++){
        //sets random birthplaceX for trees 
        var rx = random(width);
        trees[i] = makeTree(rx);
    }
    frameRate(100);
}


function draw() {
    background(66, 131, 244); 
    //sun
    noStroke();
    fill(225, 145, 90);
    ellipse(width-55, 40, 45, 45);
    drawHill();
    updateAndDisplay();
    removeOutOfView();
    addTrees();

}

function drawHill(){
    noStroke();
    fill('green');
    beginShape();
    vertex(0, height);
    for (var x = 0; x < width; x++){
        var h = (x * hillDetail)+ (millis() * hillSpeed);
        var y = map(noise(h), 0, 1, 0, height);
        vertex(x, y);
    }
    vertex(width,height);
    endShape();
}

function updateAndDisplay(){
    // Update the trees's positions, and display them.
    for (var i = 0; i < trees.length; i++){
        trees[i].move();
        trees[i].display();
    }
}

function removeOutOfView(){
    // If a tree has dropped off the left edge,
    // remove it from the array.  Copy all the buildings
    // we want to keep into a new array.
    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 addTrees() {
    // With a very tiny probability, add a new tree to the end.
    var newTreeLikelihood = 0.007; 
    if (random(0,1) < newTreeLikelihood) {
        trees.push(makeTree(width));
    }
}

// method to update position of tree every frame
function treeMove() {
    this.x += this.speed;
}
    
// draw the tree
function treeDisplay() {
    var totalBushHeight = this.nBush * this.bushHeight
    noStroke(); 
    push();
    translate(this.x, height-100);
    for (var i = this.nBush; i > 1; i = i - 1) {
        fill(14, 100-(i*5), 39); 
        triangle(0, i * this.bushHeight, this.breadth, i * this.bushHeight, this.breadth/2, (i-1)*(this.bushHeight-5));
        }
    fill('brown');
    rect(this.breadth / 4 + 2.5,totalBushHeight,5,8)
    pop();
}

function makeTree(birthLocationX) {
    var tree = {x: birthLocationX,
                breadth: 20,
                speed: -1.0,
                nBush: round(random(2,5)),
                move: treeMove,
                display: treeDisplay,
                bushHeight: 10}
    return tree;
}

This was a really challenging exercise. Sadly, there was a lot I wanted to do but just couldn’t seem to figure out. Ideally, the shape of the hills would’ve matched the position of the trees but because the X placement of the trees from the beginning was random, I couldn’t create a linkage by chronological order of birth (a for loop would’ve been great for that).
I think I definitely have a better understanding of objects and creating generative landscape images, a far cry from past projects generative art.

Original Sketch

Alessandra Fleck – Project 10

sketch

//Name: Alessandra Fleck 
//Class Section : B
//Email: afleck@andrew.cmu.edu
//Project-10


var cake = [];


function setup() {
    createCanvas(480, 480); 
    
    // the initial collection of cake
    for (var i = 0; i < 10; i++){ //automatically counts up
        var rx = random(width);
        cake[i] = makeCake(rx);
    }
    frameRate(100);
}


function draw() {
    background(80,177,198); 
    
    
    displayHorizon();

    updateAndDisplayCake();
    removeCakeThatHaveSlippedOutOfView();
    addNewCakeRandomly(); 

    //bottom table
    fill(225,229,194);
    stroke(0);
    strokeWeight(3);
    rect(0,430,480,100);

    //bear eating cake
    //bear head
    fill(225,229,194);
    stroke(0);
    noStroke();
    ellipse(50,350,150,150);
    //bear ear
    fill(225,229,194);
    ellipse(30,260,50,80);
    //bear cheek
    fill(225,200,190);
    ellipse(30,350,50,50);
    //bear mouth
    fill(80,177,198);
    ellipse(100,380,60,50);
    //bear eye
    fill(0);
    ellipse(80,330,30,30);
    fill(255);
    ellipse(80,320,10,10);
    //bear nose
    fill('red');
    ellipse(120,340,20,20);
    //bear hand
    fill(225,229,194);
    
    ellipse(50,430,80,20);
    

}


function updateAndDisplayCake(){
    // Update the cake's positions, and display them.
    for (var i = 0; i < cake.length; i++){
        cake[i].move();
        cake[i].display();
    }
}


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


function addNewCakeRandomly() {
    // With a small margin of probability, add another cake
    var newCakeLikelihood = 0.010; 
    if (random(0,1) < newCakeLikelihood) {
        cake.push(makeCake(width));
    }
}



function cakeMove() {
	// update cake position
    this.x += this.speed;
}
    

// draw cake
function cakeDisplay() {
    var cakeHeight = 40;
    fill(255); 
    noStroke(); 
    push();
    translate(this.x, height - 40);

    //cake bottom
    fill(197,174,135);
    rect(40,-cakeHeight,50,30);

    //cake middle
    fill(220,157,155);
    rect(40,-cakeHeight -50,50,60);
    //cake middle
    fill(220,157,155);
    rect(40,-cakeHeight -50,50,60);

    //cake top
    fill(197,174,135);
    rect(40,cakeHeight-150, 50,60);

    //cake frosting
    fill(250);
    rect(40,cakeHeight-150, 50,10);
    
 

  
    pop();
}


function makeCake(birthLocationX) {
    var cake = {x: birthLocationX,
                breadth: 10,
                speed: -0.5,
                move: cakeMove,
                display: cakeDisplay}
    return cake;
}


function displayHorizon(){
    stroke(0);
    line (0,height-50, width, height-50); 
}

For this assignment I just wanted to do a conveyor belt with a bear eating cake that came at different lengths.

As seen in the sketch below, I wasn’t able to add toppings to the cake or get the cake to disappear as it entered the bear’s mouth. If I were to go back and edit the script, I would make it so that the vanishing point is set at the bear’s mouth and not the edge of the canvas.

looking outwards 10

http://www.tinafrank.net/webdesign/wirel/

For this looking outwards I decided to look into Tina Frank. Her body of work is largely data visualization projects, but for this looking outwards I will specifically talk about her online interactive data visualization piece called “The Changing Religious Landscape of Vienna”. This piece was sponsored by WIREL and made in 2013 as a collaboration with Ramon Bauer. Frank designed all the graphics and such for this project. The data was gathered on looking at religious diversity in Vienna and its changes over the years. The project also attempts to tackle age diversity, sex diversity, and more and combine them to properly examine how certain religious populations may be changing. The design interface is very user friendly, all the data can shift when moving your mouse around the interactive piece. The interface is also very easy to understand, and although based on Vienna–– this same technique could be applied with many other data sets and still be applicable. Tina Frank’s other work is graphic design and data viz, as well as some audiovisual art videos.

Connor McGaffin – Project 10

sketch

/*
Connor McGaffin
Section C
cmcgaffi@andrew.cmu.edu
Project-10
*/

var poppies = [];

var terrainSpeed = 0.00001;
var d = 0.0004;
var d2 = 0.0006;

function setup() {
    createCanvas(480, 240); 
    // create an initial collection of poppies
    for (var i = 0; i < 100; i++){
        var rx = random(width);
        poppies[i] = makeFlower(rx);
    }
    frameRate(10);
}

function draw() {
    background(180, 180, 0); 
    noStroke();
    
    sunset();
    //mtn
    displayRocks();

    emeraldCity();
    
    //adjust 
    translate(0, 30);
    displayGrass();

    //poppies behind road
    push();
    translate(0, -40);
    updateAndDisplaypoppies();
    pop();

    //yellow brick road
    ybr();

    //poppies in front of road
    updateAndDisplaypoppies();
    removepoppiesThatHaveSlippedOutOfView();
    addNewpoppiesWithSomeRandomProbability(); 
}

function sunset(){
    //orange 1
    push();
        fill(190, 150, 0);
        rect(0, 50, width, height);
    pop();
    //orange 2
    push();
        fill(200, 130, 0);
        rect(0, 120, width, height);
    pop();
}

function ybr(){
    fill(200,200,0);
    rect(0,180, width, 20);
}

//draw emerald city
function emeraldCity() {
    //halo adjustment
    var scaleFactor = 1.2;
    push();
        //adjustment
        translate(300, -25)
        //halo
        push();
            stroke('rgba(235, 255, 120, 0.4)');
            strokeWeight(3);
            noFill();
            ellipse(125, 100, 110 * scaleFactor);
            strokeWeight(1);
            ellipse(125, 100, 95 * scaleFactor);
            ellipse(125, 100, 50 * scaleFactor);
        pop();
        //city towers
        push();
            //shimmer type 1
            fill(20, random(160,170), 0);
            rect(100, 80, 15, height, 20);
            rect(115, 90, 15, height, 20);
            rect(125, 75, 15, height, 20);
            rect(145, 100, 15, height, 20);
            //shimmer type 2
            fill(20, random(170,180), 0);
            rect(90, 100 , 15, height, 20);
            rect(110, 120 , 15, height, 20);
            rect(130, 90, 15, height, 20);
            rect(150, 130, 15, height, 20);
            //shimmer type 3
            fill(20, random(180,190), 0);
            rect(80, 180, 15, height, 20);
            rect(100, 140, 15, height, 20);
            rect(125, 120 , 15, height, 20);
            rect(145, 150, 15, height, 20);
        pop();
    pop();
}

function updateAndDisplaypoppies(){
    // Update the poppy positions, and display them.
    for (var i = 0; i < poppies.length; i++){
        poppies[i].move();
        poppies[i].display();
    }
}

function removepoppiesThatHaveSlippedOutOfView(){
    // If a poppy has dropped off the left edge,
    // remove it from the array. 
    var poppiesToKeep = [];
    for (var i = 0; i < poppies.length; i++){
        if (poppies[i].x + poppies[i].breadth > 0) {
            poppiesToKeep.push(poppies[i]);
        }
    }
    poppies = poppiesToKeep; // remember surviving poppies
}
function addNewpoppiesWithSomeRandomProbability() {
    // probability of adding a new poppy to the end.
    var newTreeLikelihood = 0.3; 
    if (random(0,1) < newTreeLikelihood) {
        poppies.push(makeFlower(width));
    }
}

// poppy moves every frame
function poppyMove() {
    this.x += this.speed;
}
    
// draw the poppy
function poppyDisplay() {
    var leafDistance = 20;
    var bHeight = this.nGrowth * leafDistance; 
    push();
        translate(this.x, height - this.closeness);
        var distFactor = 4 / this.closeness;
        //stem
        push();
            strokeWeight(25 * distFactor * .6);
            stroke(30, 130, 0);
            line(0, -bHeight * .2, 0, 0);
        pop();
        //flower
        push();
            noStroke();
            fill(200,0,0);
            ellipse(0, -bHeight * .2, 90 * distFactor * .6);
            fill(0);
            ellipse(0, -bHeight * .2, 90 * distFactor * .2);
        pop();
    pop();
}


function makeFlower(birthLocationX) {
    var poppy = {x: birthLocationX,
                breadth: 50,
                speed: -1.0,
                nGrowth: round(random(2,8)),
                closeness: random(20,40),
                move: poppyMove,
                display: poppyDisplay}
    return poppy;
}


function displayGrass() {
//grass
    push();
    fill(0, 90, 0); 
    beginShape(); 
    for (var x = 0; x < width; x++) {
        var t = (x * d) + (millis() * terrainSpeed);
        var y = map(noise(t), 0,1, 145, 190);
        vertex(x, y - 20);
        vertex(0, height);
        vertex(width, height); 
    }
    endShape();
    pop();
}

//rocks behind emerald city
function displayRocks() {
    push();
    fill(90, 90, 60); 
    beginShape(); 
    for (var x = 0; x < width; x++) {
        var t = (x * d2) + (millis() * terrainSpeed);
        var y = map(noise(t * 3), 0, 1, 160, 190);
        vertex(x, y - 20);
        vertex(0, height);
        vertex(width, height); 
    }
    endShape();
    pop();
}





I started my exploration process by brainstorming which landscape I would like to create. I had a running theme of plants going on as the objects in my array. I started with what I was most familiar with, and sketched out an idea where flowers would be generated at the eye level of a squirrel. Expanding on this, I sketched a quick layout of scrolling plants that I am not familiar with, being in the context of a jungle canopy. And finally, I pushed into a setting that doesn’t even exist with the sketch of the poppies leading up to the Emerald City from The Wizard of Oz.

I ended up going with the Wizard of Oz theme, as it excited me most. In the story, surrounding the shimmering Emerald City, the four protagonists encounter a field of poppies, which push Dorothy into a slumber. I designed this code to provide a panning view of the setting where this plot event happened, as if it were cinematically setting the scene.

Elena Deng Project 10-Generative Landscape

Who lives in a pineapple under the sea

/*Elena Deng
Section E
  edeng1@andrew.cmu.edu
  Project-10
}
*/
var Pineapples = [];
var col;
var frameB = 1;
var bubbles= [];


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

    // create an initial collection of Pineapples
    for (var i = 0; i < 10; i++){
        var rx = random(width);
        Pineapples[i] = makePineapple(rx);
    }
    for (var i = 0; i < 20; i++) {
    	var newBub = makeBubbles(random(width));
    	bubbles.push(newBub);
    }
    frameRate(38);
}


function draw() {

    background(243,233,126);
    displayHorizon();
    waveOne();
    waveTwo();
    waveFour();
    waveThree();

    updateAndDisplayPineapples();
    removePineapplesThatHaveSlippedOutOfView();
    addNewPineapplesWithSomeRandomProbability();
    for (var i = 0; i < bubbles.length; i++) {
		bubbles[i].draw();
		bubbles[i].move();

//adds the new bubbles
    if ((frameB % 5 == 0) & (random(1) < .2)) {
		newBub = makeBubbles(width);
		bubbles.push(newBub);

	}
	}
}

function waveOne(){
  var waterSpeed = 0.0002;
  var waterDetail = 0.004;
  stroke(100,200,254);
  beginShape();
  for (var x = 0; x < width; x++) {
      var t = (x * waterDetail/4) + (millis() * waterSpeed*2);
      var y = map(noise(t), 0, 1, 0, 100);
      line(x, y, x, height);
  }
  endShape();
}


function waveTwo(){
  var waterSpeed = 0.0002;
  var waterDetail = 0.004;
  stroke(20,100,254,70);
  push();

  beginShape();
  for (var x = 0; x < width; x++) {
      var t = (x * waterDetail) + (millis() * waterSpeed*2);
      var y = map(noise(t), 0, 1, 100, 140);
      line(x, y, x, height);
  }
  endShape();
  pop();
}
function waveFour(){
  var waterSpeed = 0.0002;
  var waterDetail = 0.004;
  stroke(20,100,254,70);
  push();
  beginShape();
  for (var x = 0; x < width; x++) {
      var t = (x * waterDetail/6) + (millis() * waterSpeed*2);
      var y = map(noise(t), 0, 1, 100, 300);
      line(x, y, x, height+400);
  }
  endShape();
  pop();
}

function waveThree(){
  var waterSpeed = 0.0002;
  var waterDetail = 0.004;
  stroke(198,186,146);
  push();
  beginShape();
  for (var x = 0; x < width; x++) {
      var t = (x * waterDetail/6) + (millis() * waterSpeed/6);
      var y = map(noise(t), 0, 1, 200, 300);
      line(x, y+160, x, height+150);
  }
  endShape();
  pop();
}

function updateAndDisplayPineapples(){
    // Update the Pineapple's positions, and display them.
    for (var i = 0; i < Pineapples.length; i++){
        Pineapples[i].move();
        Pineapples[i].display();
    }
}

function makeBubbles(origin) {
	var bubble = {
		x: origin,
		y: random(height),
		velX: random(-2, 1.5),
		velY: random(-3, 1),
		sizeF: random(20),
		draw: drawBubble,
		move: moveBubble
	}
	return bubble;
}

function removePineapplesThatHaveSlippedOutOfView(){
    // If a Pineapple has dropped off the left edge,
    // remove it from the array.  This is quite Cutcky, but
    // we've seen something like this before with particles.
    // The easy part is scanning the array to find Pineapples
    // to remove. The Cutcky part is if we remove them
    // immediately, we'll alter the array, and our plan to
    // step through each item in the array might not work.
    //     Our solution is to just copy all the Pineapples
    // we want to keep into a new array.
    var PineapplesToKeep = [];
    for (var i = 0; i < Pineapples.length; i++){
        if (Pineapples[i].x + Pineapples[i].breadth > 0) {
            PineapplesToKeep.push(Pineapples[i]);
        }
    }
    Pineapples = PineapplesToKeep; // remember the surviving Pineapples
}


function addNewPineapplesWithSomeRandomProbability() {
    // With a very tiny probability, add a new Pineapple to the end.
    var newPineappleLikelihood = 0.01;
    if (random(0,1) < newPineappleLikelihood) {
        Pineapples.push(makePineapple(width));
    }
}
//draws the bubbles that appear at beginning
function drawBubble() {
  noFill();
  strokeWeight(2);
	stroke(255, 255, 255, 80);
	ellipse(this.x, this.y, this.sizeF * 1.5, this.sizeF * 1.5);
}

function moveBubble() {
	this.x -= 1.5;
	this.x += this.velX;
	this.y += this.velY;
}


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


// draw the Pineapple decorations door and leaves
function PineappleDisplay() {

    var CutHeight = 20;
    var bHeight = this.nCuts * 20;
    // var bWidth = this.nCuts * 30;

    push();

    noStroke();
    //draws leaves of Pineapple
    fill(155,182,59);
    translate(this.x, height - 40);
    rect(10,-bHeight-20,this.breadth/2,bHeight,30);
    rect(30,-bHeight-20,this.breadth/2,bHeight,30);

    fill(122,167,59);
    rect(40,-bHeight-30,this.breadth/4,bHeight);

    fill(122,167,59);
    rect(20,-bHeight-30,this.breadth/2,bHeight,30);

    fill(122,167,59);
    rect(40,-bHeight-50,this.breadth/4,bHeight,20);

    fill(88,150,59);
    rect(10,-bHeight-40,this.breadth/4,bHeight);

    fill(88,150,59);
    rect(15,-bHeight-50,this.breadth/4,bHeight,10);

    fill(61,150,59);
    rect(30,-bHeight-60,this.breadth/4,bHeight);

    //draws the actual pineapple
    fill(255,196,74);
    stroke(230,170,50);
    strokeWeight(2);
    rect(0,-bHeight, this.breadth+15,bHeight,40);

    //draw the decorations of the pineapple/grooves
    noStroke();
    fill(230,170,50);
      ellipse(18,-20,10,10);
      ellipse(33,-20,10,10);
      ellipse(48,-20,10,10);
      ellipse(33,-40,10,10);
      ellipse(18,-40,10,10);
      ellipse(48,-40,10,10);
      ellipse(33,-60,10,10);
      ellipse(18,-60,10,10);
      ellipse(48,-60,10,10);
    //draws the door of the pineapple
    fill(0)
      rect(20,-bHeight/2, 20,40,20)

    pop();

}


function makePineapple(LocationX) {
    var pin = {x: LocationX,
                breadth: 50,
                speed: -1.0,
                nCuts: round(random(4,7)),
                move: PineappleMove,
                display: PineappleDisplay}
    return pin;
}

function displayHorizon(){
  function setup() {
}

}

I had a lot of fun with this project! I really loved Spongebob as a child and I was really excited to have a reason to do this subject because of the wavelike forms the the terrain tool given to us creates. If I had more time I would make the pineapple details look more like pineapples and maybe include a random sponge bob around!

Experimented in the beginning with Shrek heads and Pineapples

Looking Outwards 10- Jaclyn Saik

 

Heather Dewey-Hagborg is a self described “transdisciplinary artist and educator”: basically, she’s doing a lot. I was drawn to her because she is interested in using art as research, something I really don’t hear that much about since most of the time people separate these two worlds. She is most well known for “biopolitical art”, where she will use biological research to inform her practice or activist art. Dewey-Haborg is well-known for controversial projects where she uses found human DNA and her own algorithms to create sculptures and figures.

One project of hers that stood out to me is called “DNA Spoofing”. I picked it because I don’t think I’ve seen many people make jokes out of human DNA before, so this was intriguing. She takes a “playful” approach to genetic surveillance by discussing the different ways that humans shed their genetic material in public, and the ways in which is could possibly be harvested and used. She created an entire exhibit (which was shown in a lot of museums across the US and Europe) that includes a video example of how human’s shed DNA, as well as a display of the daily common objects that facilitate this.
I love this work because it sits at the intersection between science and art, particularly biology, which I’ve always been interested in. I also like how she is identifying the ways in which we accidentally volunteer our own genetic information to strangers, something I’ve never really thought about before and makes me a little uncomfortable (I think good art should do that). From a technology standpoint, this project is interesting because it’s talking about something she herself does as an artist/researcher.

The exhibit on display at the Ohio Museum of Contemporary Art, where users can interact with these objects while viewing the video.
The actresses in the video, posed in front of the everyday objects they then demonstrate with

Hannah Cai—Looking Outwards—10


Stranger Visions

I chose the project “Stranger Visions” by Heather Dewey-Hagborg. I was drawn to, and impressed by, the fact that she created her own software to generate digital “portraits” of strangers based on their DNA (which she collected by picking up random pieces of gum, hair, etc from streets). She started this controversial project in 2012 as a means to call attention to “the developing technology of forensic DNA phenotyping, the potential for a culture of biological surveillance, and the impulse towards genetic determinism.” These predictions came true two years later, when police and crime investigators started analyzing DNA as a part of trying to determine the culprits of crimes.

Heather received a PhD in Electronic Arts from Rensselaer Polytechnic Institute, and in her bio states that she is “interested in art as research and critical practice,” which I find very interesting as a design student. Art is normally seen as very different from design; as purely aesthetic and usually meaningless (in terms of real-world application). Heather turns that notion on its head. I would call her a researcher and data visualizer, and not an artist; but I still find her practical approach to art interesting and admirable.

Jenna Kim (Jeeyoon Kim) – Project 10 – Landscape

jeeyoonk10

/* Jenna Kim (Jeeyoon Kim)
Section E
jeeyoonk@andrew.cmu.edu
Project 10
*/

var hillSpeed = 0.00055;
var hillDetail = 0.0055;
var yN = 50;
var trees = [];

var x = [];
var y = [];

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

    for (i = 0; i < 100; i++){ //setting for stars placement
        x[i] = random(50, width);
        y[i] = random(50, width / 2);
    }
    //trees
    for (var j = 0; j < 15; j++){
        var rx = random(width);
        trees[j] = makeTree(rx);
    }
    frameRate(10);
}


function draw(){
    background(24, 44, 63);
    var S = second();
     for(i = 0; i < S; i++){ //tiny firefly appears every "SEC"
        fill(255);
        noStroke();
        ellipse(x[i], y[i], 3, 3);
    }
    hill();
    wave();
    updateAndDisplayTrees();
    noStroke();
    ellipse(width-55, 40, 45, 45); //pink moon
}

function star() {
    for(i = 0; i < S; i++){ //star appears every "SEC"
        fill(247, 246, 146);
        noStroke();
        ellipse(x[i], y[i], 4, 4);
    }
}
//drawing hill
function hill() {
    stroke(49, 110, 167);
    beginShape(); 
    for (var x = 0; x < width; x++) {
        var t = (x * hillDetail) + (millis() * hillSpeed);
        var y = map(noise(t), 0,1, 30, height-35);
        //vertex(x, y); 
        line(x, y, x, height);
    }
    noStroke(); //ground
    fill(136, 143, 208);
    rect(0, 380, width, 20)
    endShape();
} 

function wave(){ //drawing waves
    beginShape();
    fill(221, 153, 205);
    var xN = yN;
    for (var x = 0; x <= width; x += 10){
        var y = map(noise(xN, yN), 0, 1, 200, 400);
        //setting the vertex
        vertex(x, y - 0.005); //x dimension
        xN += 0.05;
    }
    yN += 0.055; //y dimension
    vertex(width, height - 20);
    vertex(0, height - 20);
    endShape();

}

// DISPLAYING TREES
function updateAndDisplayTrees(){
    for (var j = 0; j < trees.length; j++){
        trees[j].move();
        trees[j].display();
    }
}

// Trees are removed when hitting the edge
function RTrees(){
    var TreesToKeep = [];
    for (var i = 0; i < trees.length; i++){
        if (trees[i].x + trees[i].breadth > 0) {
            keepTrees.push(trees[i]);
        }
    }
    trees = TreesToKeep;
}

// adding tree to the end
function addrandomTreeswithProbability() {
    var newTreesLikelihood = 0.05;
    if (random(0,4) < newTreesLikelihood) {
        trees.push(makeTree(width));
    }
}

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

// drawing the trees
function treeDisplay() {
    var floorHeight = 5;
    var bHeight = this.nFloors * floorHeight * 2;
    noStroke();
    //drawing tree trunks
    push();
    translate(this.x, height - 20);
    fill(24, 44, 63);
    rect(3, -bHeight, this.breadth, bHeight);
    // drawing top part of the tree
    fill(105, 247, 193);
    ellipse(3, -bHeight, bHeight / 2, bHeight / 2);
    pop();
}


function makeTree(birthLocationX) {
    var TRR = {x: birthLocationX,
             breadth: 1,
             speed: -0.5,
             nFloors: round(random(2,4)),
             move: treeMove,
             display: treeDisplay}
    return TRR;
}

For this project, I had fun making this animation, but at the same time, it was very difficult to figure out how to place the trees and try different variations for the mountains. I tried to make this very aesthetic and attractive by thinking a lot about good color combination. I added stars so that they appear every second. The final result is close to what I wanted, and I want to develop it further in the future.

sketch