Rainbowleidoscope: A Rainbowduino Kaliedoscope

[size=200]Rainbowleidoscope: A Rainbowduino Kaliedoscope
[/size]
by blue.zener

[size=150]Introduction[/size]

In my family the stock response whenever something couldn’t be readily explained was always “they do it with mirrors”.

Owning just one Rainbowduino and pondering over just how to get the most out of it, it occurred to me that it was possible to give the effect of having many Rainbowduinos. How? By using mirrors of course.

It then occurred to me that what, in effect, I would produce is a kaleidoscope. These classic children’s toys employ a couple of mirrors to reproduce a pattern many times over. The pattern itself is made up of coloured glass beads, or some such, filtering the ambient white light. By rotating the kaleidoscope, the beads rearrange and a new and colourful pattern is produced.

The difference between the classic kaleidoscope and mine would be that a Rainbowduino would replace glass beads. By making the Rainbowduino cycle through the full gamut of beautiful colours, in beautiful arrangements of patterns it would be possible to simulate the glass beads. So far as I can tell, this is an original idea (if such a thing is possible) – a quick google search reveals that no one has documented a LED matrix kaleidoscope (till now).

To produce interesting patterns I implemented Conway’s Game of Life on the Rainbowduino. Most of the time the game is short lived on the small 8x8 playing field of the Rainbowduino. Sometimes, however a Glider or a Pulsar-type pattern will be seen. It is the possibility of seeing one of these explode into life on the kaleidoscope that makes looking into it quite addictive. To cycle through a range of appealing colours, I use a lookup table that contains the RGB values for 64 hues in the HSV colourspace (see below for full details).

My Rainbowduino kaleidoscope has two modes of operation, selected by a single momentary switch. If the switch is not pressed when power is applied to the Rainbowduino, the kaleidocope simply shows a test pattern (Figure 1). This is really handy for testing that everything is connected OK. It will continue to show the test pattern until the switch is pressed. Once the switch is pressed, the Rainbowduino enters “random mode” in which Conway’s Game of Life is played over and over using a (pseudo-)randomized initial state each time. The instant at which the switch is pressed is used to generate a seed that improves the randomness of the numbers.

If, on the other hand, the switch is pressed when power is applied, the kaleidoscope enters “canned life” mode in which the Game of Life is played from a number of starting conditions that generate interesting patterns, such as Blinkers, Toads, Gliders and F-Pentamentos.

Watch the Kaleidoscope in action (Vimeo).
241143D3-D59D-4179-B313-42F31F45FD31.jpg

[size=150]http://www.vimeo.com/6698161[/size]

Tutorial download here

Source code download
kaleidoscope_v1.zip (45.7 KB)

I love the “Game-Of-Life” sketch running on the rainbow. Fascinating to watch

Cheers!

I think that the full colour Rainbowduino opens up some exciting possibilities for the game of life.

How good would it be to have a huge array of Rainbowduino’s playing life together?!

blue.zener