3. Vectors - 3D
Lines
Notation
A line in 3D is determined by a point
Note
- This is DIFFERENT from [[#Planes]]
- Since it only has 1 direction vector
Quick normal vector in 3D
Lines in 3D has infinite number of normal vectors
Steps (Similar to 2D):
- Set one of the coords to 0,
- Swap the other 2 coords
- Negate one of them
Example
Planes
Notation
Vector equation
Using 2 direction vectors,
3 Points Vector equation
Given
Vector Linear equation
Find
Linear equation
To find a point on the plane, sub 2 variables to any value and solve the last value Find a point on plane
Given
Sub x=0,
0-0-z&=-4\
z=4 \
P=(0,0,4)
\end{align}$$
Cross product
Used to find a vector that's perpendicular to the 2 vectors
To check:
Cross product Laws
| Law | Note |
|---|---|
| Swap |
|
| Also applies to as |
|
| The scalar ( |
Finding area of triangle with cross product
Given 3 points - P, Q and R
Calculating Distances
Distances for lines
Point to Line
--- Using cross product (recommended)
$d(P,l)=\frac{\text{Area of parallelogram}}{||\vec{d}||}=\frac{||\vec{QP}\times \vec{d}||}{||\vec{d}||}$
--- Using projection
$
\begin{align}
\vec{QH}&=proj_{\vec{d}}{\vec{QP}} \\
\vec{HP}&=\vec{HQ}+\vec{QP} \\
d(P,l)&=||\vec{HP}||
\end{align}
$
Cannot use the same method used in 2D (projection onto normal)
As a line in 3D has infinite normals