MathOverflow will be down for maintenance for approximately 3 hours, starting Monday evening (06/24/2013) at approximately 9:00 PM Eastern time (UTC-4).

I think what you are trying to remember is the triangle group $\langle x,y\mid x^k=y^l=(xy)^m=1\rangle$ (see Wiki). Depending on whether $1/k+1/l+1/m$ is less than, equal to or greater than 1, the group corresponds to a tessellation of a hyperbolic plane, Euclidean plane or a 2-sphere. The tesselation is constructed as you described.
I think what you are trying to remember is the triangle group $\langle x,y\mid x^k=y^l=(xy)^m=1\rangle$ (see Wiki). Depending on whether $1/k+1/l+1/m$ is less, equal or greater 1, the group corresponds to a tessellation of a hyperbolic plane, Euclidean plane or a 2-sphere. The tesselation is constructed as you described.