|
![](/i/fill.gif) |
Josh English wrote:
> I thought of playing with a 2d array, but I've got this tied in with my
> multispline.inc whenever I use it. How did you lock the points? I can
> only see the third array solution.
>
> Josh
My array went something like this...
#declare StringArray = array[n][9]
where n was the number of points in the string. Then...
#declare StringArray[i][0] = px;
#declare StringArray[i][1] = py;
#declare StringArray[i][2] = pz;
#declare StringArray[i][3] = vx;
#declare StringArray[i][4] = vy;
#declare StringArray[i][5] = vz;
#declare StringArray[i][6] = cx;
#declare StringArray[i][7] = cy;
#declare StringArray[i][8] = cz;
where px, py and pz is the position of the ith point,
vx, vy and vz is the velocity of the ith point,
and cx, cy and cz is the constraint constant of the ith point (usually only 1 for free
moving points, and 0 for fixed or locked points).
Three arrays in one :-)
MJL
--
light_source{12*(y-z)rgb 2fade_distance 9fade_power 2area_light x,z,5,5}#macro A
(H,B,R,T)prism{0,1H+4,0u*9,9v*9,0#local I=1;#while(I<H)#local V=asc(substr(B,I,1
))-33;<div(V,10)mod(V,10)>#local I=I+1;#end pigment{red 1}rotate-<90,R>translate
-T}#end A(16"/.@VZno=<PLA89/"0,5*x)A(14",6;MWmhryXN3,"60<15,0,8>)camera{location
25*(y-z)look_at 0}A(8"6hiAG=6"-60,-10*x)box{-99(x+z)*99 pigment{rgb 1}} // MJL
Post a reply to this message
|
![](/i/fill.gif) |