|
![](/i/fill.gif) |
[GDS|Entropy] wrote:
> Would one be able to pass signs (+ - / *)
no
> isosurface function names and
yes (well, the function itself, not the name as string)
#macro DoubleFunc(F)
function {2*F(x,y)}
#end
#declare f = function(x,y){x*y}
#declare f_double = DoubleFunc(f)
> things like atan and sin in some manner as that as well?
sort of - SDL seems to handle the built-in functions
differently from user-defined functions:
#declare atan2_double = DoubleFunc(atan2) // error
#declare atan2_double = DoubleFunc(function(x,y){atan2(x,y)}) // works
> I've been trying to do something like this: (pardon the crapcode)
Yuck ;) Actually I wasn't even sure if you intended
this to return a function or a value.
> You wouldn't happen to know if it is possible to concat strings as variable
> names, would you? #local myObj = concat(obj + i); would be great... :-D
No. "POV-Ray macros are a strange mix of macros and functions",
and yes I'm quoting the documentation ;) But that's beside the
point, you should use an array whenever you even think about
appending an index to a variable name in code.
Post a reply to this message
|
![](/i/fill.gif) |