Gilles SAVIGNAC LEMONNIER
Objet: Dès de jeu à n faces
Fonction: Permet de tirer aléatoirement un nombre ou un symbole parmi n possibilités
code:
module face(){
polyhedron(
points=[ [10,10,0],[10,-10,0],[-10,-10,0],[-10,10,0],
[0,0,10] ],
faces=[ [0,1,4],[1,2,4],[2,3,4],[3,0,4],[1,0,3],[2,1,3] ]
);
}
face();
rotate([180,0,0]){face();};
Objet: une boule emprisonnée dans une sphère
Code:
$fn=200;
100;
module de(){
intersection(){
sphere(7.5);
cube(10,true);
};
};
module chiffres(){
rotate([360,$t*360,360]) translate([20,$t*20,0,0,0]) cube(10);
difference(){
sphere(r=10);
translate([0,0,-2]4]) linear_extrude(4,true)height=2)
square(18,true)text("1",size=5, halign = "center", valign = "center");
rotate([0,45,180,0]) cube(10,true)translate([0,0,4]) linear_extrude(height=2)
text("6",size=5, halign = "center", valign = "center");
rotate([90,0,0])
translate([0,0,4]) linear_extrude(height=2)
text("2",size=5, halign = "center", valign = "center");
rotate([-90,0,0]) translate([0,0,4]) linear_extrude(height=2)
text("5",size=5, halign = "center", valign = "center");
rotate([0,-90,0]) translate([0,0,4]) linear_extrude(height=2)
text("3",size=5, halign = "center", valign = "center");
rotate([0,90,0]) translate([0,0,4]) linear_extrude(height=2)
text("4",size=5, halign = "center", valign = "center");
}
difference(){
de();
chiffres();
};
sphere(4,true);