Page 1 of 1

Computing single transformation matrix from multiple transformations

Posted: Thu Jan 17, 2019 11:21 am
by ashenkin
Hello,

As I'm aligning one pointcloud with another, I'll go through multiple transformation steps. For example, manually translate a cloud a couple times, then point-to-point, then maybe ICP, etc. This results in a number of rotate/translate and scaling operations. I would like to produce a single 4x4 matrix for the resulting transformation. If it were just rotation, then I think matrix multiplication of the chain of 3x3 matrices would work. If it were just translation, then I think addition of the chain of translation vectors would work. If it were just scaling, then multiplication of the scaling factors would work. But chaining all of those together to produce a single 4x4 matrix with scaling... any thoughts on how to do that?

One further question: when one transforms and scales (e.g. by clicking the 'scale' box in the point-to-point registration tool), does the scaling occur at the center point of the bounding box? If so, then the order of operation (i.e. transformation then scaling vs. scaling then transformation) wouldn't matter. Otherwise, I think it would...

Thanks,
Allie

Re: Computing single transformation matrix from multiple transformations

Posted: Thu Jan 17, 2019 8:55 pm
by daniel
You can look at the 'transformation history' matrix in the entity properties (it's the composition of all transformation matrices since the entity was loaded).

Otherwise the scale is always applied after the rotation and before the translation:

Code: Select all

P' = s.R.P + T

Re: Computing single transformation matrix from multiple transformations

Posted: Wed Jan 23, 2019 10:34 am
by ashenkin
excellent - thank you.