Animate the movement of a point along the graph of a specific solution obtained using ParametricPlot3D

We have a system:

x'[t] == x[t] - 5 y[t] + z[t] y'[t] == 3 x[t] - 3 y[t] - 3 z[t] z'[t] == -2 x[t] + 10 y[t] + 4 z[t] 

and initial conditions:

 x[0] == .01 y[0] == 3 z[0] == 0 

I produced a specific schedule:

 eqn = {x'[t] == x[t] - 5 y[t] + z[t], y'[t] == 3 x[t] - 3 y[t] - 3 z[t], z'[t] == -2 x[t] + 10 y[t] + 4 z[t]}; sol = NDSolve[{eqn, x[0] == .01, y[0] == 3, z[0] == 0}, {x[t], y[t], z[t]}, {t, -5, 5}] {xde[t_], yde[t_], zde[t_]} = {x[t], y[t], z[t]} /. Flatten[sol] ParametricPlot3D[{xde[t], yde[t], zde[t]}, {t, 0, 10}, AxesLabel -> {"x", "y", "z"}, PlotRange -> {{-15, 15}, {-15, 15}, {-15, 15}}] 

I know how to choose a random point to build the entire path, but I can’t find a way to animate a point moving along the path that was built. In this particular example, the point should be at t == 0 and move forward to t == 2.

+4
source share
1 answer

This is pretty easy in Mathematica - use the interactive interface:

 Animate[Show[ParametricPlot3D[{xde[t], yde[t], zde[t]}, {t, 0, 10}, AxesLabel -> {"x", "y", "z"}, PlotRange -> {{-5, 15}, {-5, 5}, {-5, 15}}], Graphics3D[{Red, PointSize[.05], Point[{xde[T], yde[T], zde[T]}]}]], {T, 0, 2}] 

enter image description here

+5
source

All Articles