Red Echo

June 27, 2010

Done with the bloom lights!

I got cracking on the bloom light firmware Friday evening, thinking with my usual optimism that I’d be done by one or two. Things happened, and there were problems, and I solved them, and it was 5:30 AM when I finally went to bed.

The part I’m happiest with is the HSV-to-hexachrome algorithm. HSV (and HSL) are basically alternate representations for what is fundamentally an RGB color space, and all the descriptions and code samples available discuss the conversion from HSV to RGB and back. The bloom lights do include red, green, and blue channels, but they also have orange, yellow, and purple. I was sure that there was some way to generalize the transformation so I could use six channels instead of three, but I found no references to anyone having done such a thing before, and certainly no code samples or theoretical explanations that might help me understand how it might be done.

I ended up starting from scratch and working out a general way to map a color in the HSV space onto an arbitrary point on the color spectrum, yielding a power level. (This differs from the standard algorithm’s approach, which computes three values, then assigns them to either R, G, or B depending on the hue position.) Transforming HSV to ROYGBV is simply a matter of computing this formula once per channel – this would work just as well for RYGB or any other combination of wavelengths.

Given this platform, the animation algorithm computes a series of evolving waveforms; the architecture is of course reminiscent of Starfish (or more precisely its animation-oriented descendant Cuttlefish). Each light’s activity level ebbs and flows; it’ll make subtle shifts, building up to a frenzy of activity, then settle back down again into some new state.

There was a fair bit of additional finish work to do, which I tackled in small bursts between other errands, and I finally dropped off the completed bloom lights at ten last night. It feels great to have them done – and it’s not even July! I usually spend July and August in a frenzy of activity, trying to finish up whatever my year’s big art project is going to be… but this year, since I’m skipping Burning Man, I’m done early. I wonder what a normal summer is like?

p.s. Sorry, I don’t have any pictures. I was in too much of a rush. I’ll have some pictures after next weekend, since they’ll be on display as part of Eva’s flowers project at Barry & Maja’s wedding.

4 Comments

  1. The only thing I understood in this entire post was the part about Starfish.

    Comment by Sara — June 30, 2010 @ 4:26 pm

  2. well, what can I say? this is the kind of thing that gets me excited, and all I can do is hope that someone out there also finds it interesting!

    I’ll see the finished flowers tonight – looking forward to finding out how it all comes together.

    Comment by Mars Saxman — July 3, 2010 @ 9:15 am

  3. Can you post photos soon? I’m really curious. Or bring some to pool?

    Comment by Dana — July 8, 2010 @ 3:10 pm

  4. I’m afraid I don’t have any good photos yet – my camera battery died early on Saturday and I never got a chance to photograph the lights in action. Eva went straight down from the wedding to Oregon Country Fair, so I will have to wait til she gets back to try again. Possibly other people got some photos, but I haven’t seen them yet.

    Comment by Mars Saxman — July 8, 2010 @ 7:44 pm