Advertisement
Matthen

Voronoi ellipses

Jul 19th, 2011
452
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. frame[T_, k_] := Module[{points},
  2. points = Table[{2 Cos[t + T], Sin[t + T]}, {t, 0, 2 Pi, 2 Pi/k}];
  3. Show[
  4. ListContourPlot[
  5. Flatten /@ Transpose[{points, Range[Length@points]}],
  6. InterpolationOrder -> 0,
  7. ColorFunction -> (ColorData["DarkBands"][#] &), Frame -> False,
  8. PlotRange -> {{-3, 3}, {-2, 2}}],
  9. ParametricPlot[{2 Cos[t], Sin[t]}, {t, 0, 2 Pi}],
  10. Graphics[{Darker@Red, PointSize[Large], Point[points]},
  11. PlotRange -> {{-3, 3}, {-2, 2}}]
  12. ]
  13. ];
  14. gridframe[T_] :=
  15. GraphicsGrid[Partition[Table[frame[T, i], {i, 8}], 4],
  16. ImageSize -> 300];
  17. Manipulate[gridframe[t], {t, 0, 2 Pi}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement