loading the nurbs package , it seemed to be working.
ok, let's make the example, the vector X of the new CS is : [-115.830 -16.850 113.400] in the global CS
I myself used the
anglex = atan2(norm(cross(a,b)), dot(a,b))
to check the angle between Xglobal and Xnew and it should be 44.7° ( also checked with CAD)
so my next steps could have been finding the angles with all other axes and then form the transformation matrix and multiply it in the old Vecotr
but
instead, using the proposed formula :
T = vecrot(pi, (vecXnew + [1; 0; 0])/2)
I get
T =
-0.66887 0.33401 0.33401 0.00000
0.33401 -0.66308 0.33692 0.00000
0.33401 0.33692 -0.66308 0.00000
0.00000 0.00000 0.00000 1.00000
is it the same result ? meaning : the total transformation matrix ?