Suppose we chose the generators $f(z) = z+1, g(z) = z-1, h(z) = -1/z$ for the modular group $\Gamma$ (i.e. the group of fractional linear tranformations $z \mapsto (az +b)/(cz+d)$ with $a,b,c,d \in \mathbb{Z}$ and $ad - bc = 1$).
I would like to know of an algorithm for producing "words" in (i.e. compositions of) the generators $f,g,h$ such that one obtains exactly one element of each coset of $\Gamma/H$ where $H$ is the subgroup generated by $f$.
I'm interested in this because it would help me make better pictures of the modular group. I wrote a program (available here) for making pictures in the hyperbolic plane such as the following:
The above picture was generated by applying all words of length less than a certain length (maybe 12 or something) to a single "triangle+stickman". The chosen generators were $h$ and $h \circ f$ which give the modular group the structure of a free product of finite cyclic groups.
However the pictures are unsatisfactory and do not improve as much as one would like by increasing the "depth" (i.e. max length of words chosen). It seems better to go deep into each coset (i.e. apply $f$ and its inverse a bunch of times) and then transform that. Here's a picture with just 8 cosets (but many transformations were chosen for each):