LED Cyr wheel: designing patterns
I’ve had to re-remember a lot of old math that I haven’t used since probably sophomore year in high school; my jr year and beyond was all calculus…which is past what I’m doing here (so far).
I ran across Grapher.app on Mac OS X. I haven’t seriously used it before, and usually use my TI85, but I gave it a shot. Oh my gosh; it is amazing! I kept having trouble with a simple x^2 fade in/out equation I was writing. It needed to vary the output value based on: time, number of LEDs per gradient, and the LED position in the strip of LEDs. I wanted the color to ramp from 0 (off) to 1 (the full color), and then ramp back down on each cycle. Vary this over time.
Grapher.app let me add a variable controlled by time to simulate running the pattern and figure out what was wrong. It took me a day to learn the program (it has quarks, and bugs) and remember old-math, but it was worth it!
I took the equation above and converted it to C/C++ code for my app. Awesome.