1'''A simple example: 3D rotation of points (reference frame: [0,0,0],[x,y,z])'''
2import numpy as np
3from scipy.spatial.transform import Rotation as R
4p=np.random.rand(20,3) #Generate a random 3D point cloud
5#10° rotation in each principal direction:
6r = R.from_euler('xyz',(10,10,10), degrees=True)
7p_r=r.apply(p) #Rotated points