Spatial Interaction By M贸nica Su谩rez
Electricity Leak Generative Art By Mónica Suárez Design Mónica Suárez Teacher Andrew O’Dowd Prohibida la reproducción total o parcial de los contenidos de esta obra sin citar su origen o sin solicitar una previa autorización expresa para ello, su utilización no autorizada dará lugar a ejercicio de acciones que correspondan. Las ideas expuestas en esta obra son responsabilidad exclusiva de los autores. Processing / Spatial Design EDINBURGH NAPIER UNIVERSITY Edinburgh 28th of October 2013 - 02
PROTOTYTING (2013) ;
TABLE OF CONTENTS () { Brief (6, 9) ; //Assignment requirements Research (10, 13) ; //Investigation of the prescribed space Concept (14, 17) ; //Explanation of the idea Processing (18, 21) ; //Translating the idea into data Code (22, 27) ; //Explanation of the java code Installation (28, 31) ; // Final outcome and the user experience
}
5
BRIEF () {
BRIEF
RESEARCH
CONCEPT
PROCESSING
CODE
INSTALLATION
BRIEF () { Create a generative art installation using Processing Software, in one of the corridors of Merchiston Campus. The design should change peoples experiences within the space. (see photo 1) Besides the installation, a register of the investigation and a relevant concept must be presented, in order to comprenhed the final outcome.
//Diseñar una instalación de arte Generativo, usando Processing Software, en uno de los corredores de Merchiston Campus. El diseño pretende transformar las experiencias de de los usuarios con el espacio. Además de la instalación, debe haber un registro de el proceso investigativo y el concepto, con el fin de comprender la intervención final.
}
8
1. Prescribed space to locate the installation >
PROTOTYTING (2013) ;
1
RESEARCH () {
BRIEF
RESEARCH
CONCEPT
PROCESSING
CODE
INSTALLATION
RESEARCH () { Being the corridor just a place to pass by, the users usually don’t pay a lot of attention in the things that are always there. One example of this situation is the 2 door that communicate the corridor with an electric room. The doors warn the dangers they hold behind, but no one seems to notice them. How to make people aware of them?
//Al ser el corredor un lugar de paso, los usuarios muy pocas veces se detienen a analizar lo que hay en él. Un ejemplo claro de esta condición son 2 puertas que comunican el corredor con un cuarto eléctrico. Las puertas advierten el gran peligro que contienen, sin embargo son ignoradas diariamente por todos.
}
12
2. No one seems to notice the great danger behind the door >
PROTOTYTING (2013) ;
2
13
CONCEPT () {
BRIEF
RESEARCH
CONCEPT
PROCESSING
CODE
INSTALLATION
CONCEPT () { In order to make people notice the doors that communicate the corridor with the electrical room and give them a little fright, an installation that simulates an electricity leak has been created.
//Con la intención de hacer notar las puertas que conducen al cuarto eléctrico y asustar a las personas que usualmente pasan tranquilas, se crea una instalación que simula una fuga eléctrica.
The prototyping will try to imitate the shapes obtained with Tesla’s “Magnifying transmitter”
La instalación burcará reproducir las formas obtenidas con el transmisor eléctrico de Nikola Tesla.
}
16
3. The prototype will imitate Tesla’s electrical shapes >
PROTOTYTING (2013) ;
3
17
PROCESSING () {
BRIEF
RESEARCH
CONCEPT
PROCESSING
CODE
INSTALLATION
PROCESSING () { After having a clear idea of how the installation should look like, a research of similar situations was made to initiate the programming. The first prototype of Esteban Hufstedler, shows a very good example of a lightning storm. This code was used as a support to recreate the concept “Electricity Leak”.
// Luego de tener una idea clara de como debía verse la instalación, se realizó una búsqueda de referentes para la programación. La interacción superior, que simula una tormenta eléctrica, es el lenguaje de soporte para para la fuga eléctrica que se observa en la imagen inferior. El código usado se observa a continuación.
} 4. Referencia:HUFSTEDLER, Esteban. Lightning Storm. [Openprocessing].http://www. openprocessing.org/sketch/2924. [Consulta: 21 de Octubre de 2013] > 20
5. Electricity Leak by Monica Suarez >
PROTOTYTING (2013) ;
4
5
21
CODE () {
BRIEF
RESEARCH
CONCEPT
PROCESSING
CODE
INSTALLATION
CODE () { int Switch = 0; // to make the electric beams straight or curly float maxDTheta = PI/10; float minDTheta = PI/20; float maxTheta = PI/2; // Increase the value to make more electric beams appear float childGenOdds = .008; // to make the electric beams thicker or thinner float minBoltWidth = 3; float maxBoltWidth = 8; // to make the electric beams straighter or curlier float minJumpLength = -2; float maxJumpLength = 15; boolean stormMode = true; // Increase the value to make it slower or faster float maxTimeBetweenStrikes = 100; color boltColor; color skyColor; lightningBolt bolt; float lastStrike = 0; float nextStrikeInNms = 10; boolean useDing = false; boolean fadeStrikes = true;
24
Java Code Electricity Leak >
PROTOTYTING (2013) ;
float meanDistance = 0; void setup() { size(1500, 700); background(0); meanDistance = 10000*.5; boltColor = color(255, 237, 0); skyColor = color(0, 0, 0, 30); background(skyColor); noCursor(); bolt = new lightningBolt(random(0, 1500), 0, random(minBoltWidth, maxBoltWidth), 0, minJumpLength, maxJumpLength, boltColor); } void draw() { if (mousePressed == true) { Switch = 1; // To star the prototype } if (Switch ==1 && stormMode && millis()-lastStrike>nextStrikeInNms) { lastStrike = millis(); nextStrikeInNms = random(0, maxTimeBetweenStrikes); bolt = new lightningBolt(random(0, 1500), 0, random(minBoltWidth, maxBoltWidth), 0, minJumpLength, maxJumpLength, boltColor); bolt.draw(); } else { // To make the beams fade if (fadeStrikes) { noStroke(); fill(skyColor); rect(0, 0, 1500, 700); noFill(); }
25
BRIEF
RESEARCH
}
CONCEPT
PROCESSING
CODE
INSTALLATION
}
int randomSign() { float num = random(-1, 1); if (num==0) return -1; else return (int)(num/abs(num)); } class lightningBolt { float lineWidth0, theta, x0, y0, x1, y1, x2, y2, straightJump, straightJumpMax, straightJumpMin, lineWidth; color myColor; lightningBolt(float x0, float y0, float width0, float theta0, float jumpMin, float jumpMax, color inputColor) { lineWidth0 = width0; lineWidth = width0; theta = theta0; x0 = 0; y0 = 0; x1 = random (0, 1500); // The electric beams can randomly appear in any Xvalue at the top of the screen y1 = 0; x2 = 50; y2 = 50; straightJumpMin = jumpMin; straightJumpMax = jumpMax; myColor = inputColor; } void draw(){ while (y2<700 && (x2>0 && x2<1500)) {
26
Java Code Electricity Leak >
PROTOTYTING (2013) ;
strokeWeight(1); theta += randomSign()*random(minDTheta, maxDTheta); if (theta>maxTheta) theta = maxTheta; if (theta<-maxTheta) theta = -maxTheta; straightJump = random(straightJumpMin, straightJumpMax); x2 = x1-straightJump*cos(theta-HALF_PI); y2 = y1-straightJump*sin(theta-HALF_PI); if (lineWidth<0) lineWidth = 0; stroke(myColor); strokeWeight(lineWidth); line(x1, y1, x2, y2); x1=x2; y1=y2; if (random(0, 2)<childGenOdds) { float newTheta = theta; newTheta += randomSign()*random(minDTheta, maxDTheta); if (theta>maxTheta) theta = maxTheta; if (theta<-maxTheta) theta = -maxTheta; (new lightningBolt(x2, y2, lineWidth, newTheta, straightJumpMin, straightJumpMax, boltColor)).draw(); } } }
}
27
INSTALLATION () {
BRIEF
RESEARCH
CONCEPT
PROCESSING
CODE
INSTALLATION
INSTALLATION () { The proyector is located in the ceiling. The image goes in the floor, next to the door. When the user comes, the beams and electric sound effects are display. People who used to ignore the corridor when they walk through, now get shock at the sight of the Electricity Leak. Who is going to forget the 2 doors after this expirience?
//El proyector se ubica en el techo de modo que la imagen se filtre bajo la puerta. Cuando el usuario se aproxima, además de los rayos, se accionan sonidos eléctricos. Las personas que antes ignoraban el corredor ahora se sorprenden cuando se encuentran con la Fuga Eléctrica. ¿Quien va a olvidar las 2 puertas luego de esta experiencia?
}
30
6. Thanks to the generative art installation people is now aware of the electric room>
PROTOTYTING (2013) ;
6
31
Spatial Interaction By M贸nica Su谩rez