seong-hun / python-tutorials

0 stars 2 forks source link

Functional specification of Rotation class #1

Closed seong-hun closed 1 year ago

seong-hun commented 1 year ago

Rotation class

rot1 = Rotation.from_quat([0, 0, np.sin(np.pi/4), np.cos(np.pi/4)])
rot2 = Rotation.from_euler("ZYX", [0, np.pi/4, 0])
rot = rot1 * rot2

vector = np.array([1, 0, 0])
print(rot.apply(vector))

R = rot.as_matrix()
print(R @ vector)