xform_matrix
Specification
Location | Author | Maintained by |
---|---|---|
isl/math/coordsys.py | Kenny Erleben | DIKU |
Purpose & Params
The purpose of this function is to transform a matrix to another basis.
Example
x,y,z = 1,0,0
radians = np.pi / 2
axis = np.array([0,0,1])
r = vec3.make(x,y,z)
q = quat.Ru(radians, axis)
coordsys = cs.make(r,q)
identity_basis = np.array([
[1,0,0],
[0,1,0],
[0,0,1]
])
expected = np.array([
[0,-1,0],
[1, 0,0],
[0, 0,1]
])
transformet_m = cs.xform_matrix(coordsys, identity_basis)
array([[ 0.0, -1.0, 0.0],
[ 1.0, 0.0, 0.0],
[ 0.0, 0.0, 1.0]])