BioniChaos Logo
  • Home
  • About
  • Contact
System Parameters & Speed
Visual & Phase Space Settings
Kinetic: 0.00 J
Potential: 0.00 J
Total E: 0.00 J
Tip Speed: 0.00 m/s

Overview: Deterministic Chaos & Multi-Link Pendulum Physics

The Multi-Pendulum Physics Visualizer explores one of the most iconic phenomena in classical and non-linear mechanics: deterministic chaos. While a single simple harmonic pendulum ($N = 1$) yields completely predictable, periodic motion governed by linear differential equations at small displacement angles ($\sin\theta \approx \theta$), adding links to form a compound double ($N = 2$), triple ($N = 3$), or general $N$-link chain introduces intense spatial non-linearity and dynamic symmetry breaking.

In a multi-link pendulum system, each additional segment acts as a forced, nonlinearly coupled oscillator. The potential energy stored in elevated masses continuously converts into kinetic energy distributed across all angular degrees of freedom ($\theta_1, \theta_2, \dots, \theta_N$). Microscopic perturbations in the initial conditions—measured in fractions of a millimeter or micro-radians—grow exponentially over time. This sensitivity to initial conditions is quantified by positive maximal Lyapunov Exponents ($\lambda > 0$), a hallmark metric of chaotic attractors and phase space turbulence.

Despite the completely deterministic mathematical formulation of the underlying equations of motion, long-term trajectory prediction becomes impossible without infinite floating-point numerical precision. This visualizer allows researchers, educators, and visual artists to observe real-time phase space exploration, trace spirographic orbit dynamics, adjust simulation speed multipliers, and investigate kinetic energy transfer across connected mechanical links.

How to Use: Interactive Controls & Diagnostic Workflow

The visualizer terminal provides an interactive instrument layout designed for fluid experimentation and precision parameter tuning across mobile and desktop displays.

  • Simulation Speed Multiplier: Adjust the Speed slider ($0.2\times$ to $5.0\times$) to accelerate orbital velocity for rapid spirograph artwork generation or slow down motion for micro-radian trajectory inspection.
  • Direct Canvas Interaction: Click and drag any pendulum bob ($m_1, m_2, \dots, m_N$) directly on the visualizer screen to reposition the chain and set custom initial angular displacements. Releasing the Bob initiates live integration from the selected state.
  • Butterfly Effect Ensemble Mode: Adjust the Ensemble slider to spawn multiple parallel pendulums initialized with micro-radian offsets ($\Delta \theta = 0.0001\,\text{rad}$). Watch how trajectories mirror each other initially before rapidly diverging into completely different chaotic branches.
  • Start Demo / Stop Demo: Located at the top of the control hierarchy, clicking Start Demo freezes your current setup, injects a pre-calculated highly chaotic state vector, and starts drawing intricate spirographic orbits. Any manual touch, click, or slider modification immediately breaks out of demo mode and restores your exact baseline state.
  • Reset Baseline: Instantly wipes current angular velocities, restores baseline mass-length parameters, and clears the active trace buffer back to clean operational defaults without requiring confirmation dialogs.
  • Sub-Stepping Integration ($\mathbf{RK4}$ Sub-Steps): Increase internal Runge-Kutta sub-steps per frame (1 to 20) to maintain strict Hamiltonian energy conservation and eliminate numerical drift during rapid chaotic flips.
  • Phase Space Overlay: Enable the live Phase Space plot ($\dot{\theta}_1 \text{ vs } \theta_1$) in the top-right corner of the canvas to visualize chaotic limit cycles and phase space attractors.

Technical Details: Matrix Lagrangian & Time-Scaled RK4 Engine

The physics solver behind this laboratory utilizes a generalized matrix formulation of the Euler-Lagrange equations combined with a high-precision Fourth-Order Runge-Kutta (RK4) integration algorithm with sub-step time scaling.

For an $N$-link planar pendulum with rigid links of lengths $L_j$, point masses $m_j$, and angles relative to the downward vertical $\theta_j$, the global position of the $k$-th mass is given by:

$$x_k = \sum_{j=1}^k L_j \sin\theta_j, \quad y_k = -\sum_{j=1}^k L_j \cos\theta_j$$

Taking time derivatives yields the kinetic energy $T$ and potential energy $V$ of the system:

$$T = \frac{1}{2} \sum_{k=1}^N m_k (\dot{x}_k^2 + \dot{y}_k^2), \quad V = g \sum_{k=1}^N m_k y_k$$

Formulating the Lagrangian $L = T - V$ and applying the Euler-Lagrange operator $\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{\theta}_j}\right) - \frac{\partial L}{\partial \theta_j} = -\gamma \dot{\theta}_j$ yields a coupled system of $N$ non-linear second-order differential equations expressible in compact matrix notation:

$$\mathbf{M}(\mathbf{\Theta}) \ddot{\mathbf{\Theta}} = \mathbf{C}(\mathbf{\Theta}, \dot{\mathbf{\Theta}}) + \mathbf{G}(\mathbf{\Theta}) - \mathbf{D} \dot{\mathbf{\Theta}}$$

Where $\mathbf{M}(\mathbf{\Theta})$ is the $N \times N$ symmetric positive-definite inertia matrix with elements:

$$M_{jk} = \left(\sum_{i=\max(j,k)}^N m_i\right) L_j L_k \cos(\theta_j - \theta_k)$$

$\mathbf{C}_j$ represents centrifugal and Coriolis force terms, $\mathbf{G}_j$ represents gravitational vector forces:

$$C_j = -\sum_{k=1}^N \left(\sum_{i=\max(j,k)}^N m_i\right) L_j L_k \sin(\theta_j - \theta_k) \dot{\theta}_k^2, \quad G_j = -\left(\sum_{i=j}^N m_i\right) g L_j \sin\theta_j$$

To control motion speed, time scaling factor $\alpha = \text{speedMultiplier}$ calculates effective frame time step $\Delta t_{\text{eff}} = \alpha \cdot \Delta t$. The solver divides this into $S$ sub-steps ($\delta t = \Delta t_{\text{eff}} / S$). For each sub-step, LU decomposition solves $\ddot{\mathbf{\Theta}} = \mathbf{M}^{-1} (\mathbf{C} + \mathbf{G} - \mathbf{D}\dot{\mathbf{\Theta}})$, advancing state vector $(\mathbf{\Theta}, \dot{\mathbf{\Theta}})$ via 4th-order Runge-Kutta evaluation stages ($k_1, k_2, k_3, k_4$).

Future Directions & Development Roadmap

The BioniChaos multi-pendulum platform is designed for continuous expansion into research-grade physical modeling and interactive canvas visuals. Planned roadmap features include:

  • GPU Accelerated WebGL Ensemble Computing: Transitioning core matrix solvers to WebGL / WebGPU compute shaders to simulate 10,000 parallel pendulums with microscopic initial angle variations ($\delta\theta = 10^{-6}\,\text{rad}$), yielding real-time fractal Lyapunov exponent boundary maps.
  • Poincaré Section Slicing: Adding dynamic phase-plane cross-section plots ($\dot{\theta}_1$ vs $\theta_1$) captured at zero-crossings of secondary links to highlight KAM (Kolmogorov-Arnold-Moser) tori and chaotic sea transitions.
  • Vector Trace Exporters: Enabling direct high-resolution SVG and DXF vector export functions for spirographic designs created during long simulation runs.

Related Interactive Laboratories

Explore other interactive physical, biological, and mathematical visualizers on BioniChaos:

  • Kinetic Particle Thermodynamics Engine

    Real-time particle interaction, fluid thermodynamic solvers, and kinetic collision visualizers.

  • Real-Time Fourier Spectrogram Visualizer

    Live acoustic spectrum Fourier transformation and real-time frequency visualizer terminal.

  • Biomedical Cellular Automata Workspace

    Interactive cellular diffusion, biomedical fluid sand, and life pattern visualizer.

  • Cardiovascular Dynamics Simulator

    Hemodynamic pressure, fluid dynamics, and cardiac loop interactive laboratory.