Skip to content

Commit

Permalink
Merge pull request #64 from Alcardens/patch-1
Browse files Browse the repository at this point in the history
Update interpol.tex
  • Loading branch information
hugoledoux authored Dec 17, 2024
2 parents ce435b0 + 3c2e8b9 commit f90bdbb
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 f90bdbb

Please sign in to comment.