Matthen

Construction of Ellipse

Jun 4th, 2011
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. Manipulate[
  2. u1 = {3 Sin[t], 2 Cos[t]} - {Sqrt[5], 0};
  3. u2 = {3 Sin[t], 2 Cos[t]} + {Sqrt[5], 0};
  4. n1 = u1/Norm[u1];
  5. n2 = u2/Norm[u2];
  6. Show[ParametricPlot[{3 Sin[x], 2 Cos[x]}, {x, 0, t}, Axes -> None,
  7. PlotRange -> {{-3.1, 3.1}, {-2.1, 2.1}}],
  8. Graphics[Join[
  9. {PointSize[Large], Red, Point[{{Sqrt[5], 0}, {-Sqrt[5], 0}}],
  10. Line[{{-Sqrt[5], 0}, {3 Sin[t], 2 Cos[t]}}],
  11. Line[{{Sqrt[5], 0}, {3 Sin[t], 2 Cos[t]}}],
  12. Blue, Point[{3 Sin[t], 2 Cos[t]}], Red, PointSize[Medium]},
  13. {Point[Table[{Sqrt[5], 0} + n1 i, {i, 0, Norm[u1], 0.4}]]},
  14. {Point[Table[{-Sqrt[5], 0} + n2 i, {i, 0, Norm[u2], 0.4}]]}
  15. ]]
  16. ], {t, 10^-4, 2 Pi}]
Add Comment
Please, Sign In to add comment