POV-Ray : Newsgroups : povray.bugreports : Bug in functions (3.7) : Re: Bug in functions (3.7) Server Time
19 May 2024 13:56:02 EDT (-0400)
  Re: Bug in functions (3.7)  
From: Christian Froeschlin
Date: 9 Nov 2008 09:51:51
Message: <4916f907$1@news.povray.org>
Kenneth wrote:

> #local Temp_function_2 = function{Temp_function(x,y,z)}

Thats defining Temp_function_2 to be a function
which just happen to pass its default arguments
x,y,z to Temp_function.

> #local Temp_function_2 = Temp_function(x,y,z);

That attempts to evaluate Temp_function outside a function
context, where x,y,z are not function arguments, but built-in
vectors (coordinate axes).

But not even passing <1,0,0> as

#local Temp_function_2 = Temp_function(x);

works, because the parser wants individual values here.

This actually does something:

#local Temp_function_2 = Temp_function(x.x,x.y,x.z);

;)

> Yet this works (though it probably doesn't mean much)...
> #local Temp_var = <1,1,1>;
> #local Temp_function_3 = Temp_function(Temp_var.x,Temp_var.y,Temp_var.z);

Temp_function_3 is the scalar value returned by Temp_function(1,1,1)

> but this doesn't...
> #local Temp_function_3 =
> function{Temp_function(Temp_var.x,Temp_var.y,Temp_var.z)}

I suppose this is just a limitation in the function parser.
There doesn't seem to be support for vectors in the syntax
for user-defined functions, except for special vector
functions created using transform and spline.


Post a reply to this message

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