Halvorsen Attractor

2025

Halvorsen Attractor

Overview

The Halvorsen attractor is a smooth and continuous chaotic system first introduced by Norwegian physicist Einar Halvorsen. It belongs to the category of three-dimensional autonomous systems defined by differential equations that produce strange attractors. Unlike more jagged or scroll-like attractors, the Halvorsen system is characterized by its elegant loops and soft curvature, forming a dense, braided flow in space. Despite its visual grace, the system is fundamentally chaotic. Its sensitivity to initial conditions ensures that even tiny perturbations lead to entirely distinct trajectories over time.

The equations defining the Halvorsen system are:

dx/dt = −a·x − 4·y − 4·z − y²
dy/dt = −a·y − 4·z − 4·x − z²
dz/dt = −a·z − 4·x − 4·y − x²

In this system, a single parameter a controls the behavior. A typical value like a = 1.4 results in chaotic flow. These equations describe a continuous interaction between all three spatial coordinates, where each derivative is influenced not only by linear terms but also by a quadratic nonlinearity involving the other variables. This coupling creates feedback loops that feed into one another, forming a self-reinforcing dynamic. The attractor has a cyclical appearance, with motion folding and circulating in a way that gives it the illusion of balance, even though it never repeats.

To simulate the Halvorsen attractor, I used the Euler method to compute a numerical approximation of its trajectory. Starting from a set of initial conditions, I evaluated the system’s derivatives and stepped forward in small time intervals to update the position of the point in three-dimensional space. This process was repeated over many iterations to produce a long, continuous trajectory. The nonlinearity of the system leads to divergence between nearby paths, so even a slight change in the starting point yields visibly different curves.

For visual clarity, I assigned color based on the time variable to enhance the sense of flow and motion within the attractor. The result is a form that appears both structured and organic. Multiple trajectories were plotted to expose the density and complexity of the system. The Halvorsen attractor does not rely on sharp turns or abrupt jumps. Instead, it builds its beauty through continuous curvature and recursive looping, producing a shape that feels both mathematical and fluid. It captures the paradox of chaos, where unpredictability is generated from a perfectly ordered set of rules.

You can find my code repository here.