IPSDK 0.2
IPSDK : Image Processing Software Development Kit
IPSDK Concepts documentation See full documentation

Points and vectors 2d representation

Points 2d can be represented alternatively using carthesian or polar coordinates. These two representation are linked by the following formula :

\[ P = \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} \rho\cos(\theta) \\ \rho\sin(\theta) \end{pmatrix} \]

where :

Lines 2d representation

Lines 2d can be represented using polar coordinates.

\[ \cos{\theta} \times x + \sin{\theta} \times y = \rho \]

where :

Rotations 2d

Rotations 2d are expressed with respect to direct referential orientation.
A 2d rotation with angle $\theta$ can be represented as follow :

angle2d.jpg

Given a point $P_{in}=\begin{pmatrix}x_{in} & y_{in} \end{pmatrix}^t$, its transformed is obtain by :

\[ \begin{pmatrix} x_{out} \\ y_{out} \end{pmatrix} = \begin{pmatrix} cos(\theta) & -sin(\theta) \\ sin(\theta) & cos(\theta) \end{pmatrix} \begin{pmatrix} x_{in} \\ y_{in} \end{pmatrix} \]

Examples
The direction vector for $x$ axis $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$ is transformed in $\begin{pmatrix} cos(\theta) \\ sin(\theta) \end{pmatrix}$.
The direction vector for $y$ axis $\begin{pmatrix} 0 \\ 1 \end{pmatrix}$ is transformed in $\begin{pmatrix} -sin(\theta) \\ cos(\theta) \end{pmatrix}$.

Points and vectors 3d representation

Points 3d can be represented alternatively using carthesian or spherical coordinates. These two representation are linked by the following formula :

\[ P = \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} \rho\sin(\theta)\cos(\phi) \\ \rho\sin(\theta)\sin(\phi) \\ \rho\cos(\theta) \end{pmatrix} \]

where :

Plans 3d representation

Plans 3d can be represented using spherical coordinates.

\[ \vec{\eta} = \begin{pmatrix} \sin(\theta)\cos(\phi) \\ \sin(\theta)\sin(\phi) \\ \cos(\theta) \end{pmatrix} \]

where :

Rotations 3d

Rotations 3d are expressed with respect to direct referential orientation.
These rotations can be expressed as the product of three elemental rotations using Euler notations :

\[R(\chi, \beta, \alpha) = R_z(\chi) \times R_y(\beta) \times R_x(\alpha)\]

where :

Full rotation matrix is given by :

\[ R(\chi, \beta, \alpha) = R_z(\chi) \times R_y(\beta) \times R_x(\alpha) = \begin{pmatrix} cos(\chi)cos(\beta) & cos(\chi)sin(\beta)sin(\alpha) - sin(\chi)cos(\alpha) & cos(\chi)sin(\beta)cos(\alpha) + sin(\chi)sin(\alpha) \\ sin(\chi)cos(\beta) & sin(\chi)sin(\beta)sin(\alpha) + cos(\chi)cos(\alpha) & sin(\chi)sin(\beta)cos(\alpha) - cos(\chi)sin(\alpha) \\ -sin(\beta) & cos(\beta)sin(\alpha) & cos(\beta)cos(\alpha) \\ \end{pmatrix} \]