Hénon map
Building a Hénon map with javascript
I first found out about the Hénon map as an undergrad and have loved it ever since. Can I simulate it in javascript? Let’s find out!
The Hénon map is a dynamical system that exhibits chaotic behavior. It takes two parameters a and b. Depending on the values the map can exhibit periodic , chaotic or intermittent (switching back and forth between chaotic and stable orbits). It is described by the formula:
$$
\begin{aligned}
x_{n+1} &= 1 - ax_n^2+y_n\\
y_{n+1} &= bx_n
\end{aligned}
$$
The Hénon map is basically taking the x-y plane and stretches, folds and squishes it like kneading bread. For some parameters it will tend toward a fixed point or set of points, but for others it exhibits chaotic dynamics - which means that no matter how accurately you describe the current position, it will be impossible to predict where it will be in the future (other than within the bounds of the attractor).
Source Code
I put the basic source code in this gist
Some interesting parameters
Note 1
A minor update was made to this page on May 20, 2024 to remove animations from the plot and make the sliding controls more fine.