Using Mathematica to Generate Crystal Lattices

How do you create a 3x3x3 grid in Mathematica? Is it possible to color some grid points? It seems to be possible, but I can't get it to work so far.

http://reference.wolfram.com/mathematica/ref/LatticeData.html

What I mean by 3x3x3 looks like the picture (c) on the right: http://physics.ucsd.edu/was-sdphul/labs/2dl/exp6/exp63.gif

+3
source share
1 answer

Agree with Mark that it is not clear what you are asking for, I will assume that these are the numbers that you are after. Even then, I cannot say if there are obvious generalizations from the FCC / BCC materials.

, , -

Gridlines[n_] := With[{s = Range[0, n - 1]},
  Join @@ (Flatten[#, 1] & /@ 
     NestList[Transpose[#, {3, 1, 2}] &, Outer[List, s, s, s], 2])]
LatticePoints[name_, n_] := Select[
  Tuples[Range[-n, n], 3].LatticeData[name, "Basis"],
  (And @@ ((# >= 0 && # < n) & /@ #) &)]

FCC BCC:

Graphics3D[{
  {Red, Sphere[#, 0.1] & /@ LatticePoints["FaceCenteredCubic", 3]},
  Line[Gridlines[3]]
  }, Boxed -> False]

enter image description here

+3

Source: https://habr.com/ru/post/1745666/


All Articles