Hello all,
I get a problem that needs all you support.
The question is that I need to transform a set of points on an arbitrary plane to 2-D dimensions, Oxy. Also, the distance between points must be the same after transformation.
For example, a set of points are on the plane with normal vector v=(a; b; c). The angle between this normal vector and direction vector of Oz axis k=(0; 0; 1) is Theta calculated by
cos(Theta) = c/ sqrt(a^2+b^2+c^2);
The rotation axis u has to be orthogonal to vector k and vector v.
vetor u = cross product of v,k = (u1,u2, 0).
Finally, the rotation matrix R is represented as the attached file.
According to the characteristic of the rotation matrix, the determinant of R must be equal to 1;
However, when I implemented this formula, the result of R in return is with det(R) !=1 which demonstrate something are incorrect.
I attached a Matlab code file. If I choose the v=(1; 0 ; 1), the det(R) =0.6402.
I attached 2 files ( in Matlab and Python ) for your reference.
Could you spend some time to check it and tell me why?
Thank you.