0

As a follow up to this question Why are $3D$ transformation matrices $4 \times 4$ instead of $3 \times 3$?

What is each formula for each field of the transformation matrix, if I want to construct it by hand?

Basically, I would like to do 6 degrees of freedom transformation where I would like to do translation in x,y,z and rotations in the 3 axes as well (But scaling or shearing).

Q1: How do I get each element in the transformation matrix? Q2: Given a transformation matrix, how do I re-construct each of the 6 degrees of freedom (translation in x,y,z and rotation in the 3 axes)?

samol
  • 371
  • 2
  • 5
  • 12

1 Answers1

1

This is not a full answer, but some pointers to get you started:

When computer graphics uses $4$-dimensional vectors $(x,y,z,w)$ to represent three-dimensional space, the "virtual" $3$-dimensional point $(x,y,z)$ is usually represented by $(x,y,z,1)$. Rotations, scalings and translations in 3D are really 4D rotations, scalings and shears keeping the $w=1$ hyperplane fixed.

In addition to letting you use shears to make translations into linear transformations, the difference between two positions is a vector in the $w=0$ subspace. This means that it's natural to use the $w=0$ subspace to represent distances and velocities (which means they don't get affected by the relevant translations / shears, but is affected by the relevant scalings and rotations).

Arthur
  • 204,511
  • 3
    I thought the main reason was that 3D transformations can be affine and you can see the affine group on $\mathbb{R}^3$ as a subgroup of $GL_4(\mathbb{R})$ ? – Junkyards Feb 05 '19 at 00:22
  • @Junkyards I thought I mentioned that in the last half of the second paragraph. Additionally, the part where I say "use shears to make translations into linear transformations" is meant to refer to that fact. The general linear group plus translations generate the affine group, does it not? My answer wasn'nt meant to explicitly address the "why" of it all, but maybe it became too unclear. – Arthur Feb 05 '19 at 06:45