POV-Ray : Newsgroups : povray.newusers : Spline as a function : Re: Spline as a function Server Time
29 Jul 2024 22:31:58 EDT (-0400)
  Re: Spline as a function  
From: Mike Williams
Date: 11 Feb 2005 07:50:09
Message: <nND6sFA8nKDCFwuZ@econym.demon.co.uk>
Wasn't it Oleguer Vilella who wrote:
>Hi all,
>
>I was reading that I can use a spline like a function. Can anyone give me an 
>example?
>It says: SPECIAL_VECTOR_FUNCTION:
>    TRANSFORMATION_BLOCK | SPLINE
>How I have to introduce the spline?
>
>I declare a function like this:
>======================================
>#declare F4 = function { y-(x/3/8)+9-(z/3/8) }
>======================================
>
>Why if I do this the program gives me an error:
>======================================
>#declare F4 = function { y-(x/3/8)+9-(z/3/8) }
>#declare F5 = function { y-cos(x/3/5)-3sin(z/3/8)
>#declare F6 = F5*F6;
>======================================

Examples of spline functions can be found at 

<http://www.econym.demon.co.uk/isotut/more.htm>

Your F4 is OK.

Your F5 needs to say "3*sin" not "3sin" 
        and needs a "}" at the end

I'm not sure what you intended F6 to mean. Perhaps you meant:
    #declare F6 = function {F4(x,y,z)*F5(x,y,z)}


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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