1from sympy
import symbols, trace, det, log, Pow, Rational, MatrixSymbol, Matrix, ccode, sin, cos
8x, y, z, alpha = symbols(
"point(0) point(1) point(2) alpha")
16 R = Matrix([[1, 0, 0], [0, cos(angle), -sin(angle)],
17 [0, sin(angle), cos(angle)]])
19 R = Matrix([[cos(angle), 0, sin(angle)], [0, 1, 0],
20 [-sin(angle), 0, cos(angle)]])
22 R = Matrix([[cos(angle), -sin(angle), 0],
23 [sin(angle), cos(angle), 0], [0, 0, 1]])
30 p = Matrix([[x], [y], [z]])
34 p -= Matrix([[cx], [cy], [cz]])
36 p += Matrix([[cx], [cy], [cz]])