Skip to content

17. 3D Transformations - 1

Dated: 13-05-2025

Distance of 2 3D Points

\[d = \sqrt{(\Delta x)^2 + (\Delta y)^2 + (\Delta z)^2}\]

Parametric Equation of a line

Let \(P_1\) and \(P_2\) be 2 end points on a line1 then

\[P = P_1 + k \times (P_2 - P_1)\]

Where \(P_2 - P_1\) can be thought as a vector2 where \(k \in [0, 1]\) scales it onto a point \(P\), lying between \(P_1\) and \(P_2\).

cs602_e_17_1.svg

Homogeneous Coordinates

\[ \begin{bmatrix} x^\prime \\ y^\prime \\ z^\prime \\ 1 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 & t_x \\ 0 & 1 & 0 & t_y \\ 0 & 0 & 1 & t_z \\ 0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} x\\ y\\ z\\ 1 \end{bmatrix} \]

References


  1. Read more about lines

  2. Read more about vectors