|
|
Yeah, it took me a while to figure out that functions you're allowed to use
in functions are different from functions you're allowed to use in macros,
completely, in every case.
There's a list of the functions you *are* allowed to use in functions in
section 6.1.6 "User-Defined Functions" of the docs. (look for
"Float_Function", they're all listed under it.)
In the meantime, just say
#declare veclength = function (x,y,z) {sqrt(x^2+y^2+z^2)}
and then use that.
- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]
"Christoph Hormann" <chr### [at] gmxde> wrote in message
news:3BC721EB.317F3B6A@gmx.de...
>
>
> jan Walzer wrote:
> >
> > the following
> >
> > ----------------------------------------
> > #declare SphereInside=function(x,y,z,p,r) {
> > select( vlength(<x,y,z>-p)-r),
> > [...]
> >
> > how do have to correct this ?
>
> Why do you think vlength() is allowed in user defined functions?
>
>
> > BTW: I also tried it with (sqrt((x-p.x)^2+(y-p.y)^2+(z-p.z)^2+))
> >
>
> This should work if you use floats instead of p.x etc.
>
> Christoph
>
> --
> Christoph Hormann <chr### [at] gmxde>
> IsoWood include, radiosity tutorial, TransSkin and other
> things on: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
|