曲面の3次元CG(5)曲面の合成

https://cdn-ak.f.st-hatena.com/images/fotolife/c/cat_falcon/20190804/20190804222745.jpg

陰関数曲面を使うと合成(論理演算)が行えます。
AND、OR、足し算、引き算が行えるので図のような形状が作れます。スクリプトは次のようになります。
sph="x^2+y^2+z^2-8";
cyl1="(x-10)^2+y^2+z^2-(x-10)^2-2";
cyl2="x^2+(y-10)^2+z^2-(y-10)^2-2";
cyl3="x^2+y^2+(z-10)^2-(z-10)^2-2";

implicitsurfaceList(getstr(sph));
implicitsurfaceListAdd( getstr(cyl1), "or");
implicitsurfaceListAdd( getstr(cyl2), "or");
implicitsurfaceListAdd( getstr(cyl3), "or");
implicitsurface2( "", [-5,-5,-5],[5,5,5],[0.0, 0.0, 0.0], 0.05);
end;

球から円柱を引き算すると
https://cdn-ak.f.st-hatena.com/images/fotolife/c/cat_falcon/20190804/20190804222748.jpg

sph="x^2+y^2+z^2-8";
cyl1="(x-10)^2+y^2+z^2-(x-10)^2-2";
cyl2="x^2+(y-10)^2+z^2-(y-10)^2-2";
cyl3="x^2+y^2+(z-10)^2-(z-10)^2-2";

implicitsurfaceList(getstr(sph));
implicitsurfaceListAdd( getstr(cyl1), "sub");
implicitsurfaceListAdd( getstr(cyl2), "sub");
implicitsurfaceListAdd( getstr(cyl3), "sub");
implicitsurface2( "", [-15,-15,-15],[15,15,15],[0.0, 0.0, 0.0], 0.035);
end;

論理演算には "and" または "or" を指定します。引き算の場合は "sub" を指定します。
また "blob" を指定してBLOBによる造形を行えます。