# Ellipsoid Rolling

Let $\pb^b_1 = (x_1, y_1, z_1)^\top$ and $\pb_2^b = (x_2, y_2, z_2)^\top$ be the contact point coordinates represented in the body frame of ellipsoid 1 and ellipsoid 2. The superscripts $b$ and $w$ denote the vector is represented in body and world frame, respectively.

If the two ellipsoids are in contact with each other, and have only one contact point, we have

where

Take the first order derivative of the above equations and we obtain

By assuming rolling condition at the contact point, we have

where the second step employs the relation that

Thus, by fixing the velocity of the ellipsoid 1, the translational and angular velocity of ellipsoid 2 is determined by

where $\mathcal{N}(Q_2)$ is the null space of $Q_2$ and $\color{red} \lambdab$ is a $3 \times 1$ free vector corresponding to the 3 degrees of freedom motion of ellipsoid 2 around ellipsoid 1 (rolling in tangential plane $\times 2$ and spinning along normal vector $\times 1$).

To let $\omegab_2^w$ align with $z$-axis, we can choose $\lambdab$ by solving

where $\mathcal{N}_{2,\omega} \in \mathbb{R}^{3\times 3}$ is the first three rows of matrix $\mathcal{N}(Q_2)$.

In addition, subtracting $(2)$ from $(1)$ gives

Since we know that

the derivative of the contact position can be written it in a more compact formulation

The equation above can be used to calculate $\pbdot_1^b,\, \pbdot_2^b$ and then update $\pb_1^b,\, \pb_2^b$ by numerical integration.