15,998,100 members
See more: , +
Hi,
I've worked on this problem for 3 days and I've decided to reach out for help.
I have a rectangle and I know its width and height. After the rectangle is rotated in 3D space, I know all 4 corners 2D points (see link).

What I need to figure out what the 3 angles that it was rotated are.

What I have tried:

I tried a projective transformation which worked when the rectangle is rotated only in the Z direction. But fails when the rectangle is rotated in multiple directions (see link)
Posted
Updated 16-Aug-24 6:41am
v3

## Solution 1

If I understood your request correctly...

1.) You know the four points of the original rectangle:
A, B, C, D (where I assume the Z component is always 0)

2.) You know the four points of the rotated rectangle (in 3D space):
A', B', C', D'

3.) I assume, you know the rotation matrices for 3D Spaces
E.g. Rotation matrix - Wikipedia[^]

4.) You are looking for the three rotation angles α, β, γ.
Now we can write down all the equations (based on the rotation matrices) that needs to be fulfilled for the above and you will recognize there will be much more equations, then the variables you are looking for.

Conclusion: That means, there will be no unique solution.
In other words: an infinite number of combinations of angles α, β, γ will give a solution

Btw:
I'm always fascinated by linear algebra but I'm far from being a professional here.
@Stefan63 (Stefan_Lang - Professional Profile[^]) can explain this much better and also provide the mathematical conclusions/proofs ;)

v5