Page 1 of 1

How to define a rotation point in Matrix?

Posted: Wed Feb 21, 2018 5:17 pm
by Elbruno
Hello people.

I'm sorry if this item has already been replied. I searched and did not find the answer.

I noticed that using the translate rotate you can set the point with a click and the cloud rotates around this point.

I would like to know how to set the rotation point when applying transformation with Matrix, Axis Angle or Euler angles.

Because in some cases I have just a point and a direction to align two different systems.

Thx very much.

Cheers.

Re: How to define a rotation point in Matrix?

Posted: Fri Feb 23, 2018 9:41 am
by daniel
Well it's not easy because in a standard 4x4 transformation matrix, the translation part comes after the rotation.

Basically the 3x3 upper-left part of the matrix is a rotation and the last column is a translation. So a point P, is transformed as 'P' = R.P + T. This also explains why the second tab of the 'Apply transformation' dialog lets you define first a rotation (by its axis and rotation angle) and then a translation.

If you want to rotate about a given point C, you have to first center the cloud on this point (translation of '-C'). Then apply the rotation, and translate back to the initial coordinate system ('+C'). To be clearer, you have to use the 'Apply Transformation' dialog once with only a translation (-C). And then call the dialog a second time with the rotation you desire and '+C' as translation.

P' = R.(P-C) + C

Re: How to define a rotation point in Matrix?

Posted: Mon Feb 26, 2018 5:08 pm
by Elbruno
Ok.

It takes some steps but looks like functional.

Tyvm Daniel.