Voici le code d'un golem de fer :
function main(){ return tout().rotateX(-90); } function tout(){ return pieds(). union (ventre()). union(bras()). union(tete()). subtract(visage()); } function pieds(){ return cube({size:[6,6,15]}). union (cube({size:[6,6,15]}).translate([9,0,0])); } function ventre(){ return cube({size:[10,6,4]}).translate([2.5,0,15]). union (cube({size:[19,9,13]}).translate([-2,-3,18])); } function bras(){ return cube({size:[3.5,5,28]}).translate([-5.5,1,3]). union(cube({size:[3.5,5,28]}).translate([17,1,3])); } function tete(){ return cube({size:[7,9,8]}).translate([4,-3,31]). union(cube({size:[2,2,4]}).translate([6.5,-4,29])); } function visage(){ return cube({size:[1.5,1,1.5]}).translate([5,-3,34]). union(cube({size:[1.5,1,1.5]}).translate([8.5,-3,34])); }