# Map triangular texture onto triangle with curved edges

This topic is 1014 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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, which looks like this:

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:

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 curves as in the first picture):

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: I was able to solve this with a solution given to me by a kind soul over on computergraphics.stackexchange.com
Edited by looeee

##### Share on other sites
You could try to use barycentric coordinates to do the mapping: For each point P in the triangle ABC, compute the areas of ABP, BCP and CAP, then look a the point with those barycentric coordinates in the triangle that describes the texture.

##### Share on other sites

I notice that the two places where it looks like it gets cut happen to be the two places that have a really thin triangle going through them. You may want to look into that as well.

##### Share on other sites

I tried adjusting the subdivision distance so that there are no thin triangles, it helps a bit but the texture is still very distorted. I'm going to try a more standard subdivision method like this

And see if that helps.

##### Share on other sites

I found a paper that might explain how to compute barycentric coordinates for a triangle in the hyperbolic plane. If you can compute these then getting the UV coordinates from the Euclidean triangle should be pretty easy: https://www.math.auckland.ac.nz/deptdb/dept_reports/498.pdf

1. 1
2. 2
3. 3
Rutin
20
4. 4
khawk
14
5. 5

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633655
• Total Posts
3013187
×