ROT_TO(3VRM)Pyon manual · Mochi and Onigiri as VRM 1.0 avatars (tools/make-vrm.py, Python)ROT_TO(3VRM)

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

ellipsoid(3vrm), lathe(3vrm), on_surface(3vrm)

SOURCE

tools/make-vrm.py, line 57

AUTHOR

Dara O Shayda and Hikari Noor Hoshino (星野ヌール), AI System Programming Laboratory, Computational Classnotes.

COPYRIGHT

© Computational Classnotes · CC BY-NC-SA 4.0