Assignment 7 — Snow Fears a Lantern

So, an ecosystem:

I initially wanted something far more complex than this. I had wanted the viewer/user to be the creature and carry a lantern,. Of course, all we see is the lantern. The snow is meant to me repulsed by the lantern, as though it were frightened of it. I also wanted little glowing creatures to be attracted to the lantern and perhaps small woodland animals to fear the lantern and run away, but c’est la vie… there is only so much I can deal with.

Here is a video of my result. (I apologize for the low quality — my screengrabbing software can only deal with so much.) The first half shows one version where as soon as the lantern is lit the snow is repelled, the second half shows another version where it stops snowing completely when the lantern is lit (although those particles already formed off screen continue to fall until they die and are removed from the system.)

Perhaps it would be more interesting if I added an additional streetlamp… that would not be difficult.

https://www.youtube.com/watch?v=YIVixYb8zCY

(Snow is an ecosystem, is it not? Uuugh..)

Vortex

Jun’s thought process for this project:
Need something creative to project on -> ceiling lamp in room with dome shaped shades look cool -> need to find place on campus with similar lamp -> Porter has ceiling fans, ceiling fans are objects on ceiling too -> ceiling fans spin, so need to make something that plays on the spinning motion of the fan

And I ended up with something like this.

The final product did end up looking more like a planetary system than I intended to. This is just because the initial velocity of the particles are set to be tangent to the circles, and the gravity toward the center makes the particles orbit. I also didn’t foresee the projection would be projected onto the ceiling too, but I think in a way that made it look cooler. This is a projection that can’t live without the place it is projected on. AKA, if you run the program on your computer, it looks very simple, to the point of being boring/dull. However, once it is projected onto the fan, the motion of the fan makes the projection seem mesmerizing.

Code (non-Keystone version):

import pbox2d.*;
import org.jbox2d.collision.shapes.*;
import org.jbox2d.collision.shapes.Shape;
import org.jbox2d.common.*;
import org.jbox2d.dynamics.*;
import org.jbox2d.dynamics.contacts.*;

PBox2D box2d;

ArrayList allParticles;

Surface surface;

boolean showOutline;
boolean showCircles;
float outerR;
float innerR;

void setup() {
  size (600, 600);
  showOutline = true;
  showCircles = true;
  outerR = 500;
  innerR = 80;

  smooth();

  box2d = new PBox2D(this);
  box2d.createWorld();
  //  box2d.setGravity(width/2, -height/2);

  allParticles = new ArrayList();
  surface = new Surface(innerR/2);
}

void draw() {
  background(0);

  float make = random(0, 1.0);
  if (make<0.1) {
    float angle = random(0, TWO_PI);
    float x = width/2+cos(angle)*outerR/2;
    float y = height/2+sin(angle)*outerR/2;
    Particle p = new Particle(x, y, 5, angle);
    allParticles.add(p);
  }

  if (keyPressed) {
    if (key=='r' || key=='R') {
      for (Particle p: allParticles) {
        p.done();
      }
      allParticles.clear();
    }
    else if (key=='c' || key=='C') {
      if (showCircles) showCircles = false;
      else showCircles = true;
    }
    else if (key=='o' || key=='O') {
      if (showOutline) showOutline = false;
      else showOutline = true;
    }
    else if (key==CODED) {
      if (keyCode==UP) {
        innerR+=2;
      }
      else if (keyCode==DOWN) {
        innerR-=2;
      }
      else if (keyCode==LEFT) {
        outerR-=2;
      }
      else if (keyCode==RIGHT) {
        outerR+=2;
      }
    }
  }

  if (showCircles) {
    float r;  
    noFill();

    stroke(255);
    strokeWeight(3);
    r = innerR+0.95*(outerR-innerR);
    ellipse(width/2, height/2, r, r);

    stroke(245);
    strokeWeight(2.5);
    r = innerR+0.90*(outerR-innerR);
    ellipse(width/2, height/2, r, r);

    stroke(225);
    strokeWeight(2.2);
    r = innerR+0.82*(outerR-innerR);
    ellipse(width/2, height/2, r, r);

    stroke(195);
    strokeWeight(1.5);
    r = innerR+0.70*(outerR-innerR);
    ellipse(width/2, height/2, r, r);

    stroke(155);
    strokeWeight(1.0);
    r = innerR+0.55*(outerR-innerR);
    ellipse(width/2, height/2, r, r);

    stroke(105);
    strokeWeight(1.0);
    r = innerR+0.40*(outerR-innerR);
    ellipse(width/2, height/2, r, r);

    stroke(45);
    strokeWeight(0.8);
    r = innerR+0.20*(outerR-innerR);
    ellipse(width/2, height/2, r, r);
  }

  if (showOutline) {
    surface.display();

    noFill();
    stroke(0, 255, 0);
    strokeWeight(1);
    ellipse(width/2, height/2, outerR, outerR);
  }

  box2d.step();

  for (Particle p: allParticles) {
    Vec2 pos = new Vec2();
    pos = box2d.getBodyPixelCoord(p.body);
    //Find distance from center
    float dx = width/2-pos.x;
    float dy = -height/2+pos.y;
    Vec2 grav = new Vec2(dx, dy);
    float dfc = sqrt(dx*dx+dy*dy);
    float r0 = p.r0;
    float newR = map(dfc, 0, outerR/2, r0/5, r0);
    p.applyForce(grav);
    //    p.r = newR;
    if (dfc height+r*2) {
      killBody();
      return true;
    }
    return false;
  }

  // 
  void display() {
    // We look at each body and get its screen position
    Vec2 pos = box2d.getBodyPixelCoord(body);
    // Get its angle of rotation
    float a = body.getAngle();
    pushMatrix();
    translate(pos.x,pos.y);
    rotate(-a);
    fill(100,140,200);
    noStroke();
    strokeWeight(1);
    ellipse(0,0,r*2,r*2);
    popMatrix();
  }

  // Here's our function that adds the particle to the Box2D world
  void makeBody(float x, float y, float r) {
    // Define a body
    BodyDef bd = new BodyDef();
    // Set its position
    bd.position = box2d.coordPixelsToWorld(x,y);
    bd.type = BodyType.DYNAMIC;
    bd.linearDamping = 0.1f;
    body = box2d.world.createBody(bd);

    // Make the body's shape a circle
    CircleShape cs = new CircleShape();
    cs.m_radius = box2d.scalarPixelsToWorld(r);
    
    FixtureDef fd = new FixtureDef();
    fd.shape = cs;
    // Parameters that affect physics
    fd.density = 1;
    fd.friction = 0.01;
    fd.restitution = 0.3;
    
    // Attach fixture to body
    body.createFixture(fd);

    // Give it a random initial velocity (and angular velocity)
    body.setLinearVelocity(new Vec2((50*cos(PI/2-a0)),(50*sin(PI/2-a0))));
    body.setAngularVelocity(0);
  }
  
  void applyForce(Vec2 force) {
    Vec2 pos = body.getWorldCenter();
    body.applyForce(force, pos);
  }
}

class Surface {
  Body body;
  float r;
  
  Surface(float r_) {
    r = r_;
    makeBody(width/2,height/2,r);
    body.setUserData(this);
  }
  
  void display() {
    // We look at each body and get its screen position
    Vec2 pos = box2d.getBodyPixelCoord(body);
    pushMatrix();
    noFill();
    stroke(0,255,0);
    strokeWeight(1);
    ellipse(width/2, height/2, r*2, r*2);
    popMatrix();
  }
  
  // Here's our function that adds the particle to the Box2D world
  void makeBody(float x, float y, float r) {
    // Define a body
    BodyDef bd = new BodyDef();
    // Set its position
    bd.position = box2d.coordPixelsToWorld(x, y);
    bd.type = BodyType.STATIC;
    body = box2d.createBody(bd);

    // Make the body's shape a circle
    CircleShape cs = new CircleShape();
    cs.m_radius = box2d.scalarPixelsToWorld(r);

    FixtureDef fd = new FixtureDef();
    fd.shape = cs;

    // Attach fixture to body
    body.createFixture(fd);
  }
} 

Never Give Up

The creature collects bubbles into the bottom right corner. The user, by holding down the mouse button, can push the bubbles around and thus mess up the setup the creature made, who will then proceed to panic and stream in agony. Eventually the creature calms back down and continue its job.

WP_000674WP_000676

I decided to use Box2D for this part of the assignment also. I also started off with crabs collecting fruits but found germ thing collecting bubbles to be cooler.

My project turned out to be similar to Swetha’s. I find that I spend more time looking at her project though, because I just really want the bird to succeed, so I just sat there waiting for the moment that will never come. On the other hand, I know my creature will succeed unless I bully it, so I just go back to mess with it every once in a while.

Also, I found out that if I increase the bubble count and restitution, the bubbles will become greatly accelerated and will start beating up the creature, who will march on despite the onslaught. I feel like a bad person.

Sex Ed 60210

The two bathroom sign people start rolling into each other, and upon collision they form an explosion and their baby transcends above (gender of baby is randomly determined).

I found a wall with the 2 gendered bathroom signs close to each other, and this just popped into my head. However, the problem was, even though the signs were close together, they were not close enough, as the hallway I was in was too narrow to project correctly. In the end I decided to keep my idea, and instead I used a chalkboard to be projected onto, which I felt to be more fitting into the theme of education (albeit incorrectly). Because I was projecting directly onto a chalkboard with a classroom’s projector, I did not run into any Keystone issues.

In the end, I feel like the chalkboard turned out to be better than the original idea I had with the bathroom signs. I do feel that I cheated a little by modifying the environment before projection and if I can make this somehow more public and put it less under my control, it would be more fun.

WP_000672

Looking Outwards: Arduino

Discovery 1: Printer Orchestra

“Printer Orchestra”  was created by Chris Cairns and the team at “is this good?” for the printer manufacturer Brother.

I liked the Printer Orchestra off-the-bat for its charm. In the about section on Vimeo, the team explains that they were inspired by “Tristram Cary, James Houston, BD594 and other radical tinkerers” and comment that “Making cold stuff warm is fun.” I love the last part of that—I think the orchestra is a huge success in taking mundane, cold pieces of technology and making them warm and expressive. (I also think it’s a good idea to carry forward in this course/in electronic media art in general.)

Discovery 2: BMW Museum Kinetic Sculpture

This kinetic sculpture in the BMW museum was created by the firm ART+COM, a German firm which “design[s] and develop[s] innovative media installations, environments, and architecture.” According to ART+COM, the sculpture visualizes “the process of form-finding in different variations.”

This project’s documentation does not explicitly state that it uses Arduino, but it did come up in a youtube search for “arduino mediaarttube” and it looks like an Arduino project. Anyway, I enjoyed this project first for its aesthetic and second for its concept. The suspended spheres look like they are floating, and seeing them move gracefully and gradually into sync is mesmerizing to watch. I think the project successfully expresses the exploration involved in form-finding.

Given that this project is not highly interactive, I think it’s remarkably engaging. I also appreciate that in this piece, it seems clear that the technology was supporting a larger vision—to create these floating, synchronized spheres—rather than just being an experimental “gizmo”.

Discovery 3: un-melt

“un-melt” is a video created by Tony Round, an architect and filmmaker. The video was created for Gizmodo’s monthly video challenge. The particular challenge he was responding to was to “play with video reversal—backwards playback”.

Round used Arduino in this project to drive a homemade timelapse dolly rig. I liked this project because the video seemed beautiful and magical, showing me a process (un-melting) that I would not normally perceive. I also really enjoyed the cinematography of the piece; it had really beautiful shots. Round’s use of the Arduino to steer his dolly enabled him to take those shots, and I think that this use of Arduino was interesting because it was not all about the Arduino itself; it was about what the Arduino could support.

 

Collecting Brid Projection

In this project I once again went back to the creature idea (Sorry Golan, I know you said it would be tough but I was really enthusiastic about this idea when I thought of it. Making characters is tons of fun!). Surprisingly, this project has a lot of elements from Dave’s creature although we didn’t know it ourselves. In my project, a bird has built a nest on top of an eraser on a blackboard. The nest is small so the eggs (made from box2d) keep toppling out and the bird frantically collects them. The bird is eventually able to put them all in the nest, however I purposely designed the nest so that the eggs cannot all fit at the same time. Needless to say, the eggs continue to drop and the bird collects frantically with small, humming bird – like movements.

UPDATE:
The collecting bird strikes back! This time her nest is in a location that is hopefully more considered ^^;

Video:

Some of the things I need to go into and rework would definitely be adding an avoidance variable to the bird. I didn’t realize how weird it would be for the bird to pass through the eraser until I was actually projecting. However, I do like the small ‘world’ or ‘environment’ that I have created around that eraser. You can’t help but feel bad for the bird as you see it’s progress; it fumbles around and knocks over its own eggs in an effort to save them all; it’s hard to not only marvel at it but also hard to not pity it.

Parent and Child

In this project I was experimenting with creating structures out of springs that were simplistic but also able to hold themselves upright as if they were living organisms. I wanted them to have a sense of where their head is and where their legs may be. This is why I made it so that when the creatures fell over they wee not able to move unless they wriggled to get back on their feet. These creatures are also a mother and child pair that interact with the mouse and with each other. Both of them are compelled to stay close together (the child more so than the adult) as well as compelled to avoid the mouse which is the ‘danger’ in their environment. The mouse cannot grab the adult but may get close enough to grab onto the child. If that is the case, the mother will feel compelled to try saving the child if she is within distance to do so. Once the user drops the baby, the mother will make an attempt to get back to the child but will not sacrifice herself for it, meaning she will still avoid you and abandon the child if necessary.

Processing code:

some sketches:

photo

Ticha-Musical Stairs


(Note: as the audio is live, there is a little bit of background noise in the video that I was unable to edit out)

‘Musical Stairs’ is a project that examines the role of music in our mundane lives. It was partly inspired by ‘Casse’ by Andreas Gysin and Sidi Vanetti, which effectively employs sound to add appeal to their simple projection.

An old habit of mine is tapping my fingers on a desk or flat surface in a manner that imitates playing the piano. It is a habit I thought I had grown out of, but only recently resurfaced due to my frustration with not having easy access to a piano. Clearly, I am not the only one who enjoys using this ‘musical instrument surrogacy’ in the event of having idle hands – I have seen enough people drumming on chairs and playing table keyboards to know this for certain. My projection attempts to manifest this concept of using an everyday object as a surrogate for a specific musical instrument. In addition, it redefines the image of a staircase by recontextualizing it into a musical situation. The way the program works is simple: when the user clicks on an point on the screen a white ball is spawned, which changes color and plays a note pertaining to the step it makes contact with.

A potential extension of this would be to project on a variety of small areas and attributing different objects to different instruments. It would be interesting to use this notion to create an ‘interesting symphony of boring objects’.

I fortunately did not run into many problems during this assignment. Initially, my program could not play more than 7 notes before going completely mute. I had no idea what the problem was until Dave pointed out that I was creating a new AudioPlayer object each time I needed to play a sound; it was then that I realized I was doing a really really bad thing. A non-programming-related issue that I ran into involved particularly rude CS majors on the 9th floor who seemed to make a effort to disrupt my recording (even though I explicitly told them that I was working on a project).

Also thanks to Swetha and Jun for helping me with the awkward projector handling!

Improvements to be made:
– attribute a special event to colliding notes
– make notes more visually interesting

Sperm and Egg


This simulation models sperm competing for an egg. The two sperm have different attraction levels to the egg, who is directed about using the mouse. This configuration casts the viewer/interacter as female, evading or pursuing suitors as she pleases. This subtle relationship and flirtation engaging and interesting, both as a viewer myself and in watching others play with the simulation.

I wanted to get in touch with origins of life. I find the actions of creationary forces—sperm and egg, electron and proton, cosmic forces—all have similar behaviors and appearances on a base level. Visually I wanted to make this connection by choosing forms that could serve as a diagram for any creationary situation listed above.

 photo 100_2171_zps263b90ad.jpg

Personal Cave

Caves weigh heavily on human spirituality. The first art—the first human response to nature—began in cave painting and scultpure. Thus in my experience, caves are the incubators of the creative impulse; they are wombs of humanity. This projection is a personal cave. It fits at my desk, where my creative work occurs. Though not visible in the projection, there are dark background cave formations that help to extend the space. The work is a reminder of the origin, purpose, and function of the creator in the world. In addition, this work is meant to accentuate the space. My desk is under a lofted bed, so I work in a sort of figurative,shallow, forced cave. Though I find the space confining and lonely, painting it as a cave gives it the significance it can’t generate by its self. There is also a sense of weight in the piece, as the sitter must be perfectly still to accurately bear the weight of the cave formation as time passes. In subtext, I wanted to add an element of burden, eternity, and waiting to the cave.

This project gave taught me the value of Keystone. The tool was invaluable for positioning the image, as I had a technical difficulty with the frame displaying a white border. Box2d was an interesting experience, if a little difficult to transition into. Visually I want to deepen this project with a visible background and add cave paintings to reinforce content. I want to make it dynamically sense the sitter, so that the water drops can react to a person in motion.
 photo CaveDropsPic_zpsde6b7db3.jpg
 photo 100_2175_zps2d2fda04.jpg
 photo 100_2169_zps86926a37.jpg