|
|
On Thu, 27 Sep 2001 18:35:09 +0200, Christoph Hormann wrote:
>
>
>ingo wrote:
>>
>> Ron posted something like this:
>>
>> [...]
>
>Thanks, but i still have problems with things like this:
>
> #macro Foo( Bar, X )
> Bar(n-X)
> #end
>
> #declare FUNC=function(n){n*2}
>
> #declare FUNC2=function(n){ Foo( function(n){FUNC(n)} , 1) }
>
> #debug str(FUNC2(12),5,5)
> #debug "\n"
Not having rendered it, I don't know what problems you have, but another
known bug is that returning a local (including a parameter) from a macro
is bad juju. You might try returning it by way of a global variable.
--
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbt 1}hollow interior{media{emission T}}finish{
reflection.1}}#end Z(-x-x.2y)Z(-x-x.4x)camera{location z*-10rotate x*90}
Post a reply to this message
|
|