===== Diamant en direction [001] ===== [[wiki:projets:moleculesandcristaux |retour]] r1=9; r2=3; a=20; h1=2*a; h2=15; color("red") translate([a/2,-a/2,a/2]) rotate([0,0,45]) rotate([50,0,0]) cylinder(r=r2, h=h2); color("red") translate([-a/2,a/2,a/2]) rotate([0,0,45]) rotate([50,0,0]) cylinder(r=r2, h=h2); color("red") translate([a/2,-a/2,a/2]) rotate([0,0,225]) rotate([50,0,0]) cylinder(r=r2, h=h2); color("red") translate([-a/2,a/2,a/2]) rotate([0,0,225]) rotate([50,0,0]) cylinder(r=r2, h=h2); color("red") translate([a/2,a/2,-a/2]) rotate([0,0,45]) rotate([50,0,0]) cylinder(r=r2, h=h2); color("red") translate([a/2,a/2,-a/2]) rotate([0,0,225]) rotate([50,0,0]) cylinder(r=r2, h=h2); color("red") translate([-a/2,-a/2,-a/2]) rotate([0,0,225]) rotate([50,0,0]) cylinder(r=r2, h=h2); color("red") translate([-a/2,-a/2,-a/2]) rotate([0,0,45]) rotate([50,0,0]) cylinder(r=r2, h=h2); color("red") translate([0,0,-a]) rotate([0,0,45]) rotate([0,-55,0]) cylinder(r=r2, h=h2); color("red") translate([a,a,-a]) rotate([0,0,45]) rotate([0,-55,0]) cylinder(r=r2, h=h2); color("red") translate([a,0,0]) rotate([0,0,45]) rotate([0,-55,0]) cylinder(r=r2, h=h2); color("red") translate([0,a,0]) rotate([0,0,45]) rotate([0,-55,0]) cylinder(r=r2, h=h2); color("red") translate([-a,-a,-a]) rotate([0,0,-135]) rotate([0,-55,0]) cylinder(r=r2, h=h2); color("red") translate([0,0,-a]) rotate([0,0,-135]) rotate([0,-55,0]) cylinder(r=r2, h=h2); color("red") translate([-a,0,0]) rotate([0,0,-135]) rotate([0,-55,0]) cylinder(r=r2, h=h2); color("red") translate([0,-a,0]) rotate([0,0,-135]) rotate([0,-55,0]) cylinder(r=r2, h=h2); color("cyan") translate([-a,-a,-a]) cylinder(r=r2,h=h1); color("cyan") translate([a,-a,-a]) cylinder(r=r2,h=h1); color("cyan") translate([-a,a,-a]) cylinder(r=r2,h=h1); color("cyan") translate([a,a,-a]) cylinder(r=r2,h=h1); color("cyan") rotate([90,0,0]) translate([-a,-a,-a]) cylinder(r=r2,h=h1); color("cyan") rotate([90,0,0]) translate([a,-a,-a]) cylinder(r=r2,h=h1); color("cyan") rotate([90,0,0]) translate([-a,a,-a]) cylinder(r=r2,h=h1); color("cyan") rotate([90,0,0]) translate([-a,-a,-a]) cylinder(r=r2,h=h1); color("cyan") rotate([90,0,0]) translate([a,a,-a]) cylinder(r=r2,h=h1); color("cyan") rotate([0,90,0]) translate([-a,-a,-a]) cylinder(r=r2,h=h1); color("cyan") rotate([0,90,0]) translate([a,-a,-a]) cylinder(r=r2,h=h1); color("cyan") rotate([0,90,0]) translate([-a,a,-a]) cylinder(r=r2,h=h1); color("cyan") rotate([0,90,0]) translate([a,a,-a]) cylinder(r=r2,h=h1); color("cyan") translate([a,-a,a]) sphere(r1); color("cyan") translate([-a,a,a]) sphere(r1); color("cyan") translate([a,a,-a]) sphere(r1); color("cyan") translate([-a,a,-a]) sphere(r1); color("cyan") translate([a,-a,-a]) sphere(r1); color("cyan") translate([-a,a,-a]) sphere(r1); color("cyan") translate([-a,-a,a]) sphere(r1); color("cyan") translate([0,a,0]) sphere(r1); color("cyan") translate([0,0,a]) sphere(r1); color("cyan") translate([a,0,0]) sphere(r1); color("cyan") translate([a,-a,a]) sphere(r1); translate([0,0,-a]) for( i=[0:1]) { if(i==0){ color("cyan") sphere(r=r1); } else { color("red") translate([a/2,a/2,a/2]) sphere(r=r1); } } translate([-a,-a,-a]) for( i=[0:1]) { if(i==0){ color("cyan") sphere(r=r1); } else { color("red") translate([a/2,a/2,a/2]) sphere(r=r1); } } translate([a,a,a]) for( i=[0:1]) { if(i==0){ color("cyan") sphere(r=r1); } } translate([-a,0,0]) for( i=[0:1]) { if(i==0){ color("cyan") sphere(r=r1); } else { color("red") translate([a/2,a/2,a/2]) sphere(r=r1); } } translate([0,-a,0]) for( i=[0:1]) { if(i==0){ color("cyan") sphere(r=r1); } else { color("red") translate([a/2,a/2,a/2]) sphere(r=r1); } }