# What is the corresponding matrix to the transformation/rotation I need?

I have the following x, y, z coordinates:

``````-X      Z       Y
-16.215 126.065 12.236
-16.149 125.708 14.237
-16.843 125.851 13.707
... ... ...
``````

Corresponding to matrix:

``````1.00    0.00    0.00    0.00
0.00    1.00    0.00    0.00
0.00    0.00    1.00    0.00
``````

I need to transform them back to:

``````X       Y       Z
16.215  12.236  126.065
16.149  14.237  125.708
16.843  13.707  125.851
... ... ...
``````

and find the corresponding matrix.

I think what you are asking is for a matrix which takes a three element vector and transforms it to another three element vector where the output vector has as its first element the negative of the first element of the input vector, has as its second element the third element of the input vector, and has as its third element the second element of the input vector. That matrix is just

`````` -1 0 0
0 0 1
0 1 0
``````

This is it, thanks for the help!

This corresponds to a +180* posterior/anterior rotation then a +90* left/right rotation.

1 Like