POV-Ray : Newsgroups : povray.pov4.discussion.general : Impulse-spline Server Time
28 Mar 2024 05:17:19 EDT (-0400)
  Impulse-spline (Message 1 to 1 of 1)  
From: H  Karsten
Subject: Impulse-spline
Date: 11 Aug 2011 18:00:00
Message: <web.4e444fb86c14ad34a3bfeb720@news.povray.org>
The spline-type "impulse" will prevent the user from constructing complex
switch-boxes, like:

 #switch (frame_number)
  #range  (197,324)
   #declare Focus=108;
   #declare Aperture=0.75;
  #break
  #range (325,1000)
   #declare Focus=182;
   #declare Aperture=0.25;
  #break
  #else
   #declare Focus=303;
   #declare Aperture=1.5;
 #end

Instead something like this can be done:

#declare FocusParameter =
    spline {
      impulse_spline
 0,<303,1.5>
 197,<108,0.75>
 325,<182,0.25>
}

With the impulse spline then values of FocusParameter(0) to FocusParameter(196)
will never change and continuously stay at <303,1.5>
Then from FocusParameter(197) to FocusParameter(324) just the same, now the
values will not change as well, being <108,0.75>... and so on

Best rgds,
Holger


Post a reply to this message

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