POV-Ray : Newsgroups : povray.newusers : Spline as a function Server Time
25 Nov 2024 22:53:47 EST (-0500)
  Spline as a function (Message 1 to 3 of 3)  
From: Oleguer Vilella
Subject: Spline as a function
Date: 11 Feb 2005 05:30:28
Message: <420c8944@news.povray.org>
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;
======================================

Thanks in advance,
Oleguer


Post a reply to this message

From: Mike Williams
Subject: Re: Spline as a function
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

From: Oleguer Vilella
Subject: Re: Spline as a function
Date: 11 Feb 2005 10:52:30
Message: <420cd4be$1@news.povray.org>
Thanks again Mike.

Yeah, I'm sorry, I've forgotten to put "3*sin" and to put at the end "}".
Your solution:
=======================================
#declare F6 = function { F4(x,y,z)*F5(x,y,z) }
=======================================
It sounds great.

I will play with the splines examples and I will post my questions later.

Regards,
Oleguer






news:nND### [at] econymdemoncouk...
> 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.