Projections of the 3-dimensional phase-space of a non-autonomous ODE system
Multidimensional obstacle avoidance in ODE (Visualization)
Given simple system of ODE:
$\begin{cases} \dot{x}=g \\ \dot{o}=2 \cdot(-o+x) \\ \dot{g}=(1+\sin(3 t)) \cdot (-g+\frac{df}{do}) \\ \dot{h}=-h+\frac{d^2f}{d^2o} \end{cases}$
where $f = e^{-o^2}$
It is not difficult to construct a 3D trajectory using the command ParametricPlot3D
.
Clear["Derivative"]
ClearAll["Global`*"]
pars = {xs = -1, k = (1 + 1 Sin[3 t])};
f = Exp[-(o[t])^2];
s = NDSolve[{x'[t] == g[t], o'[t] == 2 (-o[t] + x[t]),
g'[t] == k (-g[t] + D[f, {o[t], 1}]),
h'[t] == -h[t] + D[f, {o[t], 2}], x[0] == xs, o[0] == xs,
g[0] == 0.01, h[0] == 0}, {x, o, g, h}, {t, 0, 200},
MaxSteps -> \[Infinity]];
ParametricPlot3D[Evaluate[{o[t], g[t], h[t]} /. s], {t, 0, 200},
PlotPoints -> 100, ColorFunction -> (Hue[#4] &),
BoxRatios -> {1, 1, 1}, PlotRange -> Full]
Questions:
- How to combine multiple solutions for different initial conditions on one
ParametricPlot3D
? - How to plot the final point on the
ParametricPlot3D
? - How to build a vector field around the trajectory?
ParametricNDSolveValue
. $\endgroup$StreamPlot3D
. As the dimension increases, the projection down to 3D graphics (on a 2D display) loses more and more information. The system in the Q is 5D. $\endgroup$