Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

PREVIOUS NEXT
Code Example
Python :: browse list python 
Python :: python twilio certificate error 
Python :: how to show process bar in terminal python 
Python :: convert from object to integer python 
Python :: array must not contain infs or NaNs 
Python :: Python program to find Cumulative sum of a list 
Python :: how to limit a long text in djagno 
Python :: pil save image 
Python :: DataFrame.plot.line() method: | dataframe line plot 
Python :: df to excel 
Python :: django rest framework delete file 
Python :: generate random prime number python 
Python :: pandas dataframe aggregations 
Python :: write csv python pandas stack overflow 
Python :: python check if string starting with substring from list ltrim python 
Python :: python3 inorder generator 
Python :: python milliseconds to date 
Python :: split imagedatagenerator into x_train and y_train 
Python :: python test if value is np.nan 
Python :: rearrange list 
Python :: sklearn adjusted r2 
Python :: pyspark concat columns 
Python :: how to factorise an expression in python 
Python :: get number of bits on integer in python 
Python :: converting bool to 1 if it has true and if it is false print 1 
Python :: python turtle window not responding 
Python :: how to plot heatmap in python 
Python :: how to make a pygame window 
Python :: how to convert 24 hours to 12 hours in python 
Python :: import static in django urls 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =