Skip to content

Commit

Permalink
Update interpol.tex
Browse files Browse the repository at this point in the history
The triangle for barycentric coordinates was named p1p2p3, but is referred to as p0p1p2 in the equations and figure
  • Loading branch information
Alcardens authored Dec 15, 2024
1 parent ce435b0 commit 3c2e8b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions interpol/interpol.tex
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,15 @@ \subsection{Linear interpolation in triangulation (\textbf{TIN})}%
\labfig{fig:li}
\end{marginfigure}
The linear interpolation in a triangle can be efficiently implemented by using barycentric coordinates, which are local coordinates defined within a triangle.
Referring to \reffig{fig:li}, any point $x$ inside a triangle $p_1p_2p_3$ can be represented as a linear combination of the 3 vertices:
Referring to \reffig{fig:li}, any point $x$ inside a triangle $p_0p_1p_2$ can be represented as a linear combination of the 3 vertices:
\begin{equation}
x = w_0p_0 + w_1p_1 + w_2p_2
\end{equation}
and
\begin{equation}
w_0 + w_1 + w_2 = 1
\end{equation}
The coefficients $w_i$ are the barycentric coordinates of the point $x$ with respect to the triangle $p_1p_2p_3$.
The coefficients $w_i$ are the barycentric coordinates of the point $x$ with respect to the triangle $p_0p_1p_2$.
Finding the coefficients $w_0$, $w_1$, and $w_2$ can be done by solving a system of linear equations.
If we subtract $p_2$ from $x$, and we use $w_2 = 1 - w_0 - w_1$, we obtain
\begin{equation}
Expand Down

0 comments on commit 3c2e8b9

Please sign in to comment.