Previous | Next --- Slide 28 of 111
Back to Lecture Thumbnails
movissup

How would you calculate the distances? Can someone provide an example? Thx!

acz

Not sure if there’s a smarter way, but I think calculating the height of the sub triangles created by the point x to the vertices is one way to do it. For example, to calculate α, you just need to calculate the height of the triangle formed by x, b, and c. Given we know the coordinates of all three points, we can calculate the length of sides xb, bc, and cx. Then we can use Heron’s formula to get α. Here’s a short video on calculating a triangle’s height using Heron’s formula: link

gtier

You could do the following:

Let x = a + beta * (b - a) + gamma * (c - a). There exists some matrix T, where

T * [beta gamma]^T = beta * (b - a) + gamma * (c - a). Namely,

T = [(b - a) (c - a)]

If we look back at the def of x, we see that x - a = beta * (b - a) + gamma * (c - a). Thus,

T * [beta gamma]^T = x - a

Here, we can multiply both sides by the inverse of T. So,

[beta gamma]^T = T^-1 * (x - a)

Now that we know beta and gamma and that alpha + beta + gamma = 1.

alpha = 1 - beta - gamma

Hope this helps!

Please log in to leave a comment.