POV-Ray : Newsgroups : povray.beta-test : spline & macro : Re: spline & macro Server Time
5 Nov 2024 01:24:12 EST (-0500)
  Re: spline & macro  
From: Ben Chambers
Date: 14 Sep 2001 12:01:28
Message: <3ba229d8@news.povray.org>
"Mark Wagner" <mar### [at] gtenet> wrote in message
news:3b9ee189@news.povray.org...
> Would it also be possible to fix things so that a spline will return a 3D
> vector under normal circumstances, but a 5D vector when used in a color?
> The spline interpolation code is quite capable of working with 5D vectors.
>
> --
> Mark

Perhaps it would be better to implement this as a macro, ie,

#macro Spline_Cubic(a,b,c,d,t)
 #declare a = a+(b-a)*t;
 #declare b = b+(c-b)*t;
 #declare c = c+(d-c)*t;
 #declare a = a+(b-a)*t;
 #declare b = b+(c-b)*t;
 #declare a = a+(b-a)*t;
 a
#end

This way, it could work with any size vectors.  IIRC, several "features" are
now being included as macros, both for their versatility and the ease of
changing them; this wouldn't be too great an addition, I believe.

...Chambers


Post a reply to this message

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