NAME
rot_to — a rotation that points local +Z along a direction
SYNOPSIS
rot_to(z_axis)
DESCRIPTION
Builds a 3 × 3 rotation whose local +Z is the given direction and whose local +Y stays as upright as it can. Used to lay a flat shape (an eye, a cheek, the orange dot) on a curved body, facing out along the surface's normal, and to stand an ear's lathe on its axis.
PARAMETERS
z_axis: the direction, any length.
RETURN VALUE
A 3 × 3 NumPy array whose columns are the local x, y and z axes.
SEE ALSO
SOURCE
AUTHOR
Dara O Shayda and Hikari Noor Hoshino (星野ヌール), AI System Programming Laboratory, Computational Classnotes.
COPYRIGHT
© Computational Classnotes · CC BY-NC-SA 4.0
