Advertisement
Guest User

Parabola Construction

a guest
May 30th, 2011
662
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. Manipulate[Module[{G, f = {0, 0}, m, P, t},
  2. If[tt < 4, t = tt - 2, t = 6 - tt];
  3. G = {t, -1};
  4. P = (G + f)/2;
  5. m = t;
  6. Show[Graphics[Join[
  7. {Line[{{-2, -1}, {2, -1}}], PointSize[Large], Red, Point[G],
  8. Blue, Point[f]}
  9. ], PlotRange -> {{-2.1, 2.1}, {-2, 2}}],
  10. If[tt >= 4,
  11. Table[
  12. Plot[(({\[Tau], -1} + f)/
  13. 2)[[2]] + \[Tau] (x - (({\[Tau], -1} + f)/2)[[1]]), {x, -2,
  14. 2}], {\[Tau], t, 2, 0.1}]
  15. ,
  16. Plot[P[[2]] + m (x - P[[1]]), {x, -2, 2}]
  17. ]
  18. ]
  19. ],
  20. {tt, 0, 8, 0.1}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement