POV-Ray : Newsgroups : povray.binaries.animations : 2 Opal rings : Re: 2 Opal rings Server Time
2 Jul 2024 03:07:57 EDT (-0400)
  Re: 2 Opal rings  
From: Markus Altendorff
Date: 25 Feb 2007 18:19:04
Message: <45e21968$1@news.povray.org>
St. wrote:
> Ok, thanks Stephen and Markus for putting me on the right track! I now have 
> 24 horses galavanting around my merry-go-round!  :o)
> 
>   So, to the next question; I want to add some lights to the scene, but I 
> want them to be flashing on and off throughout the animation. How do I do 
> this?

I'm no POVer, but i guess after cross-reading

http://www.povray.org/documentation/view/3.6.1/308/

you'd simply use rgb <0.5 + (0.5 * sin(70*clock) ), 0.5 + 
(0.5 * sin(70*clock) ), 0.5 + (0.5 * sin(70*clock) )> as the 
light's color declaration, creating a "soft pulsing" light,
or alternatively something like

  #if ( sin(70*clock) > 0.5 )
light_source {
   <0, 0, 0>
   color rgb<0,0,0>
   translate <-30, 30, -30>
}
  #else
light_source {
   <0, 0, 0>
   color rgb<1,1,1>
   translate <-30, 30, -30>
}
  #end

Not sure if that's the best way to do it, but it worked in 
my first-ever POVray scene :)
It'll result in a lamp that's on/off half of the time. Of 
course, you could just leave out the <0,0,0> lamp.

Flip the value above (from > 0.5 to < 0.5) for a second set 
of lights that are on while the first set is off. Place them 
around the upper rim of the carousel.

-M


Post a reply to this message

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