Introduction

InteractiveDynamics is a package that provides applications for interactively exploring dynamical systems. It extends various packages of JuliaDynamics.

Example animations

All of the animations/videos you will see in this documentation are generated by simply running the scripts of the examples folder of InteractiveDynamics.

Here are some examples of what you can do with InteractiveDynamics (see Index below, or the various pages of the side bar for full list of applications)

Dynamical systems

Billiards

Agent based models

Description

InteractiveDynamics is a Julia package that builds on top of the packages of JuliaDynamics to create interactive applications for dynamical systems of all kinds. It is written exclusively in Julia, taking advantage of the interactive plotting that GLMakie.jl provides. InteractiveDynamics is great for teaching and demonstrations, but we believe that it can also be taken advantage of in research.

The combination of the following properties make InteractiveDynamics a unique software:

  • General purpose. Arguably the most unique feature of InteractiveDynamics is that every application it offers works for any dynamical system (for the class it targets). The first app shown in the introduction works for any discrete system (of any dimensions), the second app works for any 2D billiard of any shape, the third app works for any 2D agent based model (in discrete or continuous space). This happens because InteractiveDynamics interfaces existing software for dynamical systems from JuliaDynamics. This means that you can re-use the system that you analyze scientifically and explore it interactively, typically requiring only 5-10 extra lines of code to launch the application.

  • Fast. Because internally some of the fastest dynamical systems software and some of the fastest plotting software are used, this makes our applications extremely fast, given the amount of computations and plotted data they handle.

  • Real data. Everything that is plotted is real. For example, the first application shown plots the true orbit diagram (which means that the alpha value is actually the value of the natural density), instead of a pixelated short-hand that allows faster plotting. Since real-data are computed, they are also returned to the user. This means that if the user finds something interesting at any stage of interacting with the application, they can immediately analyze the results in a more thorough and rigorous manner.

  • In real time. Most applications of InteractiveChaso calculate everything in real-time. This allows true real time interactivity: at any point some model parameter may change and this change will be immediately reflected into the visualizations. Another important consequence of doing calculations in real time is that all applications of InteractiveDynamics can evolve dynamical systems potentially forever.

  • Small source code The entire source code for e.g. the orbit diagram plot is 200 lines of code, all clear to understand (we hope), allowing one to expand the existing apps, or to make more specialized versions.

Usage

Using InteractiveDynamics is straightforward, and the documentation strings of the exported functions describe in detail their purpose (see the individual pages of the sidebar).

Each application relies on a package of JuliaDynamics, and thus it requires it to run. For example, if you want to use the function interactive_orbitdiagram, then you must also load DynamicalSystems besides InteractiveDynamics, e.g.

using DynamicalSystems, InteractiveDynamics, GLMakie

ds = Systems.some_example_system()

interactive_psos(ds, ...)

Installation

To install do ]add InteractiveDynamics GLMakie. GLMakie is necessary for providing a plotting backend, since InteractiveDynamics does not install one by default.

It is expected that you have the latest (stable) versions installed for the library you want to use, e.g. DynamicalSystems.

Index

Utility

InteractiveDynamics.record_interactionFunction
record_interaction(file, figure; framerate = 30, total_time = 10)

Start recording whatever interaction is happening on some figure into a video output in file (recommended to end in ".mp4").

Keywords

  • framerate = 30
  • total_time = 10: Time to record for, in seconds
  • sleep_time = 1: Time to call sleep() before starting to save.
source