POV-Ray : Newsgroups : povray.general : Array? : Re: Array? Server Time
10 Aug 2024 03:17:16 EDT (-0400)
  Re: Array?  
From: Chris Colefax
Date: 12 Mar 2000 17:29:46
Message: <38cc1a5a@news.povray.org>
Bill DeWitt <the### [at] earthlinknet> wrote:
>     I should probably explain more. I was using this to preload an array
for
> Chris Colfax's spline include, and I got to the point of wondering why, if
I
> was going to use a formula for filling the spline macro, didn't I just use
> the formula to position the object?
>
>     The answer is, of course, at my level of knowledge, that there -is- no
> reason not to... unless there was something I could learn that might give
me
> a reason.
>
>     Otherwise I will just use the macro to make splines points that cannot
> be gotten by simple formulas.

If your formula is time-dependent then you should probably use it
explicitly, e.g.:

   object {MyObject
      translate <sin(4*pi*clock), cos(16*pi*clock), pow(clock, 2)>*<3, 1,
10>
      }

However, what this doesn't give you is the automatic direction changes and
banking that the Spline Macros calculate.  I do have the workings of a
POV-Ray Motion System that will operate in a similar way to the spline
macros, but allow other mathematically defined paths (and path modifiers),
e.g. you could specify a spline, to which you could add a loop, and a wave,
or an orbit with a bounce, or a spiral with a twist, or a combination of the
whole lot!

For irregular paths, though, I still believe that cubic interpolating
splines are the most suitable option, and the methods Margus and Ken
provided should work fine (particularly, say, when you want a mathematical
path which you want to make irregular by adding random amounts to certain
points, without having the path jump about randomly).


Post a reply to this message

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