Advertisement
Matthen

Cardioid

Nov 16th, 2012
705
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. d = 6 Pi/99;
  2. Manipulate[
  3. Graphics[{
  4. {
  5. If[4 Pi >= s > 2 Pi,
  6. {
  7. Darker@Red,
  8. Table[
  9. Block[{p}, p = {Sin[t], Cos[t]}; Circle[p, Norm[{0, 1} - p]]]
  10. , {t, 2 Pi, Max[2 Pi + 0.01, s], d}]
  11. }
  12. ,
  13. If[4 Pi < s,
  14. {
  15. Darker@Red,
  16. Table[
  17. Block[{p}, p = {Sin[t], Cos[t]}; Circle[p, Norm[{0, 1} - p]]]
  18. , {t, s, 6 Pi, d}]
  19. }
  20. ,
  21. {}
  22. ]
  23. ],
  24. Thickness[0.01],
  25. Circle[{0, 0}, 1],
  26. Circle[{Sin[s], Cos[s]}, Norm[{0, 1} - {Sin[s], Cos[s]}]]
  27. },
  28. Darker@Red, PointSize[Large], Point[{Sin[s], Cos[s]}],
  29. Line[{{0, 1}, {Sin[s], Cos[s]}}]
  30. }, PlotRange -> 3.1, ImageSize -> 220]
  31. , {s, 0, 6 Pi, d}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement