Use a polyhedron as a graphic primitive, placing it at a point and scaling

Can I ask an easy beginner question to which I cannot find an easily understandable answer in any of the texts that I have (which, admittedly, are quite old, previous versions 6 in some cases)? How do you use polyhedra as if they were graphic primitives like Sphere and Cuboid? That is, it is focused at a point and scales. Here are silly examples to illustrate the point:

(* 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] 

loop of spheres

 (* cubes along a path *) Graphics3D[Cuboid[#, # + 0.1] & /@ data] 

loop of cubes

So, how to place icosahedrons at specific points and scales by writing something like

 Graphics3D[icosahedron[#, 0.1] & /@ data] 

Edit: I think my problem is how to make GraphicsComplex and Graphics3D work together. For example, where am I currently:

 shapes[ct_, siz_] := {Sphere[ct - .2, siz ], Sphere[ct - 0.1, siz]}; Graphics3D[{{shapes[#, size] & /@ data}}] 

I would like to replace this Sphere[] with icosahedron[] . I am currently trying to solve a problem with Heike ...

Edit 2: Now work fine, thanks to Heike. Not sure if I will get 3D printing, but it looks a bit uncomfortable ...

the platonic bracelet

+7
source share
1 answer

You can do something like this:

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

icosahedra

+13
source

All Articles