Iteration of a 2D map involving absolute value: phase transition? I was looking at this map: $f(x,y) \mapsto (|x-y|,x)$, starting from some point
with coordinates $(x,y) \in [0,1]^2$, and iterating: 
$(x,y),\, f(x,y), \, f^2(x,y), \,f^3(x,y), \ldots$.
It displays behavior surprising to me, 
with something akin to a phase transition when $x \approx y$,
when it then burrows toward $(0,0)$ in a methodical fashion:

 
 
 

Two questions:


Q1. Is there some sense in which there are two distinct regimes of behavior
  to this map?
Q2. What tools are available to study maps like this?

Incidentally, I started with $f(x,y) \mapsto (x-y,x)$, which results in the hexagon
$$
(x,y), \,
(x-y,x), \,
(-y,x-y), \,
(-x,-y), \,
(-x+y,-x), \,
(y,-x+y) \;.
$$
 A: Superb drawings, when plot in log-log scale with irrational numbers... Try $\left(\sqrt{2},\sqrt{7}\right)$, for example, with enough digits accuracy. Don't we observe a periodicity?
To show the periodicity, a normalization of the data yields a closed polygon. For $\left(\sqrt{2},\sqrt{7}\right)$, plotting $\left(s^ix_i,s^iy_i\right)$, with $s=1.25447$ one obtains the following result for 200 iterations:
For $\left(\phi,1\right)$, where $\phi=\left(1+\sqrt{5}\right)/2$ is the golden ratio, the constant $s$ seems to be equal to 1.27201964951, which is $\sqrt{\phi}$. The polygon is reduced to a line segment.
A: Let $(x_n,y_n)$ denote the coordinates of the $n$-th iterate of the map.  Put $t=y/x$ and $t_n=y_n/x_n$.
  Note that $t_{n+1}=1/|t_n-1|$.  We claim that the sequence $(x_n,y_n)$ tends to $(0,0)$ if and only if 
  $t$ is irrational.  Note that if $t$ is irrational, then so are all the $t_n$; similarly if $t$ is rational then so are 
  all the $t_n$ (but this sequence may include $\infty$ which we consider rational here).  
Suppose first that $t$ is rational.  Write $t_n = a_n/b_n$ in reduced terms.  Then we may see that 
  $\max(a_n,b_n)$ is a non-increasing sequence of natural numbers, and must decrease at some 
  point if $\max(a_n,b_n) \ge 2$.  Thus eventually we will arrive at a situation where $\max(a_n,b_n)=1$.    This means that we are in the cases where either $x_n$ or $y_n$ equals zero, or when $x_n=y_n$.  In all these 
  cases the map cycles through three possibilities forever. 
Now suppose that $t$ is irrational.  Note that $\max(x_n,y_n)$ is a non-increasing sequence for all 
  $n$; let's call this quantity the size of the point $(x_n,y_n)$.  So it suffices to show that every once in a while the size of 
  a point has become substantially smaller than 
  a previous value.  Let's consider some point $(x_n,y_n)$.  If $t_n <1$ then note that at the next step we'll have $t_{n+1}>1$.   So we may suppose that $t_n >1$.  
Now suppose first that $t_n>2$. Note that $(x_{n+1},y_{n+1}) = (x_n(t_n-1),x_n)$, $(x_{n+2},y_{n+2})= (x_n(t_n-2), x_n(t_n-1))$, 
 and $(x_{n+3},y_{n+3})=(x_{n},x_n(t_n-2))$.  So in three steps the size has diminished from $t_n x_n$ to $x_n \max(1,t_n-2)$.   Repeating this $[t_n/2]$ times, we see that the size diminishes by a factor of $t_n$.   
Now suppose $2> t_n > 1.1$.  Then after one step the size has diminished by a factor of $1/1.1$.  
Finally suppose that $1.1 > t_n>1$.  After one step we get a value of $t_{n+1}$ which is bigger than $10$.  We can 
 now apply our previous argument to that case.  
Thus in all cases, after some number of steps the size of a point will be smaller by a factor $< 1/1.1$, and thus the 
 points must tend to $(0,0)$.  
Note that if $t_n$ is large, then the size of iterates diminishes linearly for a while; whereas if $t_n$ is small then the size 
diminishes geometrically for a while.  This may explain the ``phase transitions" seen in the pictures. 
