POV-Ray : Newsgroups : povray.advanced-users : Problems with splines : Re: Problems with splines Server Time
3 Jul 2024 06:23:45 EDT (-0400)
  Re: Problems with splines  
From: SvenM
Date: 27 May 2008 15:20:00
Message: <web.483c5e2a4798a3da257872660@news.povray.org>
> Hi,
>    Functions are restricted to what they can have inside of them, as
> they are able to be evaluated at render time.  However, I believe
> there's an easy fix for you.  Try creating a function from your spline
> and call that instead:
>
> #declare SPL_F =
>    function {
>      spline { SPL }
>    }
>
> or
>
> #declare SPL_F =
>    function {
>      spline {
>        cubic_spline
>
>        #declare SPLI=-1/8;
>        #while (SPLI<=1+1/8)
>        SPLI, <sin(2*pi*SPLI),0,cos(2*pi*SPLI)>
>        #declare SPLI=SPLI+1/8;
>        #end
>      }
>    }
>

Thank you very much! It seems to work. IMHO it's a little bit confusing that
function{} doesn't allow to call a spline, but it CAN be a spline itself...

Yours, Sven


Post a reply to this message

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