|
![](/i/fill.gif) |
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?
I think the #declare is to blame, but it is also what makes it work...catch
22?
It is terribly annoying.
#declare Sp = 60;
#macro randVector(ctr,Min,Max,Method)
#local i=0;
#while (i<ctr)
#switch (Method)
#case (0)
#declare randVectArray[i] = <RRand(RsA, Min, Max),RRand(RsA, Min,
Max),RRand(RsA, Min, Max)>;
#break
#case (1)
#declare randVectArray[i] = <sin(RRand(RsA, Min, Max)),RRand(RsA, Min,
Max),tan(RRand(RsA, Min, Max))>;
#break
#case (2)
#declare randVectArray[i] = <sin(RRand(RsA, Min, Max)),atanh(RRand(RsA,
Min, Max)),tan(RRand(RsA, Min, Max))>;
#break
#case (3)
#declare randVectArray[i] = <asin(RRand(RsA, Min, Max)),atanh(RRand(RsA,
Min, Max)),tan(RRand(RsA, Min, Max))>;
#break
#case (4)
#declare randVectArray[i] = <acosh(RRand(RsA, Min,
Max)),asinh(RRand(RsA, Min, Max)),tan(RRand(RsA, Min, Max))>;
#break
#case (5)
#declare randVectArray[i] = <cos(i),i,sin(i)>;
#break
#end
#set i=i+1;
#end
#end
#declare randVectArray = array [Sp];
thanks!
ian
Post a reply to this message
|
![](/i/fill.gif) |