# Finding the center of rotation in 3d knowing the start/end transformations

I need your help to solve a trigonometry problem, I'm unable to find any documentation about on the web...

For convenience, I will use "transform" to indicate a position+orientation.

Let's say that we have a general shape (the green box) and we apply to it a displacement and a rotation to obtain the blue box (the grey box represents a possible interpolation between the initial and the final transform)

Now, suppose that the transform we apply produce this result. To match the blue box transformation we could simply apply a rotation to the green box with the center represented by the orange dot.

The question is the following: Is it possible to compute the center of rotation for any generic case knowing only the transformations of the green and the blue box? Ex:

Why this need? Consider the image n2, if I simply interpolate [0,5] the transformation of the green and the blue box I obtain the grey box of the image n1, what I'm looking for is a way to obtain the grey box of the image n2.

Thank you so much!

• Do you have a transformation matrix from green to blue, or do you have only the initial and final positions of the vertex? Commented Dec 21, 2022 at 21:57
• I have the orientation matrices (so the box x,y,z axes oriented in the world) of the green and the blue box and their positions ... Commented Dec 22, 2022 at 19:28
• From the orientation matrices, it is a simple coplaner projection to get a line, line intersection point, calculate the 2 angles and radius, average the two angles and give the projection of the grey object's position.
– user122973
Commented Dec 23, 2022 at 5:20
• The key term is co-planar. Assuming you want the shortest answer or the longer one as there are 2 for all orientations, except the following: the only ambiguity of the median is if the blue and green boxes are co-linear either 0 degrees to which there is no answer, or 180 degrees to which the the answers lay on disc perpendicular to the center.
– user122973
Commented Dec 23, 2022 at 5:43
• @Strom, It's hard for me to understand your response and apply your solution. I have to "co-plane project" the two matrices? What line I get? What point I have to intersect with that line? ... Maybe you can provide me a more explicit example? Thank you Commented Dec 23, 2022 at 17:40