Following on from my previous post...
I'm going through this PDF file describing barycentric coordinates and trying to make sure I understand everything fully as I need to implement and support these in a computer program.
One page 3, area $A$ is defined as follows:
$A = \begin{vmatrix}\bf{P_1}&\bf{P_2}&\bf{P_3}\\1&1&1\end{vmatrix}$
and the notes say "Area $A$ is simply the triangle's area". Question 1: It's not though is it? It's twice the area (well, the signed area). Sorry if I'm asking a picky or silly question, but when I'm trying to understand things, even very minor things that confuse me throw me heavily off course!
Page 5 talks about finding the barycentric coordinates of a triangle defined by 3D coordinates which is exactly what I want to do. It says "We simply use this same method to form the sub-areas $A_1$, $A_2$, $A_3$ in (3)". Question 2: Now we have z coordinates, don't we have 4 equations in 3 unknowns? (or as $w = 1 - u - v$, 3 equations in 2 unknowns) which I believe is called an overdetermined system and something my brain doesn't know what do to with! I've only ever done inverses of square matrices. Hopefully someone can throw me a lifeline on this.
$\begin{bmatrix}p^1_x - p^3_x & p^2_x - p^3_x \\ p^1_y - p^3_y & p^2_y - p^3_y\\ p^1_z - p^3_z & p^2_z - p^3_z\end{bmatrix}\begin{bmatrix}u\\v\end{bmatrix} = \begin{bmatrix}p_x - p^3_x\\p_y - p^3_y\\p_z - p^3_z\end{bmatrix}$