# Map a texture onto a hyperbolic triangle

I've been stuck on how to approach this for a while, so any suggestions would be gratefully appreciated!

I want to map a texture in the form of a lower right euclidean triangle to a hyperbolic triangle on the Poincare Disk.

Here's the texture (the top left triangle of the texture is transparent and unused). You might recognise this as part of Escher's Circle Limit I

Sorry, see the comment as I am not allowed to post more than two links it seems!

And this is what my polygon looks like (it's centred at the origin, which means that two edges are straight lines, however in general all three edges will be circular arcs):

The centre of the polygon is the incentre of the euclidean triangle formed by its vertices and I'm UV mapping the texture using it's incentre, dividing it into the same number of faces as the polygon has and mapping each face onto the corresponding polygon face. However the the result looks like this:

If anybody thinks this is solvable using UV mapping I'd be happy to provide some example code, however I'm beginning to think this might not be possible and I'll have to write my own mapping functions.

SOLVED with some refinement of @Nathan's answer below since the lines AB, AC, BC may actually be arcs not lines.

Method: pick the longest side, say BC, then subdivide this into an even number of parts. Subdivide the other two side into the same number of parts. Then the lines connecting these (DE in the answer below) must actually also be arcs, not straight lines. Subdivide these new arcs as required, add the new triangles as faces then UV map the lower right triangle of the texture to these new faces.

Simple? Not at all. But it worked.

• Here is the texture I'm using: i.sstatic.net/SEi0G.png Commented Feb 29, 2016 at 19:19
• I assume the issue is the shearing of the image? I see this happens where you have inconsistent spacing between the vertices of the triangular subdivision. My guess is you are using consistent steps for your uv mapping, giving you the shearing effect.
– user2500
Commented Mar 1, 2016 at 23:15
• I actually fixed that shortly after posting this by making the subdivisions consistent and smaller, it fixes the shearing somewhat (although not completely). However the texture is still very distorted. I'm working on @nathan suggestion below, which at the very least will allow for a much finer subdivision. Commented Mar 3, 2016 at 0:06
• @Looeee Could you pass your code please, I'm very interested in this field of graphics Commented Nov 17, 2018 at 15:58
• Yes, you can find my code here: github.com/looeee/blackthread-heroku/tree/master/assets/js/src/… And the live version: blackthread.io/experiments/eschersketch Honestly, it's so long since I looked at this that I can't remember where in the code the functions that solve this are, but if you have trouble making sense of it drop me another comment here and I'll take a look. Commented Nov 18, 2018 at 12:41