1

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.

Emann
  • 13
  • 2

1 Answers1

2
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

egwene sedai
  • 2,355
  • 16
  • 24