Advertisement
Matthen

Rolling Cardioid

May 5th, 2015
1,024
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. Manipulate[
  2. Show[
  3. Graphics[{
  4. Thickness[Medium], PointSize[Medium],
  5. {GrayLevel[0.3], Disk[{0, 0}, 1]},
  6. {Darker@Red, Circle[{Sin[\[Theta]], -Cos[\[Theta]]}, 2]},
  7. Point[
  8. Table[{Sin[\[Theta]], -Cos[\[Theta]]} +
  9. 2 {Sin[\[Phi] - \[Theta]/2],
  10. Cos[\[Phi] - \[Theta]/2]}, {\[Phi], 0, 2 Pi, 2 Pi/n}]
  11. ]
  12. },
  13. PlotRange -> 3, ImagePadding -> 10],
  14. ParametricPlot[
  15. Table[
  16. {Sin[\[Theta]t], -Cos[\[Theta]t]} +
  17. 2 {Sin[\[Phi] - \[Theta]t/2], Cos[\[Phi] - \[Theta]t/2]},
  18. {\[Phi], 0, 2 Pi - 0.0001, 2 Pi/n}
  19. ]
  20. , {\[Theta]t, If[\[Theta] < 2 Pi, 0, \[Theta] - 2 Pi],
  21. If[\[Theta] < 2 Pi, \[Theta], 2 Pi]},
  22. PlotStyle -> Darker@Blue
  23. ]
  24. ], {\[Theta], 0.001, 4 Pi - 0.001}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement