## Chirikov map

Author: GC

Date: June 20, 2016

Arrowsmith-Place map

Ueda attractor

The Chirikov map is a discrete dynamical system, given by: $\begin{cases} r_{n+1} = r_n - \frac{k}{2\pi}\sin 2\pi x_n \\ x_{n+1} = x_n + r_{n+1} \end{cases},$ with $k > 0$, $r$ and $x$ being defined modulo $1$.

Chirikov map

### Source code

#!/usr/bin/env python3

"""
Chirikov map
"""

# scientific libraries
from matplotlib import pyplot as plt
import numpy as np

# parameters
k = 0.95 # or 0.5
PI = np.pi

# Chirikov map
def f(r, x):
rnew = r-k*np.sin(2*PI*x)/(2*PI)
xnew = x+rnew
if rnew>1: rnew = rnew-1
if rnew<0: rnew = rnew+1
if xnew>1: xnew = xnew-1
if xnew<0: xnew = xnew+1
return [rnew, xnew]

N = 1000

liste = []
for i in np.arange(0,1,0.1):
for j in np.arange(0,1,0.1):
liste = liste + [[i,j]]

# figure
fig, ax = plt.subplots(figsize=(12,8))
for b in liste:
A = [b[0]]
B = [b[1]]
for i in range(N):
A = A + [f(A[i], B[i])[0]]
B = B + [f(A[i], B[i])[1]]
ax.scatter(B, A, s=0.01, color='b')
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)
ax.yaxis.set_ticks_position('left')
ax.xaxis.set_ticks_position('bottom')
plt.show()


Arrowsmith-Place map

Ueda attractor