Don't like ads? PRO users don't see any ads ;-)

Explore Polyhedra

By: Matthen on May 14th, 2012  |  syntax: None  |  size: 0.37 KB  |  hits: 84  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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]}]