Advertisement
Matthen

Explore Polyhedra

May 14th, 2012
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. Diagram[p_] :=
  2. Module[{pts = N[PolyhedronData[p, "Edges"][[1]]], e, groups},
  3. e = Tuples[pts, 2];
  4. groups =
  5. GatherBy[e, Floor[Norm[First[#] - Last[#]]*1000] &];
  6. GraphicsGrid[
  7. Partition[(Graphics3D[{Thick, Line[#]}, Boxed -> False] &) /@
  8. groups[[2 ;;]], Floor[Sqrt[Length[groups]]]]]
  9. ];
  10. Manipulate[
  11. Diagram[p],
  12. {p, PolyhedronData[All]}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement