Page 1 of 1
Applying a rigid transformation matrix to a pair of coordinates?
Posted: Tue Apr 28, 2020 8:15 pm
by adrianom
Not sure if this is the right place to ask this question. I am trying to apply a rigid transformation matrix generated from CloudCompare to a pair of coordinates, but my linear algebra skills are not the greatest. I attached a screenshot of the math I was doing. The 4x4 matrix you see is the transformation matrix generated from CC and the 4x1 matrix is a single point converted into a vector (-42788.463 is the x coordinate, 213124.639 is the y coordinate, 0 is the z coordinate, and 1 indicates I want to use the translation vector from the 4x4 matrix). The 4x4 matrix and the 4x1 matrix are both in a similar coordinate system (NAD_1983_CA_Teale_Albers). Is this the right way of doing this? I am making the assumption that the first column in the 4x4 matrix are x rotation values, the second column y rotation values, and the third column z rotation values.
Re: Applying a rigid transformation matrix to a pair of coordinates?
Posted: Tue Apr 28, 2020 10:20 pm
by adrianom
Disregard that last sentence about the assumption of x y and z. That is wrong.
Re: Applying a rigid transformation matrix to a pair of coordinates?
Posted: Wed Apr 29, 2020 7:48 pm
by daniel
Yes that's correct (apart, as you pointed out, that the 3x3 top-left part of the matrix is a 3D rotation matrix)
Re: Applying a rigid transformation matrix to a pair of coordinates?
Posted: Thu Apr 30, 2020 5:46 pm
by adrianom
Thanks for all the help recently, Daniel! Much appreciated.
Re: Applying a rigid transformation matrix to a pair of coordinates?
Posted: Mon May 04, 2020 3:58 am
by adrianom
Got another question for you, Daniel. Does this math account for the rotation based on the origin point, as you told me in my previous question you answered (linked below)? I ask this because the shift I am seeing in the coordinates (due to the translation vector) is larger than I expected. If my math does not account for this, is there a method you know of that I can account for rotation based on the origin point when applying the matrix to a set of coordinates?
viewtopic.php?f=9&t=4504&sid=55fa217106 ... 41d488993d
Re: Applying a rigid transformation matrix to a pair of coordinates?
Posted: Mon May 04, 2020 10:47 am
by daniel
Yes the rotation matrix implicitly rotates the points about the origin. And then the 'translation' part (the 4th columns) re-centers the cloud/entity.