rotation-matrix4 ( axis theta -- matrix )


Vocabulary
math.matrices

Inputs and outputs
axisan object
thetaan object
matrixan object


Definition


:: rotation-matrix4 ( axis theta -- matrix )
theta cos :> c theta sin :> s axis first3 :> ( x y z ) x sq
1.0 x sq - c * + x y * 1.0 c - * z s * - x z * 1.0 c - *
y s * + 0 4array x y * 1.0 c - * z s * + y sq 1.0 y sq - c *
+ y z * 1.0 c - * x s * - 0 4array x z * 1.0 c - * y s * -
y z * 1.0 c - * x s * + z sq ~11 more~ ;