Mathematica: moving point creating a curve

  • Context: Mathematica 
  • Thread starter Thread starter MikhailKhot
  • Start date Start date
  • Tags Tags
    Curve Mathematica Point
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
MikhailKhot
Messages
2
Reaction score
0
Dear all,

here is my animation of a simple plot:

Animate[
ParametricPlot[ {Sin[tf], Cos[tf]}, {tf, 0, t}, PlotStyle -> {{Thickness[0.002], Red}, {Thickness[0.002], Blue}},
PlotRange -> {{-2, 2}, {-2, 2}, {-2, 2}}, AspectRatio -> Automatic], {t, 0.01, 100, 0.01},
AnimationRate -> 2, AnimationRunning -> False]

I want to have the same animation, but with a circle moving together with the plot, creating it, i.e. to combine the result above with

Animate[
Show[
Graphics[
{{PointSize[Large], Red, Point[{Sin[t], Cos[t]}]}}, PlotRange -> {{-2, 2}, {-2, 2}}, Axes -> True,
AspectRatio -> Automatic]], {t, 0, 100}, AnimationRate -> 1, AnimationRunning -> False]

How can I get it? Many-many thankd!
 
Physics news on Phys.org
Got an answer myself;))

Animate[
Show[
ParametricPlot[
{(1.2 + (1 - tf*0.1)*Boole[tf < 10])*
Sin[tf], (1 + (1 - tf*0.1)*Boole[tf < 10])*Cos[tf]},
{tf, 0, t},
PlotStyle -> {{Thickness[0.002], Red}, {Thickness[0.002], Blue}},
PlotRange -> {{-2.3, 2.3}, {-2.3, 2.3}, {-2.3, 2.3}},
Axes -> False, AspectRatio -> Automatic],
Graphics[{{PointSize[Large], Red,
Point[{(1.2 + (1 - t*0.1)*Boole[t < 10])*
Sin[t], (1 + (1 - t*0.1)*Boole[t < 10])*Cos[t]}]}},
PlotRange -> {{-2.3, 2.3}, {-2.3, 2.3}}, Axes -> False,
AspectRatio -> Automatic]],
{t, 0.01, 100, 0.01},
AnimationRate -> 2, AnimationRunning -> False]