Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
|
ghast [2014/12/08 18:08] niak |
ghast [2017/09/28 15:44] (Version actuelle) |
||
|---|---|---|---|
| Ligne 2: | Ligne 2: | ||
| Voici le code pour un ghast : | Voici le code pour un ghast : | ||
| - | |||
| - | Il faut rajouter de la stabilité et l'agrandir (2*2) | ||
| <code javascript> | <code javascript> | ||
| function main(){ | function main(){ | ||
| + | return tout().scale([1.5,1.5,1.5]); | ||
| + | } | ||
| + | |||
| + | function tout(){ | ||
| return difference (corps(), | return difference (corps(), | ||
| visage()); | visage()); | ||
| Ligne 14: | Ligne 16: | ||
| function corps(){ | function corps(){ | ||
| return union (ventre(), | return union (ventre(), | ||
| - | pieds().rotateX([-15])); | + | pieds().rotateX([-15])). |
| + | subtract(cube_bas()); | ||
| } | } | ||
| Ligne 22: | Ligne 25: | ||
| function pieds_devant(){ | function pieds_devant(){ | ||
| - | return union (cube({size:[2,2,10]}).translate([1,-1,14]), | + | return union (cube({size:[2,2,11]}).translate([1,-1,14]), |
| - | union (cube({size:[2,2,10]}).translate([6,1,14]), | + | union (cube({size:[2,2,11]}).translate([6,-0.5,14]), |
| - | cube({size:[2,2,10]}).translate([11,0,14]))); | + | cube({size:[2,2,11]}).translate([11,-2,14]))); |
| } | } | ||
| function pieds_derriere(){ | function pieds_derriere(){ | ||
| - | return union (cube({size:[2,2,11]}).translate([1,6,14]), | + | return union (cube({size:[2,2,11]}).translate([1,6,16]), |
| - | union (cube({size:[2,2,11]}).translate([6,7,14]), | + | union (cube({size:[2,2,11]}).translate([6,7,16]), |
| - | cube({size:[2,2,11]}).translate([11,7,14]))); | + | cube({size:[2,2,11]}).translate([11,7,16]))); |
| } | } | ||
| Ligne 43: | Ligne 46: | ||
| cube ({size:[4,1,1]}).translate([5.5,0,10]))); | cube ({size:[4,1,1]}).translate([5.5,0,10]))); | ||
| } | } | ||
| + | |||
| + | function cube_bas(){ | ||
| + | return cube({size:[20,20,5]}).translate([0,0,23]); | ||
| + | } | ||
| + | |||
| + | ghast = main; | ||
| </code> | </code> | ||