Loading...
Implement Rodrigues' rotation formula to rotate a 3D point around an arbitrary axis.
Given axis k (unit vector) and angle θ, the rotated point is:
vrot=vcosθ+(k×v)sinθ+k(k⋅v)(1−cosθ)
This decomposes as:
Used in camera pose estimation, 3D reconstruction, and robotics.
point = [1, 0, 0] axis = [0, 0, 1] # Z-axis angle = 1.5708 # ~90 degrees
[0.0, 1.0, 0.0]
Rotating [1,0,0] around Z-axis by 90°:
v_rot = [1,0,0]·cos(90°) + [0,1,0]·sin(90°) + 0 = [0,0,0] + [0,1,0] = [0,1,0]