Mathematica翻译 - 获得多份副本

时间:2010-12-06 23:12:33

标签: wolfram-mathematica

命令是

Show[{PolyhedronData["TruncatedOctahedron"], 
  Graphics3D[
   Translate[
    PolyhedronData["TruncatedOctahedron", "Faces"], {30, 30, 30}],
   {40, 40, 40}
     ]}]

Mathematica graphics

创建原始图形的另外1个副本。如果我想在同一张图片上再复制1份,我该如何为它指定翻译向量?该命令应如何修改?

1 个答案:

答案 0 :(得分:5)

在版本6和7中,你几乎必须创建一个翻译数字表:

Graphics3D[
 Table[Translate[PolyhedronData["TruncatedOctahedron", "Faces"], 
   10 {Cos[2 i], Sin[i], Cos[3 i]}], {i, 60}]]

Mathematica graphics

在版本8中,您还可以使用一个带有平移向量表的图形:

Graphics3D[
 Translate[PolyhedronData["TruncatedOctahedron", "Faces"], 
  Table[10 {Cos[2 i], Sin[i], Cos[3 i]}, {i, 60}]]]

可以节省内存并且更快一些。

相关问题