RE: Rotation matrix
2020-02-23, 13:41 (This post was last modified: 2020-02-23, 13:43 by Philippe Hurbain.)
2020-02-23, 13:41 (This post was last modified: 2020-02-23, 13:43 by Philippe Hurbain.)
(2020-02-23, 11:22)Michael Horvath Wrote: I am trying to calculate what a', b', c', etc. (with apostrophe) of a MPD sub-model would be after processing the model. The values of a, b, c, etc. (without apostrophe) are obviously already known.Sorry, misunderstood... You then need to perform a matrix multiplication.
if you have a submodel sm.dat containing reference to xxx.dat as
Code:
1 16 x y z a b c d e f g h i xxx.dat
Code:
1 16 x' y' z' a' b' c' d' e' f' g' h' i' sm.dat
Code:
1 16 x" y" z" a" b" c" d" e" f" g" h" i" xxx.dat
Code:
x"=a'x+b'y+c'z+x'
y"=d'x+e'y+f'z+y'
z"=g'x+h'y+i'z+z'
Code:
a"=a'a+b'd+c'g
b"=a'b+b'e+c'h
c"=a'c+b'f+c'i
d"=d'a+e'd+f'g
e"=d'b+e'e+f'h
f"=d'c+e'f+f'i
h"=g'a+h'd+i'g
h"=g'b+h'e+i'h
i"=g'c+h'f+i'i
One big thing to remember, order of matrix IS significant. matrix A * matrix B is different from matrix B * matrix A!!!