4

EquationTrekker is great for phase space plots, however I want to plot the results of

$$\phi '(t)=-b \sin (\phi (t))+g \sin (\Phi (t)-\phi (t))+1\\\Phi '(t)=g y \sin (\phi (t)-\Phi (t))-J (\Phi (t)-\phi (t))$$

I modified this to create this:

Manipulate[
 Show[ParametricPlot[
   Evaluate[
    First[{ϕ[t] , Φ[t]} /. 
      NDSolve[{ϕ'[t] ==  
         1 - b Sin[ϕ[t]] + 
          g Sin[Φ[t] - ϕ[t]], Φ'[t] ==  
         y g Sin[ϕ[t] - Φ[t]] - 
          J (Φ[t] - ϕ[t]), 
        Thread[{ϕ[0] , Φ[0]} == 
          point]}, {ϕ, Φ}, {t, 0, T}]]], {t, 0, T}, 
   PlotStyle -> Red, PlotRange -> R]], {{T, 20}, 1, 100}, {{R, 2}, 0, 
  10}, {{b, 1.79}, -1, 4}, {{g, 0.32}, -1, 4}, {{y, 0.26}, -1, 
  4}, {{J, 0.51}, -1, 4}, {{point, {1.3, 0.2}}, Locator}, 
 SaveDefinitions -> True]

which lets me click on various portions of the graph and have a look at the time evolution in state space.

I'd like to get similar behavior in EquationTrekker, where it shows me the solution of a two-dimensional system in state space. The main thing I need is the "memory" bit, that previously drawn curves stay put instead of getting erased.

Is there any way I can get this to work with EquationTrekker? If not, is there any way to modify my example so that it "imprints" a line wherever the Locator is put?

Additionally: A way to StreamPlot the gradient in the same graph would be nice.

Manishearth
  • 247
  • 2
  • 11

0 Answers0