Applying a rigid transformation matrix to a pair of coordinates?

Feel free to ask any question here
Post Reply
adrianom
Posts: 10
Joined: Fri Aug 02, 2019 7:54 pm

Applying a rigid transformation matrix to a pair of coordinates?

Post 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.
Attachments
4X4_math_snip.PNG
4X4_math_snip.PNG (55.14 KiB) Viewed 4145 times
adrianom
Posts: 10
Joined: Fri Aug 02, 2019 7:54 pm

Re: Applying a rigid transformation matrix to a pair of coordinates?

Post by adrianom »

Disregard that last sentence about the assumption of x y and z. That is wrong.
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Applying a rigid transformation matrix to a pair of coordinates?

Post 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)
Daniel, CloudCompare admin
adrianom
Posts: 10
Joined: Fri Aug 02, 2019 7:54 pm

Re: Applying a rigid transformation matrix to a pair of coordinates?

Post by adrianom »

Thanks for all the help recently, Daniel! Much appreciated.
adrianom
Posts: 10
Joined: Fri Aug 02, 2019 7:54 pm

Re: Applying a rigid transformation matrix to a pair of coordinates?

Post 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
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Applying a rigid transformation matrix to a pair of coordinates?

Post 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.
Daniel, CloudCompare admin
Post Reply