I hope I can explain this correctly...
A colleague has built a lighting installation. It is basically 24 Rings concentric rings of Led-tape. (5050-type RGB LEDs)
Each whole ring lights with one colour.
Each whole ring is connected to a DMX controller, with 3 Channels (one each for R, G, B)
The DMX controllers take DMX512 and output PWM for the RGB leds.
So any ring, can be any colour. Each ring's colours is 3 channels of DMX, so (24 * 3) = 72 channels of DMX for the whole thing.
This is all controlled by a ATMEGA3208 which outputs the DMX to the controller.
So far so good. This all works great. I wrote the code to output properly framed DMX512 from the ATMEGA.
Refresh rate is about 10 times per second.
Now they wish to choose a starting colour (sent to the ATMEGA over the second UART) and a switch.
When a new start colour is sent, all rings go to that colour immediately. (No problem, already working).
Whenever the switch is pushed the rings of light should change from <starting colour> to white over a few seconds.
But they should not just fade from <starting colour> to white. The colours should ripple from the edge to the centre like ripples on a pond.
Now I'm fine with the electronics and DMX etc, but I'm not a graphics genius, or a gifted mathematician!
So, any suggestions on a good way to achieve this "ripple" effect on the colours?
Should I use a SIN function, or maybe a lookup table?
Should I calculate a basic fade from <starting colour> to white and then iterate over it several times, with some form of transform function to generate the ripple?
How would you achieve it? Any suggestions?