Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

rotation points space python

'''A simple example: 3D rotation of points (reference frame: [0,0,0],[x,y,z])'''
import numpy as np
from scipy.spatial.transform import Rotation as R
p=np.random.rand(20,3) #Generate a random 3D point cloud
#10° rotation in each principal direction:
r = R.from_euler('xyz',(10,10,10), degrees=True) 
p_r=r.apply(p) #Rotated points
Source by docs.scipy.org #
 
PREVIOUS NEXT
Tagged: #rotation #points #space #python
ADD COMMENT
Topic
Name
9+8 =