lookat VEX function

computes a rotation matrix to orient the z-axis along the vector (to-from) under the transformation.

Contexts: image3d, chop, cop, pop, sop, surface, displace, fog, light, shadow, photon, cvex

  1. matrix3 lookat(vector from, vector to)

  2. matrix3 lookat(vector from, vector to, float roll)

  3. matrix3 lookat(vector from, vector to, vector up)

computes a rotation matrix to orient the z-axis along the vector (to-from) under the transformation. If an up vector is specified, this will determine the roll.