Tuesday, October 30, 2007

Old Picture

We had an assignment in the beginning of the semester to chose an object we found aesthetically pleasing. I chose a chandelier that was my great grandfather's.

So a while ago I was supposed to post these:








Project Status Update

I have a final design. Post to come next week as this week I present my thesis in front of the thesis committee. I might switch to surface mount accelerometers as they are about $5 a piece versus $30. I am still researching what kind of silicon to use. It will probably cost about $50. To describe the shape it is like a boardgame piece (think Sorry) with tendrils on the bottom. We (other in the class and I) are looking into getting several Arduino Minis. Currently Sparkfun has too few. Hopefully things will be ordered this week and the model will be finished by next week so I can start casting.

Thursday, October 18, 2007

Budget

Here is a preliminary budget for my final project:

6x Arduino Minis $37.95 each Total: $227.70 www.sparkfun.com
8x XBee Module: $19.00 each Total: $152.00 www.maxstream.net
6x Accelerometers $29.95 each Total: $179.70 www.spakrfun.comn
7x Vibration Motors: around $1 each $7.00
7x Small Speakers: $?? I could get these from scrap so I am keeping it as free for now.
6x Breadboards $5.49 each $32.94 Jameco

Casting Material: $100
Table and Decorations: $100

Grand Total: $799.34 + cost of batteries

I can reuse the materials for my thesis. But OUCH!!!
I save about $45 if I can be most of the orders to 10+.

Readings 4

The Locative Commons: Situating Locations-Based Media in Urban Public Space
by Marc Tuters

I am kind of at a loss of this article. It makes rapid jumps in logic that I get but could be better explained by the author then just referencing other people. The part about virtual cities I have one problem with...though it is a created virtual city made by people over a network it still has some bounds (Jaron Lanier has many article explaining how this is not quite VR). It is still bound by the program the people are using which is not what the original philosophers of this idea had in mind. The ideas of connectivity I have always found interesting (especially that I like to not be connected all the time). I had never heard the cellphone groups being equated to flocking behaviors before. The behaviors developed by this constant connectivity I find fascinating. I think its odd the society adapts the technology faster and better than the authorities (though we adapt pretty poorly in most cases but still fast).

Resonance and Everyday Life: Ubiquitous Computing and the City
by Anne Galloway
Paradigm shifts in computing have interested in since my days in high school. I had not heard of the term Ubicomp. The fact that Xerox is against VR goes against what many people saw as the future of computing. I was discussing the article with a programmer friend while reading it and oddly our conversation followed the authors ideas, though we were using different examples. The hybrid theory reminds me of Jamie Allen and Rob O'Niels box project, where a box would turn in reality and turn in MAYA as well. The Amble Time project reminded by if the Reality Dysfunction series by Peter Hamilton where people had nanocomputers in their brain displaying their options and letting them chose the best one. Also the mind collective of the Edenist in the book where people can record their memories and then later others could access them. I agree that the idea of ubiquitous computing currently lends itself to cell phone technology. I would be curious and hopeful to see in leave the cell phone world into something better (not that the current practices and art are bad, they are good). I do agree also about the integration of technology causing societal and social issues. This stems much farther than just surveillance, though most people do not know how easy it is to spy of someone through the stuff they own.

Wednesday, October 10, 2007

Vis Part Two

L-System



And now for the Processing Code:

Code taken from class examples and modified slightly, a thank you to Liubo Borissov for the code.

/*
L-Systems are a great simulation to explore, as there is a near infinite
variety of images you can generate. In this example we calculate the L-System
when we start our applet, and then alter the angle used to draw the system
in the draw() method. We could just as well work with other parameters in
the draw method.
*/
import processing.serial.*;

LSystem ls;
Serial myPort;
int inByte = -1;
int dataByteLSB = -1; // Variable to hold keystoke values
int dataByteMSB = -1; // Variable to hold keystoke values
int dataByte = -1; // Variable to hold keystoke values
int headerByte = 224;

void setup() {

// setup the environment
size(500, 500);
background(0);
smooth();

// setup the L-System
// ls = new LSystem("F", "FF-[-F+F+F]+[+F-F-F]");
ls = new LSystem("F", "CF[+F][--F]F[-F][++F]F");


// Age the L-System four generations
ls.simulate(4);
myPort = new Serial(this, Serial.list()[0], 9600);
}




void serialEvent() {
// setup the drawing area


// set the angle for our L-System and draw it
}

void draw() {
// If there are bytes available in the input buffer,
// Read them and print them:
while (myPort.available() > 0) {
inByte = myPort.read();
// println(getByte);

if (inByte == headerByte) {
dataByteLSB = myPort.read(); //get LSB
dataByteMSB = myPort.read(); //get MSB
//println(dataByteLSB);
//println(dataByteMSB);
}

// These two lines 'reconstruct' the data
// into a 0-1023 number
dataByte = dataByteMSB << 7;
dataByte = dataByte + dataByteLSB;

}

if (dataByte >= 0) {
background(0);
stroke(255);

float theta = ((dataByte/2) / (float)width) * 180.0f;
ls.useTheta(theta);
ls.render();
}

}

The Class is as follows:

/*

The LSystem class contains all of the algorithms necessary to
create, iterate, and draw Fractal L-Systems. The theory behind
an L-System is based upon a simple grammar that tells the system
how to draw itself. The grammar is made up of 5 characters:

F : draw a line forward by a define length
+ : rotate in the positive direction by a defined angle
- : rotate in the negative direction by a defined angle
[ : store our current position
] : retrieve the previous position

Each L-System will start with an Axiom and a Rule, the Axiom is
the starting condition (typically just "F"), and the Rule is a
substitution applied at each step. A simple rule might be:
"F[+F--F]+F"

For each iteration of the fractal, every occurance of the letter
"F" is replaced with the Rule. So when we begin, the Fractal is
defined by it's axiom:

1: F

At the second iteration we apply the rule:

2: F[+F--F]+F

At the third iteration we apply the rule again, replacing every occurance of
F with the rule:

3: F[+F--F]+F[+F[+F--F]+F--F[+F--F]+F]+F[+F--F]+F

We can repeat this pattern as often as desired. At each iteration we shorten the
length of the line segment drawn by any occurance of F.
*/

public class LSystem {


private String axiom;
private String rule;
private String production;

private float startLength;
private float drawLength;
private float theta;

private int generations;

public LSystem() {

// create default values
axiom = "F";
rule = "F+F--F+F";


startLength = 40.0f;
theta = radians(60.0);

reset();
}

public LSystem(String axiom_, String rule_) {

// save the values
axiom = axiom_;
rule = rule_;

startLength = 80.0f;
theta = radians(60.0);

reset();
}

public void useRule(String r_) {

rule = r_;
}

public void useAxiom(String a_) {

axiom = a_;
}

public void useLength(float l_) {

startLength = l_;
}

public void useTheta(float t_) {
theta = radians(t_);
}

public void reset() {

production = axiom;
drawLength = startLength;
generations = 0;
}

public int getAge() {

return generations;

}

/*
We need to create a simple drawing system that walks through our
production (the current state of our LSystem) and follows the rules
provided to draw the system.
*/
public void render() {

// start at the bottom center of the screen
translate(width / 2, height);

for (int i = 0; i < production.length(); i++) {

char step = production.charAt(i);

if (step == 'F') {

// draw a line
line(0, 0, 0, -drawLength);

// move to the end of the line
translate(0, -drawLength);

} else if (step == '+') {

// rotate
rotate(theta);

} else if (step == '-') {

// rotate
rotate(-theta);

} else if (step == '[') {

// save our position
pushMatrix();

} else if (step == ']') {

// reset our position
popMatrix();

}
else if (step == 'C'){
strokeWeight(constrain(100/(i+1)+1,1,10));
stroke(color(100,255,0));
}
else if (step == 'L'){
pushMatrix();
translate(drawLength/3,0);
fill(200,40,40,10);
ellipse(0,0,constrain(i,1,5),i/60);
popMatrix();
}

}
}

/*
Our basic simulate method is a little different,
it will age our LSystem by one generation, leaving
the rendering part for us to call later
*/
public void simulate() {

production = iterate(production, rule);

}

/*

For conveinience we have a second simulate method that
lets us specify what age we want to simulate our LSystem
up too.
*/
public void simulate(int gen) {

while (getAge() < gen) {
production = iterate(production, rule);
}
}

/*

It is up to our iterate method to update the production (text) of
the LSystem, as well as the drawLength and age
*/
private String iterate(String prod_, String rule_) {

// update our drawing size
drawLength = drawLength * 0.6;

// update our generations
generations++;

// run the iteration
String newProduction = prod_;
newProduction = newProduction.replaceAll("F", rule_);

return newProduction;
}
}

Vis

A visualization exercise:

I used a potentiometer to change the angles of an L-system.

Arduino Code as Follows: (uses pitch bend technique, partially copied from class examples, thank you Jamie Allen for the code)

#define header 224

int potPin = 0; // select the input pin for the potentiometer
int ledPin = 13; // select the pin for the LED
int val = 0; // variable to store the value coming from the sensor
int accVal = 0; // accumulation of a sum for averaging
int avg = 0; // average result
int howManyToAverage = 5; //number of individual values to average
int analogValLSB = 0; //least significant bit
int analogValMSB = 0; //most significant bit

void setup() {
pinMode(ledPin, OUTPUT); // declare the ledPin as an OUTPUT
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
}

void sendData3Byte(char cmd, char data1, char data2) {
Serial.print(cmd, BYTE);
Serial.print(data1, BYTE);
Serial.print(data2, BYTE);
}

void loop() {
int i;
digitalWrite(ledPin, HIGH); // sets the LED off
accVal = 0; // clear the accumulator
for (i=0; i val = analogRead(potPin); // read the value from the sensor
accVal = accVal + val;
delay(10);
}
avg = accVal/howManyToAverage;
analogValLSB = avg & 127; //Keep lower 7 bits bits, 0000000011111111 = 127
analogValMSB = (avg >> 7) ; //Need to shift the MSB into to the lower 7 bits
sendData3Byte(header, analogValLSB, analogValMSB); //Sends parsed data
delay(20); //give poor MIDI a chance!
digitalWrite(ledPin, LOW); //turn off light
}

Final Project

Abstract:
This is an interactive installation based on clonal colonies. It will consist of ten objects placed around a table. Each object can be picked up and manipulated by the user. Certain gestures will cause the object to emit sound and vibrations. Each object will influence the other objects to copy its behavior by proximity and number of objects doing the same behavior. If left alone the objects will eventually become inert. The sound effects will include the psychoacoustic phenomenon of beating.

Project Goals:
The goal of this piece is to create objects that react to gestures. I believe that gesture interfaces are very innovative and lend themselves to areas were interactive art has not explored. This piece will involve users working together or against each other, which is an aspect I seek to explore.

Target Audience:
The audience for these piece will most likely be young children though I would like to entice and older audience as well. I think parents will use it with their children as well.

Project Success:
The success of the project will be determined by the amount of time people use it and the way they use it. It has a game like quality to it, therefore if people try to compete or work collaboratively; it will gauge the success of the artwork.

Background/Need:
Though overly discussed the Nintendo Wii has opened a new era of interface design for the game industry. I believe it will transfer over into everyday life. More people will use gestures as controls rather than the standard input of keyboard and mouse.

Project Timeline:
October 6 – October 20: Order Parts and Create Model
October 20 – October 27: Assemble Objects
October 27 – November 3: Assemble Objects and Location Systems
November 3 – 17: Programming
November 17 – December 1: Tweaking Systems
December 1 – 6: Troubleshooting

Resource List:
I will need to learn how to cast silicon. Also I have to improve my gesture recognition program. I will need to figure out how the objects will know the distance from each other.

To build it physically I will need casting material, accelerometers, Arduino minis, some communication device (Bluetooth or other), and different resistors.