Advertisement
Matthen

Grid warping, rotating frame

May 14th, 2013
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. n = 8;
  2. \[Omega] = 1/2;
  3. p1s = Table[{-Sqrt[1 - y^2], y}, {y, -1, 1, 2/n}][[2 ;; -2]];
  4. p1s2 = Table[{x, -Sqrt[1 - x^2]}, {x, -1, 1, 2/n}][[2 ;; -2]];
  5. frame[\[Omega]_] :=
  6. Show[
  7. Graphics[Circle[], PlotRange -> 1.1],
  8. Table[
  9. ParametricPlot[
  10. RotationMatrix[\[Omega] (\[Tau] - 2 Pi)].(
  11. p1 Max[0, (1 - (\[Tau]/(2 Pi))/(-p1[[1]]))] + {-p1[[1]],
  12. p1[[2]]} Min[1, (\[Tau]/(2 Pi))/(-p1[[1]])]
  13. )
  14. , {\[Tau], -0.001, 2 Pi}, PlotStyle -> Thick, Axes -> None]
  15. , {p1, p1s}
  16. ],
  17. Table[
  18. ParametricPlot[
  19. RotationMatrix[\[Omega] (\[Tau] - 2 Pi)].(
  20. p1 Max[
  21. 0, (1 - (\[Tau]/(2 Pi))/(-p1[[2]]))] + {p1[[
  22. 1]], -p1[[2]]} Min[1, (\[Tau]/(2 Pi))/(-p1[[2]])]
  23. )
  24. , {\[Tau], -0.001, 2 Pi}, PlotStyle -> Thick]
  25. , {p1, p1s2}
  26. ]
  27. ];
  28.  
  29. Manipulate[frame[\[Omega]], {\[Omega], -0.5, 0.5}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement