POV-Ray : Newsgroups : povray.binaries.animations : 2 Opal rings : Re: 2 Opal rings Server Time
2 Jul 2024 02:55:01 EDT (-0400)
  Re: 2 Opal rings  
From: Stephen
Date: 25 Feb 2007 23:59:14
Message: <94q4u2lgc1q6qvvb27qli21ees68imnnhp@4ax.com>
On Sun, 25 Feb 2007 21:35:41 -0000, "St." <dot### [at] dotcom> wrote:

>
>  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?

You could also use the switch directive. To start off with keep the debug
statement in. In fact it is good practice to use debug in animations especially
when scenes get complicated. Debug and concat are your friends :-). 

#switch (clock)
    #range(0,0.2) 
    #debug "Range A"
light_source {
  <0, 0, 0>  color rgb <1, 1, 1>  // White light
  translate <-30, 30, -30>
}
        #break

    #range(0.2,0.4)  
    #debug "Range B"
light_source {
  <0, 0, 0>  color rgb <1, 0,0>  // Red light
  translate <-30, 30, -30>
}
        #break

    #range(0.4,0.6)  
    #debug "Range C"
light_source {
  <0, 0, 0>  color rgb <0, 1,0>  // Green light
  translate <-30, 30, -30>
}
        #break

    #range(0.6,0.8)  
    #debug "Range D"
light_source {
  <0, 0, 0>  color rgb <0, 0,1>  // Blue light
  translate <-30, 30, -30>
}
        #break

    #range(0.8,1)  
    #debug "Range E"
light_source {
  <0, 0, 0>  color rgb <0, 0,0>  // Blue light
  translate <-30, 30, -30>
}
        #break

#end

Regards
	Stephen


Post a reply to this message

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