•      Sign In
• Create Account

Banner advertising on our site currently available from just \$5!

### #Actualcephalo

Posted 26 August 2013 - 01:56 PM

I'm having trouble abstracting in my mind the following problem. It seems like the solution should be simple, but it's not coming to me. I have a field of hexagons described by triangle tessellation patches. I need my shaders to be able to determine which part of the triangle patch belongs to which hexagon. See the following picture:

[attachment=17651:BarycentricPuzzle.png]

Is there a straightforward mathematical way to determine if a point (in barycentric coords) on the triangle is within the blue shaded area?

### #1cephalo

Posted 26 August 2013 - 01:15 PM

I'm having trouble abstracting in my mind the following problem. It seems like the solution should be simple, but it's not coming to me. I have a field of hexagons described by triangle tessellation patches. I need my shaders to be able to determine which part of the triangle patch belongs to which hexagon. See the following picture:

[attachment=17651:BarycentricPuzzle.png]

Is there a straightforward mathematical way to determine if a point on the triangle is within the blue shaded area?

PARTNERS