amui1-LookingOutwards-10

This week, I chose to do my Looking Outwards of Chloe Varelidi. Her portfolio can be found here.

Chloe Varelidi is a game designer that focuses on building playful products to encourage children to “be creative, kind, and curious about the world behind them” (quote from Chloe’s portfolio). She received her Masters in Fine Arts at Parsons’ Design and Technology Program and has since worked at Quest to Learn, Institute of Play, Mozilla, and now littleBits.

I specifically admire her projects for littleBits, codekit and a minicade. that I find particularly interesting. At littleBits, she works as a senior product design strategist. The codeKit is a small introduction kit of magnets and electrical items that create an interactive activity that teaches coding. The minicade is an open source mobile web application that encourages children to make short (40 line) games with their friends. This project aims to also teach coding but in an interactive and “silly” way.

Caption: Chloe says in the future, she hopes that the minicade can become a pop-up structure at any city corner, like the one in the picture above.

 

 

amui1-Project-10-Landscape

amui1-p10

//Allison Mui
//15-104 Section A
//amui1@andrew.cmu.edu
//Project-10
//

//variables for image
var starImg = "https://i.imgur.com/0ns3TvE.png";
var monsterImg = "https://i.imgur.com/hqvDkxx.png";
var star;
var monster;
//variables for star positions
var sx = [];
var sy = [];
//variables for objects
var met = [];
var monst = [];
//variable for points
var counter = 0;


//loads images
function preload() {
  star = loadImage(starImg);
  monster = loadImage(monsterImg);
}


function setup(){
  createCanvas(480,380);
  //intializes meteor by calling make meteor. stores them in meteor array
  for (num = 0; num < 4; num++) {
    var ogX = random(width/2+width/4,width);

    met[num] = makeMet(ogX);

  }
  //intializes monster by calling make monster
  monst[0] = makeMonster();

  //creates random x and y locations for star
  for (s = 0; s < 15; s++) {
    sx.push(random(width));
    sy.push(random(height));
  }

  //loads star picture
  star.loadPixels();

}

function draw(){
  background(6,13,29);
  //shows picture of star in random x and y locations
  for (st = 0; st < 15; st++) {
    image(star,sx[st],sy[st]);
  }

  //displays meteor
  showMet();

  //constrains so space ship won't go off of screen
  var y = constrain(mouseY,45/2,height-38/2);
  var x = 80;
  //space ship
  fill(106,139,189);
  arc(x,y,45,45, PI, 0);
  fill(253,194,74);
  ellipse(x,y+6,50,25);
  ellipse(x,y+4,80,15);
  fill(68,110,172);
  ellipse(x,y,80,15);

  //displays monster
  showMonster();
  //keep tracks of points
  fill(255);
  text("Points:" + counter, 15, 20);
  text("Avoid the meteors!", width/2-50, 20);

}


function showMet() {
  //displays and moves all meteors in meteor array
  for (var i = 0; i < met.length; i++) {
      met[i].move();
      met[i].draw();

  }
}

function showMonster() {
  //displays and moves monster
  monst[0].move();
  monst[0].draw();
}




function drawMet() {
  //overall meteor
  var metSize = this.metSize;


  fill(146,164,174);
  noStroke();
  //meteor body
  ellipse(this.x,this.y,metSize,metSize);
  fill(75,99,107);
  //meteor blimps
  ellipse(this.x - 16, this.y, metSize/8,metSize/8);
  ellipse(this.x, this.y+17, metSize/8,metSize/8);
  ellipse(this.x + 8, this.y - 10, metSize/4, metSize/4);
  ellipse(this.x + 10, this.y + 10, metSize/10, metSize/10);

  //flames behind
  fill(247,223,61);
  rect(this.x+metSize/2+5, this.y-18,this.metSize+10,5,5);
  fill(243,161,28);
  rect(this.x+metSize/2+5,this.y-10,this.metSize+10-10,5,5);
  fill(247,223,61);
  rect(this.x+metSize/2+5, this.y-2, this.metSize+10-20,5,5);
  fill(243,161,28);
  rect(this.x+metSize/2+5,this.y+5,this.metSize+10,5,5);

}

function moveMet() {
  //moves meteor by speed
  this.x += this.speed;
  //moves meteor by meteor object speed
  if (this.x < -this.metSize/2-(this.metSize+10)) {
    //if meteor slips of successfully, increase point
    counter += 1;
    this.x = width+this.metSize/2;
    this.y = random(30,height-25);
  }
}

function makeMet(ogX) {
  //based off of provided code
  //creates meteor object
  meteor = {x: ogX,
            y: random(30,height-25),
            speed: random(-4,-1),
            move: moveMet,
            metSize: int(random(40,80)),
            draw: drawMet}
  return meteor;
}

function drawMonster() {
  //displays monster picture
  image(monster,monty.x,monty.y);
  monster.loadPixels();
}

function moveMonster() {
  //moves monster by monster object speed
  monty.x += monty.speed;
  //if off screen, re start monster
  if (monty.x < -monty.x-200) {
    monty.x = width+1500;
    monty.y = random(30,height-100);
  }
}

function makeMonster() {
  //makes monster object
  monty = {x: width,
             y: random(30,height-100),
             speed: random(-2,-0.5),
             move: moveMonster,
             draw: drawMonster}
  return monty;
}

I enjoyed this project more than the past projects. It had a lot of room for creativity. I first started off by sketching my idea and then went off to coding. For future improvements for this, with more time, I would find a way to incorporate shooting something when the mouse is clicked and if the shot x position reached the meteor or monster, then the monster would disappear. I would also try to find a way to decrease the points if the mouseY was in the same position as a meteor. All in all, I enjoyed this project and am happy with my final result.

Caption: Above is my first sketch of what I wanted the canvas to look like.

Caption: Above is my ugly monster. I drew it Illustrator and then loaded it onto imgur.

 

**edited b/c star image got removed from Imgur.

heeseoc-Project-10-Landscape

sketch

//Steph Chun
//15-104 section #A
//heeseoc@andrew.cmu.edu
//Project-10

var buildings = [];
var terrainSpeed = 0.0005;
var terrainDetail = 0.008;
var c1, c2;
var lc1, lc2, lc3, lc4;

function setup() {
    createCanvas(480, 480); 
    //background gradient color
    c1 = color(60,1,29);
  	c2 = color(205,100,70);
  	//gradient color for reflected streetlight
  	lc1 = color(255,230,109,30);
  	lc2 = color(255,230,109,0);
  	//gradient color for reflected buildings
    lc3 = color(random(180,200), random(100,150), random(100,150), 50);
  	lc4 = color(random(180,200), random(100,150), random(100,150), 0);

    for (var i = 0; i < 10; i++){
        var rx = random(width);
        buildings[i] = makeBuilding(rx);
    }
    frameRate(20);
}

function draw() {
    setGradient(0, 0, width, height/2+50, c1, c2, 1);
    updateBuildings();
    removeBuildings();
    addBuildings(); 
    makeBushes();
    riverDisplay();
}

//gradient for the background(sky)
function setGradient(x, y, w, h, c1, c2, axis) {
  noFill();
    for (var i = y; i <= y+h; i++) {
      var inter = map(i, y, y+h, 0, 1);
      var c = lerpColor(c1, c2, inter);
      stroke(c);
      line(x, i, x+w, i);
    } 
}

//
function updateBuildings(){
    for (var i = 0; i < buildings.length; i++){
        buildings[i].move();
        buildings[i].display();
    }
}

//remove buildings when they're out of frame
function removeBuildings(){
    var buildingsToKeep = [];
    for (var i = 0; i < buildings.length; i++){
        if (buildings[i].x + buildings[i].breadth > 0) {
            buildingsToKeep.push(buildings[i]);
        }
    }
    buildings = buildingsToKeep;
}

//introduce new buildings
function addBuildings() {
    var newBuilding = 0.008; 
    if (random(0,1) < newBuilding) {
        buildings.push(makeBuilding(width));
    }
}

//move the buildings
function buildingMove() {
    this.x += this.speed;
}

//draw multiple buildings
function buildingDisplay() {
    var floorHeight = 20;
    var bHeight = this.nFloors * floorHeight; 
    push();
    noStroke();
    fill(this.bColor); 
    translate(this.x, height - 190);
    rect(0, -bHeight, this.breadth, bHeight);
    stroke(200); 
    for (var y = 0; y < this.nFloors; y++) {
    	for (var x = 0; x < 6; x++){
    		noStroke();
    		fill(random(165,255), random(180,255), random(200,220));
    		rect(x*10+8, -10-(y*floorHeight), 4, 7);
    	}
	}
    pop();
}

//determine the shape and movement of the building
function makeBuilding(birthLocationX) {
    var bldg = {x: birthLocationX,
                breadth: 70,
                speed: -1.2,
                bColor: color(random(180,200), random(100,150), random(100,150)),
                nFloors: round(random(3,10)),
                move: buildingMove,
                display: buildingDisplay}
    return bldg;
}

//make bushes
function makeBushes(){
    noStroke(); 

    //the farthest bush
    beginShape();
    for (var x = 0; x < width; x++) {
    	fill(93,15,11);
        var t = (terrainDetail * x) + (millis() * terrainSpeed);
        var y = map(noise(t*2), -.5, 1, 370, height/2-30);
        curveVertex(x, y); 
    }
    curveVertex(width, height);
    curveVertex(0,width);
    endShape(CLOSE); 

    //second to the front 
    beginShape();
	for (var x = 0; x < width; x++) {
        fill(61,0,4);
        var t2 = (terrainDetail * x) + (millis() * terrainSpeed);
        var y2 = map(noise(t2*2), -.5, 1, 390, height/2-30);
        curveVertex(x, y2); 
    }
    curveVertex(width, height);
    curveVertex(0,width);
    endShape(CLOSE);   

    //closest(darkest) bush
    beginShape();
	for (var x = 0; x < width; x++) {
        fill(31,7,6);
        var t3 = (terrainDetail * x) + (millis() * terrainSpeed);
        var y3 = map(noise(t3*2), -.7, 1.1, 420, height/2-10);
        curveVertex(x, y3); 
    }
    curveVertex(width, height);
    curveVertex(0,width);
    endShape(CLOSE); 
}

function riverDisplay(){

	//river and road
    fill(31,4,9);
    rect(0, height/2+50, width, height/2+50); 
    fill(120,6,41);
    rect(0, height/2+50, width, 5);
    fill(161,12,44);
    rect(0, height/2+53, width, 2);

    for (var s = 0; s < width; s++) {

    	//streetlight
    	strokeWeight(1.3);
    	stroke(255,216,205);
    	line(s*80-7, height/2+30, s*80+7, height/2+30);
    	stroke(217,136,109);
    	line(s*80, height/2+50, s*80, height/2+30);
    	noStroke();
    	fill(255,246,109,60);
    	quad(s*80-7, height/2+30, s*80+7, height/2+30, s*80+15, height/2+50, s*80-15, height/2+50);
    	
    	//gradient for the reflected streetlights
    	setlGradient(s*80-8, height/2+55, 16, height/2-55, lc1, lc2, 1);
    	setl2Gradient(s*80-15, height/2+55, 30, height/2-55, lc1, lc2, 1);

    	//gradient for the reflected buildings 
    	setl3Gradient(s*30+(random(10,70)), height/2+55, 10, height/2-55, lc3, lc4, 2);
    }

    //road detail
    fill(31,4,9,80);
    rect(0, height/2+53, width, 10); 
 
}

//gradient for the reflected streetlights
function setlGradient(x, y, w, h, lc1, lc2, axis) {
	noFill();
	for (var i = y; i <= y+h; i++) {
	    var inter = map(i, y, y+h, 0, 1);
	    var lc = lerpColor(lc1, lc2, inter);
	    stroke(lc);
	    line(x, i, x+w, i);
    } 
}
function setl2Gradient(x, y, w, h, lc1, lc2, axis) {
	noFill();
	for (var i = y; i <= y+h; i++) {
	    var inter = map(i, y, y+h, 0, 1);
	    var lc = lerpColor(lc1, lc2, inter);
	    stroke(lc);
	    line(x, i, x+w, i);
    } 
}

//gradient for the reflected buildings 
function setl3Gradient(x, y, w, h, lc3, lc4, axis) {
	noFill();
	for (var i = y; i <= y+h; i++) {
	    var inter = map(i, y, y+h, 0, 1);
	    var lc = lerpColor(lc3, lc4, inter);
	    stroke(lc);
	    line(x, i, x+w, i);
    } 
}




I created a cityscape at night, with the lights reflected on the river. I immediately came up with the image when I first read the instructions, and then noticed that the sample code would be super helpful for me to get started on this. I modified the code so that the shapes are visually more pleasing, and played around a lot with gradients to achieve the reflected city on the surface of the water. I wanted to have multiple layers of buildings, but for some reason, my code got broken whenever I tried adding more. So I just settled with varying the colors of the building to be more random.

akluk-SectionA-LookingOutwards-10


For this week’s looking outwards, I have chosen to report on Nova Jiang’s project Landscape Abbreviated. It is a kinematic maze constructed with modular planters with the capability of rotation which forms new paths and routes, while being a beautiful garden.

Image of the project

The parts of the maze is rotated and reconstructs is maze is controlled a computer program that obeys and follows certain mathematical algorithms. This makes the maze dynamic and ever changing, which encourages the audience to appreciate it from different angles and perspectives. I really appreciate that this project combines both natural and mechanical components. Nova Jiang holds a masters at UCLA. She seems to be currently an independent artist who creates projects that encourages the tactile and creative participation of the audience, resulting in structurally open systems in which joy, disorder and improvisation can thrive. Attached below is a link to the project.
Link

yushano_Looking Outwards 10

Website

“We Make the Weather is an interactive breath-controlled installation created for New Cinema program hosted by Eyebeam and The Creator’s Project. Inspired by Hurricane Sandy, it uses seam carving, breath detection, motion capture, and the Unity game engine to explore the human impact on the environment”.
Karolina Sobecka is one of the main designers in this project. This project is teamed up by filmmakers, creative coders, artists, designers and motion graphics specialists to investigate the future of cinematic storytelling in the New Cinema hackathon. In We Make The Weather, the viewer wears a headset with a microphone sensor that monitors his or her breath and tracks its ebb and flow, and level of intensity, then uses this information to controls a virtual figure crossing a never-ending bridge, powering the visuals and sound within the 3D animated landscape.
I think this project is really amazing because it combines narrative and interactive themes together. It blends their idea that human beings are actually influencing and changing the environment no matter what you are doing, even breathing, into the movie-like scene. This project puts audience into a movie scene and let the audience feel and sense the effects that they can impose to the environment. The project idea is really amazing and meaningful. Also, the technology that they use are very broad. They use 3D animation tool, virtual reality technologies and so on to create the interactive scene. Such installation with both narrative and interactive theme should be more widely spread.

akluk-Project-10-Generative Landscape

Initially, I was going to make a generative landscape based on microscopic creatures. Such as what you would see under a microscope. However I later decided to go one layer more, and tried to portray the subatomic environment. For this project, I wanted to create a subatomic generative landscape. So the basis of in the subatomic environment, is the atom. And I had to decide how to create differing forms of atoms. Then I realized that atoms with different sizes also create different elements. I created 3 types of possible moving objects which are different sized atoms, with electrons wizzing around them. Below attached are some of my sketches.

Sketches for atoms

sketch

//Alvin Luk
//Section A
//akluk@andrew.cmu.edu
//Project 10

var atoms = [];


function setup() {
    createCanvas(480, 480); 
    
    // create an initial collection of buildings
    for (var i = 0; i < 10; i++){
        var rx = random(width);
        atoms[i] = makeAtom(rx);
    }
    frameRate(20);
}


function draw() {
    background(0); 
    
    push();
    
    stroke(0);
    fill(0); 
    rect(0,0, width, height);
    
    displayStatusString();

    updateAndDisplayAtoms();
    removeAtomsThatHaveSlippedOutOfView();
    addNewAtomsWithSomeRandomProbability(); 
    pop();
}


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


function removeAtomsThatHaveSlippedOutOfView(){
    // If a building has dropped off the left edge,
    // remove it from the array.  This is quite tricky, but
    // we've seen something like this before with particles.
    // The easy part is scanning the array to find buildings
    // to remove. The tricky 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 buildings
    // we want to keep into a new array.
    var atomsToKeep = [];
    for (var i = 0; i < atoms.length; i++){
        if (atoms[i].x + atoms[i].breadth > 0) {
            atomsToKeep.push(atoms[i]);
        }
    }
    atoms = atomsToKeep; // remember the surviving buildings
}


function addNewAtomsWithSomeRandomProbability() {
    // With a very tiny probability, add a new building to the end.
    var newAtomLikelihood = 0.02; 
    if (random(0,1) < newAtomLikelihood) {
        atoms.push(makeAtom(width));
    }
}


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

// draw the building and some windows
function objectDisplay() {
    var floorHeight = 20;
    var particle_size = 20;
    var bHeight = this.nFloors * floorHeight; 
    fill(120); 
    noStroke(0); 
    push();
    translate(this.x, this.y);
    stroke(0);
    if (this.breadth == 1){
    	fill(color(255,0,0));
    	ellipse(0, 0, particle_size, particle_size);
    	fill(color(0,0,255));
    	ellipse(particle_size/4, particle_size/4 , particle_size, particle_size);
    }
    else if (this.breadth == 2){
    	fill(color(255,0,0));
    	ellipse(-particle_size/4, -particle_size/4, particle_size, particle_size);
    	fill(color(0,0,255));
    	ellipse(particle_size/4, -particle_size/4 , particle_size, particle_size);
    	fill(color(255,0,0));
    	ellipse(-particle_size/4, particle_size/4, particle_size, particle_size);
    	fill(color(0,0,255));
    	ellipse(particle_size/4, particle_size/4 , particle_size, particle_size);
    }
    else{
    	fill(color(255,0,0));
    	ellipse(-particle_size/3, particle_size/3, particle_size, particle_size);
    	fill(color(0,0,255));
    	ellipse(0, -particle_size/3 , particle_size, particle_size);
    	ellipse(particle_size/3, particle_size/3, particle_size, particle_size);
    }

    noStroke();
    fill(color(180,180,40));
    for (var i = 0; i < this.nFloors; i++) {
        ellipse(random(-particle_size,particle_size), random(-particle_size,particle_size), 5, 5);
    }
    pop();
}


function makeAtom(birthLocationX) {
    var bldg = {x: birthLocationX,
    			y: round(random(0,height)),
                breadth: random([1,2,3]),
                speed: -1.0,
                nFloors: round(random(2,8)),
                move: atomMove,
                display: objectDisplay}
    return bldg;
}


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


function displayStatusString(){
    noStroke(); 
    fill(0); 
    var statusString = "# Atoms = " + atoms.length;
    text(statusString, 5,20); 
}

mmiller5-Project-10

Don’t (or maybe do) get hit by the barrels!  Press any key to jump.

sketch

var clouds = [];
var barrels = [];
var ground = 320;
var character;
var spaceship = [];
var drop = [];
var gravity = .5;
var count = 0; //keeps track of time since last barrel was made
var ouch = 0; //opacity for Ouch! text

function setup() {
    createCanvas(480, 480);
    frameRate(48);
    strokeWeight(0);
    character = makeCharacter();
    textAlign(CENTER);
    initialClouds();
}

function draw() {
    makeCharacter()
    background(0, 100, 200);
    //cloud stuff
    stepClouds();
    removeClouds();
    addClouds();
    //ground
    midground();
    //spaceship barrel drop stuff
    stepDrop();
    removeDrop();
    //more ground
    closerMidground();
    fill(50, 35, 35);
    rect(0, ground, width, height - ground);
    //character stuff
    stepCharacter();
     //barrel stuff
    stepBarrels();
    removeBarrels();
    addBarrels();
    //spaceship stuff
    stepSpaceship();
    removeSpaceship();
    addSpaceship();
    //extra stuff
    hit();
    count += 1;
}

//cloudy-related stuff
function makeCloud() {
    var cloud = {x: width + 50,
		 y: 80 + random(-50, 50),
		 scale: random(.8, 1.5),
		 tufts: floor(random(1, 7)),//chooses how many parts in cloud
		 tuftX: [random(-15, 15), random(-15, 15), random(-15, 15),
			 random(-15, 15), random(-15, 15), random(-15, 15),
			 random(-15, 15)], //parts in cloud have random location  
		 tuftY: [random(-15, 15), random(-15, 15), random(-15, 15),
			 random(-15, 15), random(-15, 15), random(-15, 15),
			 random(-15, 15)],
		 speed: -.2,
		 move: cloudMove,
		 appearance: cloudAppearance}
    return cloud;
}

function initialClouds() { //make clouds when script starts
    for (var i = 0; i < random(5, 12); i ++) {
	clouds.push(makeCloud());
	clouds[i].x = random(width);
    }
}

function cloudMove() {
    this.x += this.speed * this.scale;
}

function cloudAppearance() {
    fill(240, 100);
    strokeWeight(0);
    for(var i = 0; i < this.tufts; i ++) {
	rect(this.x + this.tuftX[i], this.y + this.tuftY[i],
	     40 * this.scale, 20 * this.scale, 5 * this.scale);
    }
}

function stepClouds() { //updates the cloud features to redraw them
    for (var i = 0; i < clouds.length; i ++) {
	clouds[i].move();
	clouds[i].appearance();
    }
}

function addClouds() { //spawns new clouds randomly
    if (clouds.length <= 15 & random(0, 1) < .01) {
	clouds.push(makeCloud());
    }
}

function removeClouds() { //gets rid of clouds when off screen
    var cloudsToKeep = [];
    for (var i = 0; i < clouds.length; i ++) {
	if (clouds[i].x + (40 * clouds[i].scale) + 15 > 0) {
	    cloudsToKeep.push(clouds[i]);
	}
    }
    clouds = cloudsToKeep;
}

//character stuff
function makeCharacter() {
    var character = {x: 50,
		     y: ground - 10,
		     yf: 0,
		     width: 10,
		     height: 10,
		     color: color(0),
		     jump: false,
		     move: characterJump,
		     appearance: characterAppearance,
		     collision: collision}
    return character;
}

function characterJump() { //makes character move up and down when a key is pressed
    if (this.jump == true) {
	this.yf += gravity;
    }
    this.y += this.yf;
    this.y = min(this.y, ground - this.height);
    if (this.y == ground - this.height) {
	this.jump = false;
    }
    if (keyIsPressed == true & this.jump == false) {
	this.jump = true;
	this.yf -= 10;
    }
}

function characterAppearance() {
    fill(this.color);
    strokeWeight(1);
    stroke(0, 150);
    rect(this.x, this.y, this.width, this.height);
}

function stepCharacter() {
    character.move();
    character.appearance();
    character.collision();
}

function collision() { //when character hits a barrel, change color and say Ouch!
    for (var i = 0; i < barrels.length; i ++) {
	if (dist(this.x, this.y,
		 barrels[i].x, barrels[i].y) <= barrels[i].radius ||
	    dist(this.x + this.width, this.y,
		 barrels[i].x, barrels[i].y) <= barrels[i].radius ||
	    dist(this.x, this.y + this.height,
		 barrels[i].x, barrels[i].y) <= barrels[i].radius ||
	    dist(this.x + this.width, this.y + this.height,
		 barrels[i].x, barrels[i].y) <= barrels[i].radius) {
	    this.color = barrels[i].color;
	    barrelHit(i);
	    
	}	    
    }
}

//barrel stuff
function makeBarrel() {
    var barrel = {x: width + 50,
		  y: ground - random(50, 150),
		  ySpeed: 0,
		  xSpeed: -3,
		  radius: 10,
		  color: color(random(0, 150), random(0, 150), random(0, 150)),
		  move: barrelMove,
		  appearance: barrelAppearance}
    return barrel;
}

function barrelMove() {
    this.x += this.xSpeed;
    this.y += this.ySpeed;
    this.y = min(ground - 10, this.y);
    this.ySpeed += gravity;
    if (this.y == ground - 10) {
	this.ySpeed = -this.ySpeed * .82;
    }
}

function barrelAppearance() {
    fill(this.color);
    strokeWeight(1);
    stroke(0, 150);
    ellipse(this.x, this.y, this.radius * 2, this.radius * 2);
}

function stepBarrels() {
    for (var i = 0; i < barrels.length; i ++) {
	barrels[i].move();
	barrels[i].appearance();
    }
}

function addBarrels() {
    if (random(0, 1) < .01 & count >= 48/*prevents from being too close*/) { 
	barrels.push(makeBarrel());
	count = 0;
    }
}

function removeBarrels() {
    var barrelsToKeep = [];
    for (var i = 0; i < barrels.length; i ++) {
	if (barrels[i].x + 10 > 0) {
	    barrelsToKeep.push(barrels[i]);
	}
    }
    barrels = barrelsToKeep;
}

function barrelHit(index) { //deletes hit barrels and says Ouch!
    var barrelsToKeep = [];
    for (var i = 0; i < barrels.length; i ++) {
	if (i != index) {
	    barrelsToKeep.push(barrels[i]);
	}
    }
    barrels = barrelsToKeep;
    ouch = 255; //sets opacity for Ouch! to be visible
}

function hit() { //displays Ouch!
    fill(255, 0, 0, ouch);
    strokeWeight(0);
    textSize(100);
    text("Ouch!", 60, 100, width - 100, 200);
    ouch -= 5;
}

//landscape elements
function midground() { //makes ground randomly according to noise
    var terrainSpeed = 0.00005;
    var terrainDetail = 0.005;
    fill(50);
    strokeWeight(0);
    beginShape();
    vertex(0, height);
    for (var x = 0; x < width; x++) {
        var t = (x * terrainDetail) + (millis() * terrainSpeed);
        var y = map(noise(t), 0, 1, height / 4, ground);
        vertex(x, y); 
    }
    vertex(width, height);
    endShape();
}

function closerMidground() { //makes ground randomly according to noise
    var terrainSpeed = 0.0007;
    var terrainDetail = 0.05;
    fill(50, 80, 50);
    strokeWeight(0);
    beginShape();
    vertex(0, height);
    for (var x = 0; x < width; x++) {
        var t = (x * terrainDetail) + (100000 + millis() * terrainSpeed);
        var y = map(noise(t), 0, 1, height / 2, ground);
        vertex(x, y); 
    }
    vertex(width, height);
    endShape();
}

//spaceship
function makeSpaceship() {
    var spaceship = {x: -50,
		     y: random(50, 150),
		     speed: 0,
		     speedBoost: random(0, 500),
		     move: spaceshipMove,
		     appearance: spaceshipAppearance}
    return spaceship;
}

function spaceshipMove() {
    //movement speeds up and slows down according to noise
    this.x += this.speed + .5 * (noise(millis() * .001 + this.speedBoost));
}

function spaceshipAppearance() {
    strokeWeight(1);
    fill(255, 200);
    ellipse(this.x + 25, this.y - 5, 15, 15);
    fill(150);
    ellipse(this.x + 25, this.y, 50, 10);
}

function stepSpaceship() {
    for (var i = 0; i < spaceship.length; i ++) {
	spaceship[i].move();
	spaceship[i].appearance();
	addDrop(i); //spawns in barrel drops from ship
    }
}

function addSpaceship() {
    if (random(0, 1) < .0009 - (spaceship.length * .0003)) {
	spaceship.push(makeSpaceship());
    }
}

function removeSpaceship() {
    var spaceshipToKeep = [];
    for (var i = 0; i < spaceship.length; i ++) {
	if (spaceship[i].x - 25 < width) {
	    spaceshipToKeep.push(spaceship[i]);
	}
    }
    spaceship = spaceshipToKeep;
}

//spaceship barrel drop
function makeDrop(i) {
    var drop = {x: spaceship[i].x + 27, //spawns at spaceship location
		y: spaceship[i].y,
		ySpeed: 0,
		color: color(random(0, 160), random(0, 160), random(0, 160)),
		radius: 3,
		move: dropMove,
		appearance: dropAppearance}
    return drop;
}

function dropMove() {
    this.y += this.ySpeed;
    this.ySpeed += gravity / 5;
}

function dropAppearance() {
    fill(this.color);
    strokeWeight(.5);
    stroke(0, 150);
    ellipse(this.x, this.y, this.radius * 2, this.radius * 2);
}

function stepDrop() {
    for (var i = 0; i < drop.length; i ++) {
	drop[i].move();
	drop[i].appearance();
    }
}

function addDrop(i) {
    if (random(0, 1) < .01) {
	drop.push(makeDrop(i));
    }
}

function removeDrop() {
    var dropToKeep = [];
    for (var i = 0; i < drop.length; i ++) {
	if (drop[i].y < ground) {
	    dropToKeep.push(drop[i]);
	}
    }
    drop = dropToKeep;
}

When thinking of generative landscapes, I started thinking about side-scrolling games, and so I decided to combine the two!  Most of the objects are pretty basic — stuff gets introduced and moves across the screen — so I decided to add some complexity to each of the objects, giving them things like different numbers of components, bouncing, and spawning new objects.  The part of this project I personally love the most is that when the character gets hit by a barrel, they become the same color as that barrel!  I just think that’s so neat (and it’s also kinda sad, because clearly getting hit by the barrel hurts, but it’s so cool to watch!).

jknip-SectionA-LookingOutwards-10

Yael Braha’s Project Mapping

Yael Braha is a creative director working at Obscura Digital, who has a lot of experience designing projection mapping shows for large scaled buildings and facades. One of the projects I really enjoyed was the show for AHA, a multi-day festival of lights celebrating Cleveland. Her team at Obscura tends to approach imagery through a very hands-on approach, which I admire, as they brainstorm, create and record slow-mo footage from big to small. The project transformed a 370 foot by 70 foot tall building into an animated canvas, and created high engagement with the community who gather to enjoy the facades. Yael Braha has a degree in Graphic Design and a masters in Fine Arts in Cinema.

Transformations, 2014, Yael Braha

Video from Obscura Digital

http://www.yaelbraha.com/

http://obscuradigital.com/work/aha-cleveland/

yushano_Project 10

sketch

var choice = [];
var buildings = [];
var trees = [];
var cars = [];
var terrainSpeed = 0.0005;
var terrainDetail = 0.005;
 


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

function draw() {
    background(205,233,233); 


    // display the background
    stroke(0);
    strokeWeight(1);
    drawMountain();
    displayHorizon();
    

    // draw objects
    // Buildings
    updateAndDisplayBuildings();
    removeBuildingsThatHaveSlippedOutOfView();
    addNewBuildingsWithSomeRandomProbability(); 
    // Trees
    updateAndDisplayTrees();
    removeTreesThatHaveSlippedOutOfView();
    addNewTreesWithSomeRandomProbability();
    // Cars
    updateAndDisplayCars();
    removeCarsThatHaveSlippedOutOfView();
    addNewCarsWithSomeRandomProbability();


    // snow
    drawSnow();

    // window frame
    strokeWeight(40);
    stroke(230);
    line(0,0,width,0);
    line(0,0,0,height);
    line(0,height,width,height);
    line(width,0,width,height);
}

function drawMountain() {
    fill(246,255,223); 
    beginShape(); 
    vertex(0, 200);
    for (var x = 0; x < width; x++) {
        var t = (x * terrainDetail) + (millis() * terrainSpeed);
        var y = map(noise(t), 0,1, 30, 200);
        vertex(x, y);    
    }
    vertex(width, 200);   
    endShape();
}

function drawSnow() {
    var xS = 10;
    var yS;
    for (var i=0; i< 50; i++) {
        yS = 0;
        for (var j=0; j< 25; j++){
            fill(255);
            noStroke();
            ellipse(xS, yS, 5);
            yS += random(5,20);
        }
        xS += random(8,25);    
    }
}

    

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 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 addNewBuildingsWithSomeRandomProbability() {
    // With a very tiny probability, add a new building to the end.
    var newBuildingLikelihood = 0.02; 
    if (random(0,1) < newBuildingLikelihood) {
        buildings.push(makeBuilding(width));
    }
}


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

// draw the building and some windows
function buildingDisplay() {
    var floorHeight = 20;
    var bHeight = this.nFloors * floorHeight; 
    fill(255,255,0); 
    stroke(0); 
    push();
    translate(this.x, height - 40);
    rect(0, -bHeight, this.breadth, bHeight);
    stroke(200); 
    var wGap = this.breadth/16;
    var xW = this.breadth/16;
    //draw the windows
    for (var j=0; j < 5; j++) {
        for (var i = 0; i < this.nFloors; i++) {
            fill(153,204,255);
            stroke(102,178,255);
            rect(xW, -15 - (i * floorHeight), wGap*2 , 10);
        }
        xW += wGap*3;
    }
    pop();
}


function makeBuilding(birthLocationX) {
    var bldg = {x: birthLocationX,
                breadth: 50,
                speed: -5.0,
                nFloors: round(random(3,8)),
                move: buildingMove,
                display: buildingDisplay}
    return bldg;
}

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


function removeTreesThatHaveSlippedOutOfView() {
    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 current trees
}


function addNewTreesWithSomeRandomProbability() {
    // With a very tiny probability, add a new tree to the end.
    var newTreeLikelihood = 0.03; 
    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 and some ornaments
function treeDisplay() { 
    stroke(0); 
    push();
    translate(this.x, 0-this.treeH/3);
    fill(0,102,51)
    triangle(0, height-40, this.breadth/2, height-this.treeH-80, this.breadth, height-40); 
    fill(108,22,22)
    rect(this.breadth/2-10, height-40, 20, this.treeH/3);
    var x0 = this.breadth/6;
    for (var i=0; i<5; i++){
        fill(255,0,0);
        ellipse(x0, height-40-5, 6);
        x0 += this.breadth/6;
    }
    pop();
}


function makeTree(birthLocationX) {
    var tree = {x: birthLocationX,
                breadth: 50,
                speed: -5.0,
                treeH: round(random(30,80)),
                move: treeMove,
                display: treeDisplay}
    return tree;
}

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


function removeCarsThatHaveSlippedOutOfView() {
    var carsToKeep = [];
    for (var i = 0; i < cars.length; i++){
        if (cars[i].x + cars[i].breadth > 0) {
            carsToKeep.push(cars[i]);
        }
    }
    cars = carsToKeep; // remember the current cars
}


function addNewCarsWithSomeRandomProbability() {
    // With a very tiny probability, add a new car to the end.
    var newCarLikelihood = 0.02; 
    if (random(0,1) < newCarLikelihood) {
        cars.push(makeCar(width));
    }
}


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

// draw the car
function carDisplay() {
    stroke(0); 
    push();
    translate(this.x, 0);
    fill(180)
    rect(0, height-40-this.carWid/6, this.carWid, this.carWid/6);
    rect(this.carWid/4, height-40-this.carWid/30*11, this.carWid/5*3, this.carWid/5); 
    ellipse(this.carWid/6, height-40, this.carWid/6);
    ellipse(this.carWid/6*5, height-40, this.carWid/6);
    
    
    pop();
}


function makeCar(birthLocationX) {
    var car = {x: birthLocationX,
                breadth: 50,
                speed: -5.0,
                carWid: round(random(30,50)),
                move: carMove,
                display: carDisplay}
    return car;
}


// Draw the soil 
function displayHorizon(){
    stroke(0);
    line (0,height-50, width, height-50); 
    fill(132, 75,47);
    rect (0, height-50, width, 50);
}

So, I started from the example code that professor provided for us. I tried to understand how all the things work. Then, I added more elements into the landscape. First, I added the mountain landscape in the background. Then, I change the orientations of the windows in the house. Then, I added the Christmas trees into the scene. Next, I added vehicles- cars to make the picture more fun. At last, I was inspired by the movie “The Power of Ten”. So, I give the animation a picture frame, making it look like people watching outside of a window. Also, I simulated the feeling of snowing to add more fun.

Hannahk2-LookingOutwards-10

The project I chose for this week is Camille Utterback’s “Dances of the Sacred and Profane”, an hour-long dance and computer generated video collaborative work shown at the Cowell Theater in San Francisco. The project is inspired by the music and art of the impressionist period, and mimics timing, memory, and angles of dancers using a motion graphics projection and real-time particle system. Camille manipulates the dancers movements on screen using onstage cameras projected onto large screens behind the dancers. I think this project is ambitious and extremely successful because the projected and manipulated graphics aesthetically augment and play with the details of the reflected choreography. I really admire the pure viscerality in the concept and the artwork, and the painterly quality of the art. It really does a convincing job of bringing me back to the impressionist era. Camille is an incredibly successful and internationally acclaimed artist and pioneer in digital and interactive art. Her work explores the aesthetic and experimental possibilities of connecting computational systems to human bodies, and has been displayed in galleries, festivals, and museums internationally. She is currently an assistant professor in Art at Stanford University, and a co-director of the Stanford Graduate Design program. She has a BA in Art from Williams College, and a Masters from NYU’s Tisch School of the Arts.

Link to the work: http://camilleutterback.com/projects/dances-of-the-sacred-and-profane/

 

Dances of the Sacred & Profane from Camille Utterback on Vimeo.