|
![](/i/fill.gif) |
Ahhh...
That makes sense, now that I see it.
Would one be able to pass signs (+ - / *), isosurface function names and
things like atan and sin in some manner as that as well?
I've been trying to do something like this: (pardon the crapcode)
#macro isoFunction(operator, funcName, xVal, yVal, zVal, P0, P1, P2, P3, P4,
P5, P6)
#local isoFunc = function {operator((funcName(xVal*x, xVal*y, zVal*z))};
isoFunc(x,y,z)
#end
#declare foo = isoFunction(x+,f_noise3d,5,5,0.1,0,0,0,0,0,0);
No joy obviously.
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
Thanks!
ian
"Christian Froeschlin" <chr### [at] chrfr de> wrote in message
news:49984095@news.povray.org...
> [GDS|Entropy] wrote:
>> I have the following macro, but I can't call multiple instances of it
>> without overriding the previous values...how can I rewrite this macro to
>> fix this?
>
> Try something like this:
>
> #macro Fill(A,N)
> #local i = 0;
> #while (i < N)
> #declare A[i] = i;
> #local i = i + 1;
> #end
> #end
>
> #declare Sp = 60;
> #declare randVectArray = array[Sp];
> Fill(randVectArray, Sp)
>
> #declare Sp2 = 50;
> #declare randVectArray2 = array[Sp2];
> Fill(randVectArray2, Sp2)
>
Post a reply to this message
|
![](/i/fill.gif) |