Advertisement
Matthen

Hypotrochoid

Jun 7th, 2011
674
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. r = 1/3;
  2. c = "SandyTerrain";
  3. map[point_, t_] :=
  4. RotationMatrix[-t].(RotationMatrix[t/r].point + {0, 1 - r});
  5. Manipulate[Show[Graphics[{
  6. Circle[{0, 0}, 1],
  7. Darker@Darker@Red,
  8. Circle[(1 - r) {Sin[t], Cos[t]}, r],
  9. Line[{map[{0, -1}, t], map[{0, 1}, t]}], PointSize[Medium],
  10. Table[{ColorData[c][(y + 1)/2], Point[map[{0, y}, t]]}, {y, -1, 1,
  11. 1/6}]
  12. }, PlotRange -> {{-2, 2}, {-2, 2}}],
  13. Table[ParametricPlot[map[{0, y}, \[Tau]], {\[Tau], 0, t},
  14. PlotStyle -> ColorData[c][(y + 1)/2]], {y, -1, 1, 1/6}]
  15. ],
  16. {t, 10^-3, 2 Pi}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement