gpt4 book ai didi

wolfram-mathematica - 使用 Mathematica 生成晶格

转载 作者:行者123 更新时间:2023-12-02 00:40:12 24 4
gpt4 key购买 nike

如何在 Mathematica 中生成 3x3x3 晶格?是否可以为一些格点着色?看起来这是可能的,但到目前为止我无法让它工作

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

我所说的 3x3x3 的意思类似于右图 (c):http://physics.ucsd.edu/was-sdphul/labs/2dl/exp6/exp63.gif

最佳答案

必须同意 Mark 的观点,即您的要求不是很清楚——我假设这是您所追求的数字。即便如此,我也无法真正判断 FCC/BCC 的内容是否有任何明显的概括。

无论如何,只要复制图形,创建线条并用类似的东西指向自己

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

关于wolfram-mathematica - 使用 Mathematica 生成晶格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2844674/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com