Ry¶
-
sknano.core.math.
Ry
(angle, degrees=False)[source] [edit on github][source]¶ Generate the 3×3 rotation matrix Ry(θ) for a rotation about the y axis by an angle θ.
Ry=(cosθ0sinθ010−sinθ0cosθ)Parameters: Returns: 3×3 rotation matrix Ry(θ) for a rotation about the y axis by an angle θ:
Return type: Examples
>>> import numpy as np >>> from sknano.core.math import Ry >>> Ry(np.pi/4) array([[ 0.70710678, 0. , 0.70710678], [ 0. , 1. , 0. ], [-0.70710678, 0. , 0.70710678]]) >>> np.alltrue(Ry(np.pi/4) == Ry(45, degrees=True)) True