-- Prison my_model(x[3], a[1]) { array p[3], center[3], vertex[3]; --animal -- head center = [0.5, 0.0, 0.0]; p[1] = x[1]/8; p[2] = x[2]/8; p[3] = x[3]/8; hull3 = hfSphere(p,center,0.3); head = hull3; -- body1 center = [-0.55,-0.3,0]; p[1] = x[1]/8; p[2] = x[2]/8; p[3] = x[3]/8; hull1 = hfSphere(p,center,0.4); -- foot center = [0,0,0]; p[1] = x[1]/8; p[2] = x[2]/8; p[3] = x[3]/8; center = [-0.55,-0.6,0.2]; float1 = hfEllipsoid(p,center,0.15,0.5,0.15); center = [-0.55,-0.6,-0.2]; float2 = hfEllipsoid(p,center,0.15,0.5,0.15); float3 = float1 | float2; ffoot = float3 | hull1; --body center = [0.05,-0.3,0]; p[1] = x[1]/8; p[2] = x[2]/8; p[3] = x[3]/8; hull2 = hfSphere(p,center,0.4); -- foot center = [0,0,0]; p[1] = x[1]/8; p[2] = x[2]/8; p[3] = x[3]/8; center = [0.05,-0.6,0.2]; float3 = hfEllipsoid(p,center,0.15,0.5,0.15); center = [0.05,-0.6,-0.2]; float4 = hfEllipsoid(p,center,0.15,0.5,0.15); float5 = float3 | float4; rfoot = float5 | hull2; animal = head | ffoot | rfoot; --prison --yane xt = x[1]; yt = x[2]-14; zt = x[3]; sankaku = (zt+9)&(-zt+9)&(yt+9)&(xt-yt-6)&(-xt-yt-6); --floa p[1] = x[1]+10; p[2] = x[2]+12; p[3] = x[3]+10; vertex=[1.0, 1.0, 1.0]; cube1 = hfblock(p, vertex, 18.0, 1.0, 18.0); --roof p[1] = x[1]+10; p[2] = x[2]-3; p[3] = x[3]+10; vertex=[1.0, 1.0, 1.0]; cube2 = hfblock(p, vertex, 18.0, 1.0, 18.0); --pole xt1 = x[1]; yt1 = x[2]; zt1 = x[3]; cyllinder2 = 1-(x[1]-8.0)^2-(x[3]-8.0)^2; cyllinder3 = 1-(x[1]+8.0)^2-(x[3]-8.0)^2; cyllinder4 = 1-(x[1]-8.0)^2-(x[3]+8.0)^2; cyllinder5 = 1-(x[1]+8.0)^2-(x[3]+8.0)^2; cyllinder6 = 1-(x[1]-8.0)^2-(x[3])^2; cyllinder7 = 1-(x[1]+8.0)^2-(x[3])^2; cyllinder8 = 1-(x[1])^2-(x[3]+8.0)^2; cyllinder9 = 1-(x[1])^2-(x[3]-8.0)^2; huta1=x[2]+10; huta2=-(x[2]-5); pole1 = cyllinder5&huta1&huta2; pole2 = cyllinder4&huta1&huta2; pole3 = cyllinder3&huta1&huta2; pole4 = cyllinder2&huta1&huta2; pole5 = cyllinder6&huta1&huta2; pole6 = cyllinder7&huta1&huta2; pole7 = cyllinder8&huta1&huta2; pole8 = cyllinder9&huta1&huta2; cyllinder1 = pole1 | pole2 | pole3 | pole4; cyllinder2 = pole5 | pole6 | pole7 | pole8; pole = cyllinder1 | cyllinder2; prison = cube1 | cube2 | pole | sankaku; my_model = prison | animal; }