Point in a triangle or parallelogram
You can also check whether a point is in the triangle or in the parallelogram. However, this only works with the parametric form.
Method
- Set up the parametric equation of the plane
- Point on the plane: calculate $r$ and $s$
- Check conditions for $r$ and $s$
The parametric equation is set up using the two vectors which make of the triangle or parallelogram.
With triangle ABC:
And with the ABCD parallelogram:
Remember
- $0\le r\le1$
- $0\le s\le1$
There is another condition for the triangle:
- $0\le r+s \le1$
Example
Is the point $P(-0.5|1|1)$ in the triangle ABC with $A(0|1|0)$, $B(0|0|2)$ and $C(-2|2|2)$?
-
Set up parametric equation
A parametric equation is set up with the 3 points of the triangle.$\text{E: } \vec{x} = \vec{OA} + r \cdot \vec{AB}$ $+ s \cdot \vec{AC}$
$\vec{x}=\begin{pmatrix} 0 \\ 1 \\ 0 \end{pmatrix} + r \cdot \begin{pmatrix} 0 \\ -1 \\ 2 \end{pmatrix}$ $+ s \cdot \begin{pmatrix} -2 \\ 1 \\ 2 \end{pmatrix}$
-
Insert point
The position vector of $P$ is used for $\vec{x}$ in $E$.$\begin{pmatrix} -0.5 \\ 1 \\ 1 \end{pmatrix}$ $=\begin{pmatrix} 0 \\ 1 \\ 0 \end{pmatrix} + r \cdot \begin{pmatrix} 0 \\ -1 \\ 2 \end{pmatrix}$ $+ s \cdot \begin{pmatrix} -2 \\ 1 \\ 2 \end{pmatrix}$
Now we set up an equation system and solve it. Every line is an equation.- $-0.5=-2s$
- $1=1-r+s$
- $1=2r+2s$
From I. one obtains $s=\frac14$, which is used in II..
$1=1-r+\frac14\quad|-1$
$r$ and $s$ are inserted in III..
$0=-r+\frac14\quad|+r$
$r=\frac14$$1=2\cdot\frac14+2\cdot\frac14$
$1=1$=> Point lies on the plane
-
Check conditions
To find out whether the point lies in a triangle, the conditions for $r$ and $s$ must be checked.- $0\le \frac14\le1$
- $0\le \frac14\le1$
- $0\le \frac14+\frac14 \le1$
All conditions apply.
=> P lies in the triangle ABC.