On Sat, 29 Sep 2001 16:24:20 +0200, Martial wrote:
>in array.inc
>//--------------------------------------
>#macro Reverse_Array(Array)
> #local J = 0;
#local N = dimension_size(Array, 1) - 1; // <-- better correction
> #while(J < floor(N/2))
> #local Temp = Array[J]
> #local Array[J] = Array[N-J]
> #local Array[N-J] = Temp
> #local J = J + 1;
> #end
>#end
--
#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{rgbf 1}hollow interior{media{emission 3-T}}}#end
Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}
Post a reply to this message
|