# Markov Partitions for toral automorphisms

I know that my question is more practical than theoretical. But, I do know where to look for the theoretical sources.

I want to find a program in the case that it exists (does it?), or to program it. Here is my question: Can you give me a suggestion to program it? In particular, which software would you recommend me to use. I am also interested in any source of pictures of Markov partitions for toral automorphism in $\mathbb{T}^2$ (I would like to see other examples and their iterations rather than the classical by Weiss and Adler).

I want my program to do this:

Inputs:

i. A toral automorphism $T:\mathbb{T}^2\doteq\mathbb{R}^2/\mathbb{Z}^2\to \mathbb{T}^2$, i.e. a map that has linear lifting $L:\mathbb{R}^2\to \mathbb{R}^2$ without eigenvalues of modulus 1.

ii. A Markov partition $\alpha$. I want to see the image of $\mathbb{T}^2$ colored by $\alpha$.

iii. A positive integer $n$.

Output:

Plot of $T^n(\alpha)$. I want to see the image of $T^n(\mathbb{T}^2)$ when $\mathbb{T}^2$ was colored by $\alpha$.

Another question that I have. In the case that I had this program (that it assumes that we are able to find the Markov partition $\alpha$). Do you think that it will help to find Markov partitions (if instead of having a Markov partition as an input I put any topological partition)?

A practical way to solve my question is using SAGE (however, I think the code is not suitable on this website). I got easily a nice picture for a Markov partition for the toral automorphism that lifts to the linear map on $\mathbb{R}^2$ with matrix $M=(1,1,1,0).$
To address your second question, there is a simple construction of a Markov partition which inputs not "any topological partition" but which simply inputs the matrix $M \in SL_2(Z)$ that represents $T$. The algorithm will have to compute the eigenvectors and eigenvalues for $M$. Using that data the algorithm will compute the Markov partition which will consists of a certain pair of rectangles on $T$ with sides parallel to the eigenvectors. It is exactly like the classical Adler/Weiss examples.