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 | ||
|
sorciere [2014/12/09 19:44] niak |
sorciere [2017/09/28 15:44] (Version actuelle) |
||
|---|---|---|---|
| Ligne 7: | Ligne 7: | ||
| <code javascript> | <code javascript> | ||
| - | |||
| function main(){ | function main(){ | ||
| - | return tout().rotateX(-90); | + | return union( |
| + | tout().rotateX(-90).translate([0,0,6]), | ||
| + | socle().translate([-10,15,0]) | ||
| + | ); | ||
| } | } | ||
| + | |||
| function tout(){ | function tout(){ | ||
| return pieds(). | return pieds(). | ||
| Ligne 22: | Ligne 24: | ||
| } | } | ||
| + | var entrejambe = 5; | ||
| + | |||
| function pieds(){ | function pieds(){ | ||
| return union (cube({size:[3,6,5]}), | return union (cube({size:[3,6,5]}), | ||
| - | cube({size:[3,6,5]}).translate([5,0,0])); | + | cube({size:[3,6,5]}).translate([entrejambe,0,0])); |
| } | } | ||
| Ligne 55: | Ligne 59: | ||
| union(cube({size:[5,4.5,2]}).translate([1.5,1.5,35])). | union(cube({size:[5,4.5,2]}).translate([1.5,1.5,35])). | ||
| union(cube({size:[1,1.5,5]}).rotateY([20]).translate([3,4.5,35])); | union(cube({size:[1,1.5,5]}).rotateY([20]).translate([3,4.5,35])); | ||
| + | } | ||
| + | |||
| + | function socle() { | ||
| + | var trou = cube({size:[3.2,6.2,5], center:true}); | ||
| + | return difference(cylinder({r: 7.5, h: 2.5}), | ||
| + | union(trou.translate([-entrejambe/2,0,0]), trou.translate([entrejambe/2, 0, 0])) | ||
| + | ); | ||
| } | } | ||
| </code> | </code> | ||