Outils pour utilisateurs

Outils du site


steve

Steve

Voici le code pour Steve :

function main(){
    return tout().scale(2,2,2).rotateX(-90);
}
 
function tout(){
    return difference (union(corps(),
    croix()),
    visage());
}
 
function corps() {
   return union (torse(),
   union (bras(),
   tete ()));
}
 
function bras() {
    return difference(union(cube ({size: [2,2,6]}).translate([4,0,6]),
    cube ({size: [2,2,6]}).translate([-2,0,6])),
    aisselles());
}
 
function tete(){
    return cube ({size: [4.4,3,4]}).translate([-0.2,-1,12]);
}
 
function oeil(){ 
    return union (cube ({size:[1,0.5,0.5]}).translate([0.5,-1,14]),
     cube ({size:[1,0.5,0.5]}).translate([2.6,-1,14]));
     }
 
function jambes(){
    return union(cube({size:[2,2,6]}).translate([-0.2,0,0]),
    cube({size:[2,2,6]}).translate([2.2,0,0]));
    }
 
function ventre(){
    return cube({size:[4.4,2,6]}).translate([-0.2,0,6]);
}
 
function torse(){
    return union(jambes(),
    ventre());
}
 
function aisselles(){
    return union(cube({size:[0.5,2,4]}).translate([-0.5,0,6]),
    cube({size:[0.5,2,4]}).translate([4,0,6]));
}
 
function bouche(){
    return union (cube({size:[2,1,0.5]}).translate([1,-1,12.5]),
    union (cube({size:[0.5,1,0.5]}).translate([0.7,-1,13])),
    cube({size:[0.5,1,0.5]}).translate([2.8,-1,13]));
}
 
function visage(){
    return union(oeil(),
    bouche());
}
 
function croix(){
    return union (cube ({size:[0.5,1,4]}).translate([1.75,1,15]),
    cube ({size:[2.5,1,0.5]}).translate([0.75,1,17.5]));
}
 
steve = main;
steve.txt · Dernière modification: 2017/09/28 15:44 (modification externe)