Advertisement
Matthen

Construction of Hyperbola

Jun 24th, 2011
383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. y[t_, d_] :=
  2. Module[{i = -16 + 8 d^2 - d^4 + 16 d t - 4 d^3 t + 16 t^2 -
  3. 4 d^2 t^2}, If[i >= 0, 1/4 Sqrt[i], 10^3]];
  4. x[t_, d_] := 1/4 (-d^2 - 2 d t);
  5.  
  6. Manipulate[Show[Graphics[{Darker@Red,
  7. Point[{x[t, d], y[t, d]}], Point[{x[t, d], -y[t, d]}],
  8. Darker@Blue,
  9. Circle[{1, 0}, Max[0, t + d]],
  10. Darker@Purple,
  11. Circle[{-1, 0}, Max[0, t]]
  12. }, PlotRange -> {{-2, 2}, {-2, 2}}],
  13. If[t >= (2 - d)/2,
  14. {ParametricPlot[{x[tt, d], y[tt, d]}, {tt, (2 - d)/2, t}],
  15. ParametricPlot[{x[tt, d], -y[tt, d]}, {tt, (2 - d)/2, t}]},
  16. Graphics[]
  17. ]
  18. ], {t, -1.2, 12}, {{d, 1.2}, 0, 2}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement