Scala Documentation Chaotic Systems / Lorenz Attractor
example.chaos.Lorenz

An animated Lorenz attractor in a lightweight static page

This page pairs a clean, Scala-docs-inspired layout with a continuously rendered Lorenz attractor. The visualization is optimized for both large screens and smaller mobile viewports, with crisp rendering on high-density displays.

Static HTML Vanilla JavaScript Mobile friendly canvas

Animated Lorenz attractor

The Lorenz system is a classic example of deterministic chaos. The animation below integrates the equations in real time, stores a rolling trail of points, and projects them to 2D with a gentle camera rotation for depth.

lorenz.js / render loop
Parameters σ = 10, ρ = 28, β = 8/3
Display Responsive canvas with high-DPI support
Controls Auto-starts on load and adapts on resize

Implementation notes

The page is intentionally simple: one HTML file and one JavaScript file. Styling lives directly in index.html for portability, while the simulation and drawing logic live in lorenz.js.

If the device prefers reduced motion, the script renders a still frame instead of running the full animation loop. That keeps the page more comfortable and battery-friendly on mobile devices.