|
|
"Josh" <nomail@nomail> wrote:
> Here's my attempt to declare that function in povray, but it won't compile...
"Parse".
> #macro sq(X) X*X #end
And that's why. You can't use a macro in a function. You CAN use a function
in a macro.
> #declare BOX_SHAPE2=
> function(x,y,z,k1,k2,k3)
> {
> #declare q = <abs(x), abs(y), abs(z)>-<k1,k2,k3>;
> sqrt(sq(max(q.x,0))+sq(max(q.y,0))+sq(max(q.z,0)))
>
> }
>
> Josh
I think at this point, with a little experimentation, you can work out why the
above doesn't work.
I'm thinking that there's another, weird way to do this using pigment functions
- then it would be possible to use the dot notation, but the syntax is big,
bulky, and something that I wish could be fixed.
Post a reply to this message
|
|