Once the 3-D coordinates of the markers are known, the surface normal vector
n̂ of the marker array
M, pointing toward its circumcenter, can be found by calculating the cross-product of two sides of the triangle:
where
The axis
ω̂ (Supplementary Fig. S1A, black dotted line) of the horizontal/vertical rotation
R2(ϕ) is perpendicular to the projection of
n̂ onto the camera image (
nproj):
where
The angle of rotation ϕ can be calculated from the magnitude of
nproj:
The rotation matrix
R2(ϕ) can be found by using Rodrigues' rotation formula
48:
To find the torsional rotation matrix
R1(ψ) the marker array
M was first rotated back over axis
ω̂, using the transpose of the previously found matrix
R2(ϕ), so that
n̂ was now aligned with the
z-axis (Supplementary Fig. S1B, gray arrow):
In this position, the difference in orientation of each marker
i relative to the marker of the array in an arbitrary reference position (with the same alignment of
n̂ with the
z-axis) gives the torsion angle ψ
i.
R1(ψ) can be calculated as follows:
where
The instantaneous angular eye velocity was determined by computing the rotation matrix yielding the rotation from the previously sampled eye orientation to the next eye orientation. The resultant rotation matrix was in turn converted into axis-angle format
49 and multiplied by half the sampling frequency. Because the eye velocity was computed relative to the camera, which in turn was positioned at 70° azimuth from straight ahead, a final multiplication with matrix
R3θ was necessary to align the coordinate system with the stimulus (roll, pitch, and yaw). This consisted of swapping the
y- and
z-components, rotation of the
x- and
y-components about the
z-axis by angle
θ = −20° and an inversion of the
x-axis, which makes the coordinate system right-handed: