Generate LookAt modelview matrix.

def lookat(eye, target=[0, 0, 0], up=[0, 1, 0]):
  """Generate LookAt modelview matrix."""
  eye = np.float32(eye)
  forward = normalize(target - eye)
  side = normalize(np.cross(forward, up))
  up = np.cross(side, forward)
  M = np.eye(4, dtype=np.float32)
  R = M[:3, :3]
  R[:] = [side, up, -forward]
  M[:3, 3] = -R.dot(eye)
  return M