On 15/12/14 17:47, Mike Bonner wrote:
ok, so I lied. I keep making adjustments to how the color generation works,
but to get the results I want.. i'm lost again.

Currently, if I want to find "red", I can get a factor for red where
abs(sin((tCurAngle - tColorAngle) * pi / 180))  (cur angle is 0, color
angle is also 0, factor returned is 0)  Then do 255 - (255 * factor) so the
value for red is 255.

But for the other 2 colors, I need to return a factor of 1 so that they are
completely removed so that the primary color is the only one left.   To do
this requires a current angle offset from the designated color angle to be
90 degrees.  So for example, green is 60, to get a factor of 1, the current
angle would have to be 150, and for blue it would have to be 30 on my
imaginary, impossible number circle.

I can fix this by setting my colors to 0, 90, 180. (again, only using half
the circle)  But doing it this way, I end up with grey between cycles, so
there is a nice solid sequence of reds, then grey,then green, then grey,
then blue, repeat.

So, what I need to figure out, is a way to weight things, so that the
closer 1 color gets to 255, then more reduction affect there is on the
other 2 colors.

Any suggestions?



I must be quite stupid as I don't understand what you are trying to convey.

How about moving this discussion to the Forums with some pretty pictures?

Richmond.

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to