All,
I looked at the example on the Mathematica Website with the Carbon Diamond Lattice. Example I am referring to
I am wondering is there a way to highlight an individual plane such as the 111 or 110 plane? I like the example I am just not sure of my orientation.
Cheers, BEn
Code:
Manipulate[
tet = PolyhedronData["Tetrahedron", "Faces"];
tetv = PolyhedronData["Tetrahedron", "VertexCoordinates"];
sp = {RGBColor[1, 1, 0.3], Sphere[{0, 0, 0}, sizes]};
bar1 = {RGBColor[0.2, 1, 1],
Cylinder[{{0, 0, 0}, {0, 0, Sqrt[2/3] - 1/(2 Sqrt[6])}}, sizec]};
bar2 = {RGBColor[0.3, 1, 1],
Cylinder[{{0, 0, 0}, {-(1/(2 Sqrt[3])), -(1/2), -(1/(2 Sqrt[6]))}},
sizec]};
bar3 = {RGBColor[0.4, 1, 1],
Cylinder[{{0, 0, 0}, {-(1/(2 Sqrt[3])), 1/2, -(1/(2 Sqrt[6]))}},
sizec]};
bar4 = {RGBColor[0.5, 1, 1],
Cylinder[{{0, 0, 0}, {1/Sqrt[3], 0, -(1/(2 Sqrt[6]))}}, sizec]};
sp4 = Map[Translate[sp, #] &, tetv];
base = {bar4, bar3, bar2, bar1, sp4, sp, If[tets, tet, {}]};
dia = Rotate[
Rotate[Map[Translate[base, #] &, tetv], -Cos[Sqrt[3]/3/2], {0, 1,
0}], Pi/4, {0, 0, 1}];
cub = If[cubs,
Scale[PolyhedronData["Cube", "Edges"],
Sqrt[2] {1, 1, 1}, {0, 0, 0}], {}];
diax = Table[Translate[{dia, cub}, {i Sqrt[2], 0, 0}], {i, n}];
diay = Table[Translate[{dia, cub, diax}, {0, i Sqrt[2], 0}], {i, n}];
diaz = Table[
Translate[{dia, cub, diax, diay}, {0, 0, i Sqrt[2]}], {i, n}];
Graphics3D[{dia, cub, diax, diay, diaz}, Boxed -> False,
SphericalRegion -> True, ImageSize -> 380],
{{n, 0, "frequency"}, 0, 2, 1, RadioButton},
{{sizec, 0.025, "cylinder size"}, 0, 0.5},
{{sizes, 0.1, "sphere size"}, 0, 0.5},
{{tets, False, "show tetrahedra"}, {True, False}},
{{cubs, False, "show cubes"}, {True, False}},
TrackedSymbols -> Manipulate]