ネギの各部の形状を定義します。
//**********************************************************************************
#local Ls=100; #local Tr=60; #local Lr=6; #local Ld=100;
#local Leek_org1 =
union {
cone { -Ls*y Lr, 2.5*Ls/4*y Lr-1.1 }
torus { Tr,Lr
clipped_by { plane { z, 0 } }
clipped_by { plane { -z, 0 } rotate 30*y }
translate -Tr*x rotate -90*x translate -Ls*y }
}
#local Leek_org2 = cone { 2.5*Ls/4*y Lr-1.1, 1.2*Ls*y Lr-1.2 }
#local Leek_org3 = cone { 0*y Lr-1.2, (Ld+16)*y 6 translate Ls*y }
#local Tr=Tr/8; #local dW=2;
#local Leek_org4 =
union {
torus { Tr,2*Lr/3
clipped_by { plane { -z, 0 } }
clipped_by { plane { z, 0 } rotate 90*y }
translate Tr*x rotate -90*x }
torus { Tr,2*Lr/3
clipped_by { plane { z, 0 } }
clipped_by { plane { -z, 0 } rotate 90*y }
rotate -90*x translate < Tr/2-dW, 2*Tr, 0 > }
cone { 0*y 2*Lr/3, 10*y 3*Lr/4 translate < 2*Tr-Tr/2-dW, 2*Tr, 0 > }
translate < 2, Ls-16, 0 > }
#local Leek_org5 = cone { 0*y 2*Lr/3, (Ld+6)*y 6 translate < 2*Tr-1-dW, Ls+9, 0 > }
#local Leek_org6 = object { Leek_org4 rotate 180*y translate < dW, 6, 0 > }
#local Leek_org7 = cone { 0*y 2*Lr/3, Ld*y 6 translate < dW-(2*Tr-4), Ls+9+6, 0 > }
//**********************************************************************************