POV-Ray : Newsgroups : povray.binaries.animations : Submarine with spherical iris (264 kb) : Re: Submarine with spherical iris (264 kb) Server Time
2 Nov 2024 11:26:27 EDT (-0400)
  Re: Submarine with spherical iris (264 kb)  
From: Bryan Valencia
Date: 28 Feb 2002 19:43:08
Message: <3C7ECEB8.E49A3B4F@209software.com>
#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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.