开发者

Using Mathematica to generate crystal lattices

How do you generate a 3x3x3 lattice in Mathematica? Is it possible to colo开发者_Python百科r some of the lattice points? It seems that it is possible but I cannot get it to work so far

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

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


Must agree with Mark that it is not quite clear what you are asking for -- I'll assume it is the figures you are after. Even then, I can't really tell if there are any obvious generalizations from the FCC/BCC stuff.

Anyways, to just replicate the figures, create the lines and points yourself with something like

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) & /@ #) &)]

This works for FCC and BCC:

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

Using Mathematica to generate crystal lattices

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜