Theory.RotationMatrix

Theory.RotationMatrix#

Theory.RotationMatrix.py

from

Random Rotation Matrix in Python http://blog.lostinmyterminal.com/python/2015/05/12/random-rotation-matrix.html

rand_rotation_matrix(deflection=1.0, randnums=None)#

Creates a random rotation matrix.

deflection: the magnitude of the rotation. For 0, no rotation; for 1, competely random rotation. Small deflection => small perturbation. randnums: 3 random numbers in the range [0, 1]. If None, they will be auto-generated.

rotate_3d_mesh(M, center, x, y, z)#