Rigid Transformation Math

From FreeCAD Documentation

This page is under construction. Test LaTex capability

Rotations can be represented as orthogonal 3 x 3 matrices. Acting on a position vector they generate the rotated coordinates by . Rotations keep the origin fixed. A general (proper) rigid motion combines a rotation with a translation , that is . (A proper rigid motion is one that preserves lengths and angles, but excludes reflections. A FreeCAD placement is such.)

There is a very useful representation, used by FreeCAD's Placement, of these proper rigid motions by 4 x 4 matrices of the special form . The rigid motion then takes the matrix form . In this compact notation, R is the 3 by 3 rotation matrix, and , and are 3 by 1 column position vectors. In FreeCAD we can construct the Placement from its constituent Rotation and displacement.

R = App.Rotation(App.Vector(0,0,1), 120) # 120 degree rotation about z-axis
a = App.Vector(10,0,0) # displacement of 10 along x axis
pl = App.Placement(a, R) # construct placement, can retrieve a as pl.Base, R as pl.Rotation

In terms of the matrices, we can decompose the general transformation into its constituent translation and rotation. , where is the Identity matrix and is the 0-vector. Note that in terms of operations, we read the matrices from right to left, i. e. we first rotate , then we translate it .