I'm using sympy to generate some latex output, and I would like to create an expression by multiplying several matrices, but I don't want it to simply the expression.
A simple example:
I have
x, y, ori = sympy.symbols('x y ori')
T = Matrix([
[1, 0, -x],
[0, 1, -y],
[0, 0, 1]])
R = Matrix([
[ cos(ori), sin(ori), 0],
[-sin(ori), cos(ori), 0],
[ 0, 0, 1]])
A = R.multiply(T)
Currently sympy.latex(A) looks something like:
[[ cos(ori), sin(ori), -x*cos(ori) - y*sin(ori)],
[-sin(ori), cos(ori), x*sin(ori) - y*cos(ori)],
[ 0, 0, 1]])
But I would like something more like this:
[[ cos(ori), sin(ori), 0], [1, 0, -x],
[-sin(ori), cos(ori), 0], [0, 1, -y],
[ 0, 0, 1]]) * [0, 0, 1]]
Is it possible to disable the automatic expression evaluation?