Thanh Ha
Thanh Ha

Reputation: 147

3D Tranformation matrix between two coordinate systems matlab

I have a coordinate system A

Example: 3 principal vector direction of system A are:

e0=  [0.3898  -0.0910   0.9164]    
e1=  [0.6392   0.7431  -0.1981]
e2=  [-0.6629  0.6630   0.3478]

And, I have a cartesian coordinate system B with three unit vector:

   nx=[1 0 0];  
   ny=[0 1 0]; 
   nz=[0 0 1]

How can i find transformation matrix C between two coordinate systems A & B ? enter image description here

Upvotes: 4

Views: 5045

Answers (1)

Nicola Pellicanò
Nicola Pellicanò

Reputation: 469

Your basis vectors forms already a rotation matrix that provides a direct transformation of the points in the basis A to the canonical basis (e.g. [1,0,0] in basis A corresponds to e0 in canonical coordinates).

A=[e0' e1' e2'];
Pcan=(A*P')';

or, using transpose rules

Pcan=P*A';

Upvotes: 1

Related Questions