1
$\begingroup$

I have created the following animation:

Animate[ParametricPlot[{Cos[y], Sin[y]}, {y, 0, a},
  PlotRange -> {{-1.5, 1.5}, {-1.5, 1.5}}], {a, 0.01, 2 Pi}]

How do I

  1. highlight the most advanced point on the curve (i.e. add another graphics point animation with coordinates dependant on the same a variable)
  2. draw a connecting vector from the origin to the continuously moving point

Thanks!

EDIT: A similar problem is described here, however the curve isn't animated. I would like the curve to be included in the animation.

$\endgroup$
2
$\begingroup$
Animate[Show[
  ParametricPlot[{Cos[y], Sin[y]}, {y, 0, a}, 
   PlotRange -> {{-1.5, 1.5}, {-1.5, 1.5}}], 
  Graphics[{Red, PointSize[Large], Point[{Cos[a], Sin[a]}],
    Orange, Line[{{0, 0}, {Cos[a], Sin[a]}}]
    }]], {a, 0.01, 2 Pi}]

enter image description here

Additionally, you may replace Line[] with Arrow[] if you want the vector to have an arrow

$\endgroup$
  • $\begingroup$ Thank you egwene! :) Just what I needed. I understand how to do it now! $\endgroup$ – Eric Hoffman Feb 21 '17 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.