Internal function to generate a rotation matrix that aligns the Y-axis with a given direction vector. It uses the Rodrigues' rotation formula.
generate_rotation_matrix_from_direction(
  direction = c(0, 1, 0),
  up = c(0, 1, 0)
)A 3x3 rotation matrix.
Default c(0, 1, 0). A 3D vector representing the direction.
The function normalizes this vector.
Default c(0, 1, 0). A 3D vector representing the up direction.