Week #15 || Interface and Application Programming

 

Software used:

 

 

1. Processing introduction

Like so many other things during Fab Academy, this week introduced an entirely new topic to me: creating software! After an introduction into the many options, and the advice of "if you like Arduino, you'll like Processing", I decided to do the week excersize in Processing.

 

We started with our teacher by taking the C code from Neil, and taking fragments from it and putting it into the fractal tree example in Processing. After setting up the right parameters, we could play with out input sensor and see the live result:

 

 

 

2. ContinuousLines

 

After the introduction, it was up to us to figure out how to continue and what to do with our input sensor. I had made the hello.light.45 in week 11, so I decided to use it for this week as well. I browsed through most of the example codes of Processing to see what I could use as a template. When I opened the Drawing/ContinuousLines sketch, I felt inspired to use this one. I tried writing an 'if' statement, connecting a value from the light sensor input and translating it into a certain line. It worked:

 

 

 

3. if (value >= x) { open cone; }

After having tried the above, I got creative! I thought about creating a line drawing based on the inputs, but first of all I did not want to image map a whole drawing, and second of all, I had a much cooler idea!

At the moment there is nice campain on Kickstarter, to support a movie made by Louie Schwartzberg and Paul Stamets, constisting of timelapse sequences of nature (mainly focused on mycology). The trailer gave me the idea for this weeks excersize:

 

 

4. Coding in Excel; 800 lines of code in 5 minutes

 

I took the short clip of the pine cone opening up, and I used VirtualDub (an open scource free video processor) to turn it into an image sequence. So now I had 191 images, and I want to assign each image to a value of the light sensor. So that means writing 191 'if' statements! I created an excel sheet with the first 'if' statement, and then applied a formula to change the values and the name of the image to be loaded. Then I could simply drag the columns down until it reached 'Cone191.jpg'. And voila, there was my code! After pasting it back into the Processing IDE, I could test how it works, and I was suprised myself about how nice the result was! I put the light sensor in a little box with a lid, so I could change the incoming light smoothly.

 

 

Files

Click here to download the Excel file used for generating the code, and the Processing code file RAR.