Solving sub-triangles for Barycentric Interpolation (Triangle Geometry)

315 Views Asked by At

I'm trying to solve this triangle, so I can implement a barycentric interpolation, but I'm having trouble solving everything. I have all the base values for each of triangular sections and with a simple Euclidean distance, I also have the distances from the corner nodes to the particle in question (red dot within the triangle).

It just turned out that in this case I had the right triangle with the pink subtriangle, but I think that's just happenstance and won't occur every time...in which case I'd need a concrete method for finding the height of the sub-triangles.

I could very well be staring at the answer or have already read it, and I apologize if this is rudimentary.

Thank you very much for your help!

Reference Article:

http://classes.soe.ucsc.edu/cmps160/Fall10/resources/barycentricInterpolation.pdf

If anyone has a better suggestion for barycentric interpolation, and the will to explain it, I'd be greatly appreciative!

Best regards,

P

Solving sub-triangles for barycentric interpolation

1

There are 1 best solutions below

0
On

Your comment above clarified that you are essentially asking for a way to compute the area $T$ of a triangle, given the lengths of all three edges, i.e. $a,b,c$. This is best done using Heron's formula:

$$T=\tfrac14\sqrt{(a+b+c)(-a+b+c)(a-b+c)(a+b-c)}$$

You can do so for every one of the three triangles. For barycentric coordinates, only the ratio between areas matters, so you may as well drop this factor $\frac14$.