Mathematica: moving point creating a curve

  • Context: Mathematica 
  • Thread starter Thread starter MikhailKhot
  • Start date Start date
  • Tags Tags
    Curve Mathematica Point
Click For Summary
SUMMARY

This discussion focuses on creating an animated plot in Mathematica that combines a moving point with a parametric curve. The user initially shared a basic animation using ParametricPlot and later provided a solution that integrates a moving circle with the plot. The final code utilizes Animate and Show functions to achieve the desired effect, demonstrating advanced usage of Mathematica's graphical capabilities.

PREREQUISITES
  • Familiarity with Mathematica programming language
  • Understanding of parametric equations and their graphical representation
  • Knowledge of the Animate and Show functions in Mathematica
  • Basic concepts of animation and plot styling in Mathematica
NEXT STEPS
  • Explore advanced features of ParametricPlot in Mathematica
  • Learn about dynamic interactivity in Mathematica using Manipulate
  • Investigate the use of Graphics for custom shapes and points in animations
  • Study optimization techniques for smoother animations in Mathematica
USEFUL FOR

Mathematica users, educators in mathematics and physics, and anyone interested in creating dynamic visualizations and animations in computational software.

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]
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 8 ·
Replies
8
Views
6K