Applying a rigid transformation matrix to a pair of coordinates?
Applying a rigid transformation matrix to a pair of coordinates?
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.
- Attachments
-
- 4X4_math_snip.PNG (55.14 KiB) Viewed 4143 times
Re: Applying a rigid transformation matrix to a pair of coordinates?
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?
Yes that's correct (apart, as you pointed out, that the 3x3 top-left part of the matrix is a 3D rotation matrix)
Daniel, CloudCompare admin
Re: Applying a rigid transformation matrix to a pair of coordinates?
Thanks for all the help recently, Daniel! Much appreciated.
Re: Applying a rigid transformation matrix to a pair of coordinates?
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
viewtopic.php?f=9&t=4504&sid=55fa217106 ... 41d488993d
Re: Applying a rigid transformation matrix to a pair of coordinates?
Yes the rotation matrix implicitly rotates the points about the origin. And then the 'translation' part (the 4th columns) re-centers the cloud/entity.
Daniel, CloudCompare admin