rotaxi2mat#
- torchspin.rotaxi2mat(n, rho)[source]#
Rotation matrix from an axis and angle (Rodrigues formula).
- Parameters:
- Returns:
R (ndarray, shape (3, 3)) – Rotation matrix. Apply as
v_rot = R.T @ v(passive convention).- Return type:
Notes
Uses the Rodrigues formula:
R = I + N·sin(ρ) + N²·(1−cos(ρ)), where N is the skew-symmetric cross-product matrix.