Interactive Orbit Diagram
Docstrings
#InteractiveChaos.interactive_orbitdiagram
— Function.
interactive_orbitdiagram(ds::DiscreteDynamicalSystem, i::Int, p_index, p_min, p_max; density = 500, u0 = get_state(ds), Ttr = 200, n = 500, parname = "p" )
Open an interactive application for exploring orbit diagrams (ODs) of discrete systems. The functionality works for any discrete system.
Once initialized it opens a Makie plot window and an Electron control window.
Interaction
By using the Electron window you are able to update all parameters of the OD interactively (like e.g. n
or Ttr
). You have to press update
after changing these parameters. You can even decide which variable to get the OD for, by choosing one of the variables from the wheel (again, press update
afterwards).
In the Makie window you can interactively zoom into the OD. Click and drag with the left mouse button to select a region in the OD. This region is then re-computed at a higher resolution (i.e. we don't "just zoom").
Back in the Electron window, you can press reset
to bring the OD in the original state (and variable). Pressing back
will go back through the history of your exploration History is stored when any change happens (besides transparency).
Accessing the data
What is plotted on the application window is a true orbit diagram, not a plotting shorthand. This means that all data are obtainable and usable directly. Internally we always scale the orbit diagram to [0,1]² (to allow Float64
precision even though plotting is Float32
-based). This however means that it is necessary to transform the data in real scale. This is done through the function scaleod
which accepts the 5 arguments returned from the current function:
od, pmin, pmax, umin, umax = interactive_orbitdiagram(...) ps, us = scaleod(od, pmin, pmax, umin, umax)
#InteractiveChaos.scaleod
— Function.
scaleod(od, pmin, pmax, umin, umax) -> ps, us
Given the return values of interactive_orbitdiagram
, produce orbit diagram data scaled correctly in data units. Return the data as a vector of parameter values and a vector of corresponding variable values.
Function Video
using InteractiveChaos, Makie i = 1 p_index = 1 systems = [(Systems.logistic(), 3.0, 4.0, "r"), (Systems.henon(), 0.8, 1.4, "a"), (Systems.standardmap(), 0.6, 1.2, "k")] ds, p_min, p_max, parname = systems[1] oddata = interactive_orbitdiagram( ds, i, p_index, p_min, p_max; parname = parname )