Tuesday, June 27, 2017

Light Play With LightLogo

I've been admiring the work the Tinkerers at The Exploratorium have been doing with light. They've developed an amazing and rich environment for creating moving light and shadow compositions in which fading lights of different colors cast shadows of objects arranged on a slowly rotating turntable. The displays of moving and overlapping shapes on the white scrim are mesmerizing.
One thing I like about this creative environment is the simultaneous spatial contexts the creators are working in as they develop compositions. The 2-dimensional result playing on the scrim is a result of a complex spatial arrangement of lights and objects, highlighted by the interplay of the different light colors used.
I set up a version of this in a very small and quick to implement scenario using a NeoPixel ring and LightLogo for kids to explore in a short STEM camp session. I created 3 LightLogo programs for the kids to try out as the light source, had them look for objects in the classroom for casting the shadows, and use their white dry erase boards for the projection surface. They started with a program for one spinning light that would change to a random color each time they reset the program by pushing the reset button on the Arduino, then swapped out a 2-color program, then 3-color, then I quickly coded up a 6-color program to push it over the top at the end. In each program, the lights slowly spin around the ring changing the direction of the light source, causing the light shadows to revolve around each other and overlap, causing some wonderful and unexpected effects.
This video of my testing shows what the light sources looks like and the resulting light shadows they create.

Here is the LightLogo code for the 3-color program. To change it for any other number of lights, add or delete every numbered variable declaration and assignment.

global [pos1, pos2, pos3, color1, color2, color3]
to startup
setbrightness 99
;change these positions to equally distribute around the 24 neopixels...or not!
setpos1 0
setpos2 8
setpos3 16

setcolor1 random 0 99
setcolor2 random 0 99
setcolor3 random 0 99

loop [
setc color1 setpos pos1 stamp
setc color2 setpos pos2 stamp
setc color3 setpos pos3 stamp wait 100
setpos1 pos1 + 1
setpos2 pos2 + 1
setpos3 pos3 + 1
Here are some of the results of the kids' light play:

No comments :