Category: Assignments

Assignment: Text Generator

Starting from the example here, create a random text generator “with a purpose”. Try to surprise yourself with the combinations!
Download example

The template should work without any installation, the library is included in the folder.
You can only edit the text files respecting the syntax.
(It is based on the Rita library).

By Monday December 2 come up with an idea (possibly more), do the research and collect all the material you need to work.
Monday is going to be a work day.

Proposals

For my arduino project I have been tasked with utilizing an IR light. This mechanism can be seen in common elevators.

1. My first proposal is to use the IR close to a sink. In class we learned that the machine reacts best to metals and whole objects; thus this work would utilize water, and human interaction. The IR would point into a flowing faucet. When somebody came and washed their hands they would interfere with the flow and provide a solid for the arduino. The computer would read this and activate a prerecorded speaker, heckling the user.

photo 1
2. This proposal relies on simple machines in addition to the IR sensor. In one of 2 ways I’d like to use a dildo to surprise someone entering a doorway. Placed in a bathroom or isolated area this gag would use IR sensors to trigger a prank similar to the old bucket above a doorway trick. When the person walked by the sensor, a machine would either trip a rope or using a chain propel the dildo at the startled individual. photo 2

Ideas for Interactive project

Proposal 1: self deprecation helmet

Performer wears a force resistor on their forehead in a public space. Performer hits their head against a wall repeatedly, every time the force resistor is hit a sign blinks a sentence: “I hate my life” or “winner” or “Have a great day” or “you suck”

Proposal 2: Elevator terrorism

Place force resistor over elevator button. Force resistor will be hooked up to a hair dryer. Stand in the elevator and film people’s reactions, will they push the button? Do not tell people what the button does.

Proposal 3: Can you resist? (Lol, force resistors.. get it?)

Two performers stand in a room with force resistors on the crotches of their underwear. When both performers are pressing their resistors simultaneously (or pressing each other’s), the lights will turn on revealing the identities of both performers.

 

Interactive Object Proposals

1.) A fight with futility: A machine with a switch that, once it is turned on, a series of processes start that work to switch the button back and turn the machine off.

Or, painfully loud static noise playing from headphones, and the only way to turn then volume down is by yelling louder.

 

2.) A simple “On / Off” button that, when you switch it on, the computer randomly generates either “You win” or “You lose”. The code is very long and written as if there are many calculations and steps going into determining whether or not “you win”. The button is decked out with lots of wires and gadgetry to make it look like a very high tech machine, when it is actually just a very simple button.

Interactive Object

Create a responsive artifact or system and shoot a short video “around” it.

– The goal of the video piece is not to just document and explain how the artifact works but to tell a story, define a character or situation, make a statement or evoke a feeling using the object.

– The genre can be anything you want: narrative / speculative fiction, performance, mockumentary, candid camera/intervention, faux-advertising.

– The tone can be serious, comical, surreal, ironic etc. You don’t have to convince people that your project is cool or sophisticated, it can be a critical commentary on a certain aspect of technology or envision a potential use of a technology.

– Take the examples we saw in class as a reference

Technical aspects
You can think about the artifact in this way:

arduino_blackbox

Your box has inputs (sensors or switches) and output (actuators). We went through some sensors we have readily available, the simplest way to make something significant happen in the world is to use digital outputs to control extension cords and anything powered by them (light, appliances, power tools, fans…). With the equipment we have in the lab you can easily control up to eight AC powered things.

Aside of AC powered things you can also control motors, stepper motors, bigger colored LED or LED strips, solenoids and other more complex analog actuators. We have plenty of them available but keep in mind there is no universal plug and play solution, if you want to use them you will have to research how those particular component work by yourself.

In any case, here are some notes:

– Both sensors and outputs don’t need to stay on the breadboard, you can get long wires and arrange them in a space. Where these things exist is as important as what they do.

– The computer doesn’t have to be connected once the board is programmed, that’s why you have a 9V battery.

– What happens in the box doesn’t have a boring switch (a sensor turns on something). You can have different states, randomness, delays, some kind evolution. Arduino is programmable and now you know how to program.

– Any input and output can be “dressed up” and loaded with meaning and cultural implications. Technically speaking, controlling a vintage lamp on a sidewalk is the same as controlling a spotlight in a bathroom, but the affordances in terms of storytelling and performance and very different. A big red button on a black box is different from a soft button stitched on a wedding dress.

Due Dates:

– By Monday 11: each one of you posts 2 detailed proposals, possibly with a scheme or illustration on the blog. I recommend one idea using the sensor I assigned for testing and one using another sensor. After the class discussion each group will pick one idea among the 4 proposals, the most original and feasible.

– By Monday 18: Deliver the video, upload it on Youtube or Vimeo.

Assignment: Particle System

This is a suggested starting point for the assignment. It’s a slightly different particle system than the one we programmed in class. The “things” move according to a angular direction instead of speedX and speedY.

int NUM_THINGS = 10;
 
// creating an (empty) global array with a
// capacity of 10 elements of type Ball
Thing[] things = new Thing[NUM_THINGS];
 
void setup() 
{
  size(500, 500); 
  smooth();
 
 
  for (int i = 0; i < NUM_THINGS; i++) 
  {
    things[i] = new Thing();   // populating the array
 
    things[i].x = random(0, width);
    things[i].y = random(0, height);
    things[i].direction = random(0, 360);
  }
}
 
void draw() 
{ 
  //bg is not conceptually part of the class
  background( 0, 0, 0);
 
  //call the method update everytime I draw
  for (int i = 0; i < NUM_THINGS; i++)
  {
    things[i].update();
  }
}
 
 
class Thing
{
  //parameters of my thing
  float myDiameter = 10;
  float x;
  float y;
  color col = #00FFFF;
  float speed = 1;
  float direction = 0;
 
  //Constructor function - same name as the class
  Thing()
  {
  /*
  like the setup in the main sketch the constructor function 
  is executed once as soon as the object is created
  */
  }
 
  //method(s) for my thing
  void update()
  {
    /*
    convert direction into radians
     break it down to the sinus and cosinus
     which are the vertical and horizontal component 
     of the angle then multiply for speed 
     (because in trigonometry you always work with a radius of 1)
     */
    float dX = cos(radians(direction))*speed;
    float dY = sin(radians(direction))*speed;
 
    //the result are the steps in the vertical and horizontal direction
    x = x + dX;
    y = y + dY;
 
    //direction++;
 
    //managing borders
    if (x > width)
    {
      x = 0;
    }
 
    if (x < 0)
    {
      x = width;
    }
 
    if (y > height)
    {
      y = 0;
    }
 
    if (y < 0)
    {
      y = height;
    }
 
    //draw the thing  
    fill(col);
    noStroke();
    ellipse(x, y, myDiameter, myDiameter);
 
    /*
    //example of interaction among things//
    //every object scans the other objects using the global array
    for (int i = 0; i < NUM_THINGS; i++)
    {
      //temporary variable to store the other
      Thing other = things[i];
 
      //it's not a good idea to make theinteract with itself
      //this points to the specific instance
      if (this != other)
      {
        //after I determine it's another thing I check the distance
        if (dist(x, y, other.x, other.y)<100)
        {
          //and do something
          stroke(255);
          line(x, y, other.x, other.y);
        }
      }
    }
    */
    ////////////
  }
}

Assignment

Start from this code and produce a “more interesting” “flock of things” using interaction and/or random (to change behavior every so often for example) and by interrelating the behavior of the various things with each other (uncomment the distance part).

Advanced: create one or more additional classes and produce an artificial ecosystem in wich certain objects interact with others.

Exercise: Order vs. Disorder in motion

Make a composition with controlled randomness which depicts “order” when the mouseX is on the left side of the canvas, and chaos (actually randomness) when it is on the right side. The degree of order/chaos should vary gradually with the position of the mouse.

.Use for loops
.Check the example below for reference but don’t make a variation of it. The grade will be mostly based on the originality of your sketch.
.Try using noise instead of random.

This is a simple, boring example.

 
void setup() {
  size (400, 400);
  fill(255, 255, 255);
  smooth();
  noStroke();
}
 
 
void draw() {
 
  background(255, 255, 255);
  fill(0, 0, 0);
 
  float xPos;
  float yPos;
  int circleSize = 5;
  int circleDistance = 20;
 
  //defines the x-coordinate 
  for (int x=10; x<= width; x=x+circleDistance) {
    //defines the y-coordinate   
    for (int y=10; y<= height; y=y+circleDistance) {
 
      //the position is mostly determined by a grid but it also
      //has a component of randomness
      xPos = x + random(mouseX/50);
      yPos = y + random(mouseX/50);
 
      //80 is a "magic number" I figured out by trial and error
      //it reduces the amount of randomness
 
      //you can use the functions map and constrain for similar purposes
 
      ellipse(xPos, yPos, 10, 10);
    }
  }
}