Read · 2 min

As always, the advent of barycentric coordinates could not have been made possible without this.

Before we start with distance in barycentric coordinates, we need to establish some preliminaries.

Definition: The displacement vector of two normalized points P=(p1,p2,p3)P = (p_1,p_2,p_3) and Q=(q1,q2,q3)Q = (q_1,q_2,q_3) is denoted by PQ→\overrightarrow{PQ} and is equal to (p1−q1,p2−q2,p3−q3)(p_1 - q_1,p_2 - q_2,p_3 - q_3) This is very similar to the way regular vectors in the plane and space are defined, but DON'T fall into the trap of treating the coordinates as distance. As we shall see, we will find a way of calculating this distance.

Also note that the vectors from the circumcenter (O⃗=0⃗\vec{O} = \vec{0}) to the vertices are denoted A⃗\vec{A}, B⃗\vec{B}, and C⃗\vec{C}.

From the definition of the dot product (A⃗⋅B⃗=∣A⃗∣∣B⃗∣cos⁡θ\vec{A} \cdot \vec{B} = |\vec{A}||\vec{B}|\cos{\theta}) you can conclude that: A⃗⋅A⃗= ?\vec{A} \cdot \vec{A} = \ ? A⃗⋅B⃗= ?\vec{A} \cdot \vec{B} = \ ?

A⃗⋅A⃗= R2\vec{A} \cdot \vec{A} = \ R^2 A⃗⋅B⃗= R2−c22\vec{A} \cdot \vec{B} = \ R^2 - \frac{c^2}{2}

The proofs for those are found in the paper above.

Now, we can finally start finding distance!

First of all, since the points of the vector are normalized, what can we say about the components of the vector?

Since p1+p2+p3=1p_1 + p_2 + p_3 = 1 and q1+q2+q3=1q_1 + q_2 + q_3 = 1, then the components of the vector must sum to 00.

Now, how do we find the distance? You must have some excellent answers about this!

Well, we can represent the vector mathematically like this:

PQ=xA⃗+yB⃗+zC⃗PQ = x\vec{A} + y\vec{B} + z\vec{C}

Hmm... that doesn't give us much...but... what if... we take...the dot product???

PQ2=(xA⃗+yB⃗+zC⃗)⋅(xA⃗+yB⃗+zC⃗)PQ^2 = (x\vec{A} + y\vec{B} + z\vec{C})\cdot (x\vec{A} + y\vec{B} + z\vec{C})

See what you can do with that! I'll show one step of the derivation at a time:

PQ2=∑cyc(x2A⃗⋅A⃗)+∑cyc(2xyA⃗⋅B⃗)PQ^2 = \sum_{\text{cyc}}{(x^2 \vec{A}\cdot\vec{A})} + \sum_{\text{cyc}}{(2xy\vec{A}\cdot\vec{B})}
PQ2=∑cyc(x2R2)+∑cyc(2xy(R2−c22))PQ^2 = \sum_{\text{cyc}}{(x^2R^2)} + \sum_{\text{cyc}}{\left(2xy\left(R^2 - \frac{c^2}{2}\right)\right)}
PQ2=∑cyc(x2R2)+∑cyc2xyR2−∑cycxyc2PQ^2 = \sum_{\text{cyc}}{(x^2R^2)} + \sum_{\text{cyc}}{2xyR^2} - \sum_{\text{cyc}}{xyc^2}
PQ2=R2(x2+y2+z2+2xy+2yz+2xz)−(xyc2+yza2+xzb2)PQ^2 = R^2(x^2 + y^2 + z^2 + 2xy + 2yz + 2xz) - (xyc^2 + yza^2 + xzb^2)
PQ2=R2(x+y+z)2−a2yz−b2xz−c2xyPQ^2 = R^2(x+y+z)^2 - a^2yz - b^2xz - c^2xy

Since x+y+z=0x+y+z = 0:

∣PQ∣2=−a2yz−b2xz−c2xy|PQ|^2 = -a^2yz - b^2xz - c^2xy

And that, my friends, is the length of a displacement vector in barycentric coordinates.

Some things to note here: One, that the formula contains a square. The actual distance PQPQ would actually be −a2yz−b2xz−c2xy\sqrt{-a^2yz - b^2xz - c^2xy}.

Two: You may ask yourself: If all the terms are negative, how can the square of a length be negative? That is one fantastic question.

Remember, x+y+z=0x+y+z=0 in the displacement vector. So that means one (or two) of x,y,zx,y,z can be negative. Thus, the square of the length might not necessarily be negative.

Try proving that as an exercise, that the length can never be negative.

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems