Wolfram mathematica 使用多面体作为图形基本体,放置在点并缩放

Wolfram mathematica 使用多面体作为图形基本体,放置在点并缩放,wolfram-mathematica,Wolfram Mathematica,我可以问一个简单的初学者问题吗?对于这个问题,我在我的任何一篇文章中都找不到一个简单易懂的答案(这篇文章很老,在某些情况下早于第6版)?如何使用多面体,就好像它们是球体和长方体等图形基本体一样?即,以点为中心并按比例缩放。下面是一些愚蠢的例子来说明这一点: (* spheres along a path *) data = Table[{Cos[t], Sin[t], Sin[t] Cos[2 t]}, {t, 0, 2 Pi, Pi/24}]; Graphics3D[Sphere[#, 0.3

我可以问一个简单的初学者问题吗?对于这个问题,我在我的任何一篇文章中都找不到一个简单易懂的答案(这篇文章很老,在某些情况下早于第6版)?如何使用多面体,就好像它们是球体和长方体等图形基本体一样?即,以点为中心并按比例缩放。下面是一些愚蠢的例子来说明这一点:

(* spheres along a path *)
data = Table[{Cos[t], Sin[t], Sin[t] Cos[2 t]}, {t, 0, 2 Pi, Pi/24}];
Graphics3D[Sphere[#, 0.3] & /@ data]

那么,如何在特定的点和比例上放置二十面体,比如

Graphics3D[icosahedron[#, 0.1] & /@ data]
编辑:我想我的问题是如何使
GraphicsComplex
Graphics3D
协同工作。例如,我目前拥有:

shapes[ct_, siz_] := {Sphere[ct - .2, siz ], Sphere[ct - 0.1, siz]};
Graphics3D[{{shapes[#, size] & /@ data}}]
我想用二十面体[]代替
Sphere[]
。我目前正在努力使海克的解决方案起作用

编辑2:现在工作很好,谢谢海克。不知道我会不会把它3D打印出来-穿起来有点不舒服


您可以这样做:

icosahedron = PolyhedronData["Icosahedron"][[1]];
Graphics3D[Translate[Scale[icosahedron, .1], #] & /@ data]

你好,海克-谢谢。我想我可以看到你的答案在做什么(将GraphicsComplex传递给Graphics3D),所以我可能需要重构我的代码,因为我试图在其他地方调用Graphics3D…@cormullion:
GraphicsComplex
与任何其他
Graphics
Graphics3D
原语一样处理,
Graphics3D
以便你可以定义二十面体[c,s]:=平移[比例[多面体数据[“二十面体”][[1]],s],c]。
icosahedron = PolyhedronData["Icosahedron"][[1]];
Graphics3D[Translate[Scale[icosahedron, .1], #] & /@ data]