Hénon map


Author: GC

Date: June 30, 2016

Previous Bi colored graph

Next Periodic orbit on a torus


We consider the Hénon map, which is a discrete dynamical system, defined by: \[ \begin{cases} x_{n+1} = 1 - a x_n ^2 + y_n \\ y_{n+1} = b x_n \end{cases}. \] We compute the orbit stemming from $\big( (1-b)/2,~(1-b)/2 \big)$ with $a=1.4$ and $b=0.3$, and plot the Hénon attractor.



Hénon map




Source code

#!/usr/bin/env python3

"""
Program to plot Hénon attractor
"""

# scientific libraries
from matplotlib import pyplot as plt
from random import randint, random
import numpy as np

# parameters
a = 1.4
b = 0.3

# Hénon map

def henon(X):
    x, y = X
    xnew = 1-a*x*x+y
    ynew = b*x
    return xnew, ynew

X0 = [(1-b)/2, (1-b)/2]

X, Y = [], []
for i in range(40000):
    xnew, ynew = henon(X0)
    X, Y = X + [xnew], Y + [ynew]
    X0 = [xnew, ynew]

# figure
fig, ax = plt.subplots(figsize=(8,8))
ax.scatter(X, Y, color='orange', s=0.2)
plt.show()


Previous Bi colored graph

Next Periodic orbit on a torus