Zombie

Voici le code pour le zombie :

function main(){
    return tout().scale(2.2,2.2,2.2).rotateX(-90); 
}
 
function tout(){
    return difference (corps(),
    oeil());
}
 
function corps() {
   return union (cube({size: [4,2,12]}),
   union (bras(),
   tete ()));
}
 
function bras() {
    return union(cube ({size: [2,2,6]}).translate([4,10,-2]).rotateX(90),
    cube ({size: [2,2,6]}).translate([-2,10,-2]).rotateX(90));
}
 
function tete(){
    return cube ({size: [4,3,4]}).translate([0,-1,12]);
}
 
function oeil(){ 
    return union (cube ({size:[0.8,0.5,0.5]}).translate([0.5,-1,13.7]),
     cube ({size:[0.8,0.5,0.5]}).translate([2.5,-1,13.7]));
 
}