Wrap-around Euler-Rodrigues formula formula for rotating a point cloud
Parameters : | points : numpy.ndarray \((N,3)\)
angle : scalar
axis : numpy.ndarray \((3)\)
origin : numpy.ndarray \((3)\)
|
---|---|
Returns : | points : numpy.ndarray \((N,3)\)
|
Examples
>>> o = np.array([0,0,0])
>>> [x,y,z] = np.eye(3)
>>> temp = rotatePoints(x, np.pi/2, z, o)
>>> 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 = rotatePoints(X, np.pi/2, Z, o)
>>> aeq(temp, Y)
True