Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def transfromPoint(x, point):
- Rx = np.matrix(np.array([
- [1, 0, 0],
- [0, cos(x[3]), -sin(x[3])],
- [0, sin(x[3]), cos(x[3])]
- ]))
- Ry = np.matrix(np.array([
- [cos(x[4]), 0, sin(x[4])],
- [0, 1, 0],
- [-sin(x[4]), 0, cos(x[4])]
- ]))
- Rz = np.matrix(np.array([
- [cos(x[5]), -sin(x[5]), 0],
- [sin(x[5]), cos(x[5]), 0],
- [0, 0, 1]
- ]))
- tempM = np.matmul(Rz, Ry)
- M = np.matmul(tempM, Rx)
- matrixM = np.matrix(M)
- R = point * matrixM
- print(point)
- print(R)
- R = R.tolist()[0]
- print(R)
- R[0] = R[0] + x[0]
- R[1] = R[1] + x[1]
- R[2] = R[2] + x[2]
- return R
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement