|
|
#if sin(clock/3)>0
#declare bulbcolor = rgb 0
#else
#declare bulbcolor = rgb<.8,.8,1>
#end
or, alternately,
#declare bulbcolor = rgb sin(clock/3);
The "/3" part may need to be tweaked to make the blinking slower or faster (frames per
blink wise)
the threshold of 0 in the first line makes it so the light will be on half the time
and off half the time, this is called a duty cycle of 50%.
if you to change the duty cycle, then vary the number from -1 to 1 like this;
#if sin(clock/3)>.8 <--mostly off, blinks on very briefly
#if sin(clock/3)>-.3 <--mostly on, blinks off briefly
"Timothy R. Cook" wrote:
> 5 second animation, 30 fps, approx. 22 seconds per frame to render.
> How do I make blinking lights?!
> --
> Tim Cook
> http://empyrean.scifi-fantasy.com
Post a reply to this message
|
|