This implementation uses angles in degrees. The algorithm is the vectorized formulation of the Euler-Rodrigues formula
Parameters : | x : numpy.ndarray \((N,3)\)
angle : double
axis : numpy.ndarray \((3)\)
|
---|---|
Returns : | vectors : numpy.ndarray \((N,3)\)
|
Examples
>>> [x,y,z] = np.eye(3)
>>> temp = rotateVector(x, np.pi/2, z)
>>> aeq(temp, y)
True
This works also for lists of vectors:
>>> X = np.tile(x,(100,1))
>>> Y = np.tile(y,(100,1))
>>> Z = np.tile(z,(100,1))
>>> temp = rotateVector(X, np.pi/2, Z)
>>> aeq(temp, Y)
True