$SU(3)$ trackball

Visualization of the Veronese embedding of $\CP^1$ into $\CP^2$, transformed by $SU(3)$.

Click and drag to rotate $\CP^2$.

What is it

Define the Veronese embedding $\nu: \CP^1 \to \CP^2$ by

\[\nu([u:v]) = [u^2: \sqrt{2}\, uv: v^2].\]

The picture shows a unitary transform of this Veronese map: for $M \in SU(3)$, it plots the image of $M \circ \nu: \CP^1 \to \CP^2$. To plot a point in $\CP^2$, we use the toric moment map. This takes the norm squared of each projective coordinate, and treats it as a barycentric coordinate on a triangle:

\[\mu: [z_0:z_1:z_2] \mapsto (\vert z_0\vert^2:\vert z_1\vert^2:\vert z_2\vert^2).\]

This defines a map from $\CP^2$ to the screen. The image shows 200,000 uniformly random points $p\in\CP^1$, plotted on the screen at $\mu\circ M\circ \nu(p)$. First we Veronese embed, then we rotate by $M\in SU(3)$, and finally we project to the screen by the moment map. Points are colored by a domain coloring of $\CP^1$. For more explorations of algebraic curves rendered as point clouds, see my page on curves in $\CP^2$.

Lie theory of interactive $SU(3)$

The Lie group $SU(3)$ acts on $\CP^2$. We visualize $\CP^2$ via its toric image, sending $[z_0:z_1:z_2]$ to the barycentric coordinates $(\vert z_0\vert^2,\vert z_1\vert^2,\vert z_2\vert^2)$. The fibers of this map are the orbits of the maximal torus $T \subset SU(3)$, the diagonal matrices

\[T = \left\lbrace \begin{pmatrix}e^{i \theta_1} & & \\ & e^{i\theta_2} & \\ & & e^{-i(\theta_1 + \theta_2)}\end{pmatrix} \right\rbrace.\]

We move through $SU(3)$ using the root $SU(2)$ subgroups, consisting of the $2 \times 2$ blocks of $SU(3)$. Let $i = 0,1,2$ index the three coordinates of $\CP^2$, and let $S_i \subset SU(3)$ be the subgroup of matrices which agree with the identity in the $i^{th}$ coordinate:

\[S_0 = \begin{pmatrix}1 & 0 & 0 \\ 0 & * & * \\ 0 & * & *\end{pmatrix}, \quad S_1 = \begin{pmatrix}* & 0 & * \\ 0 & 1 & 0 \\ * & 0 & *\end{pmatrix}, \quad S_2 = \begin{pmatrix}* & * & 0 \\ * & * & 0 \\ 0 & 0 & 1\end{pmatrix}.\]

The group $S_i$ fixes the $i^{th}$ coordinate axis. In the moment triangle, it fixes the corner $i$. We interact by manipulating each of these $SU(2)$ subgroups with a trackball-type UI, moving the overall $SU(3)$ matrix by accumulating infinitesimal transforms. To describe the infinitesimal transform, identify the Lie algebra $\mathfrak{s}_i$ of $S_i$ with $\RR^3$, such that the diagonal matrices lie along the $z$ axis, and the screen is the $x,y$ plane. Let $A_i:\RR^3 \to \mathfrak{s}_i\subset \mathfrak{su}(3)$ be the resulting map into $\mathfrak{su}(3)$ for each vertex.

For a standard trackball, where the group is $SU(2)$, say that the mouse moves along a path $\gamma(t)$. Moving in direction $\dot{\gamma}$ rotates in the plane perpendicularly, represented by the Lie algebra element $\hat{z}\times \dot{\gamma} \in \mathfrak{su}(2)$. Define a path of matrices $M(t)$ in $SU(2)$ as the solution to the differential equation

\[\dot M(t) = (\hat{z}\times \dot{\gamma}(t))\, M(t).\]

This integrates the infinitesimal rotation into an element of $SU(2)$, which maps onto a rotation matrix in $SO(3)$. This is most convenient to implement by treating $SU(2)$ as the group of unit quaternions.

For the $SU(3)$ version, we apply the same procedure, but in different parts of the screen we rotate different $SU(2)$ subgroups. For $i=0,1,2$, define activation functions on the screen $\rho_i:\RR^2 \to [0,1]$ such that $\sum_{i} \rho_i(x) = 1$. Then, given the mouse motion $\gamma(t)$, define the motion in $SU(3)$ by

\[\dot{M}(t) = \left(\sum_{i=0}^{2}\rho_i(\gamma)\, A_i( \hat{z}\times\dot{\gamma})\right)M(t).\]

That is, we split the mouse velocity $\dot{\gamma}$ into the three Lie algebras $\mathfrak{s}_i$ according to the weights $\rho_i$, embed into $\mathfrak{su}(3)$, and add the resulting vectors. This gives our infinitesimal motion, which we integrate to obtain a path in $SU(3)$.

I found the rotation is most intuitive when dragging along an edge activates the $SU(2)$ factor fixing the opposite vertex. Specifically, let $\lambda_0, \lambda_1, \lambda_2$ be the barycentric coordinates of the mouse, and let $f_i = \lambda_j \lambda_k + \varepsilon(1-\lambda_i)^2$. This function is a smoothed product of the linear factors vanishing on the edges incident to $i$. The $f_i$ don’t form a partition of unity, so we normalize, $\rho_i = f_i / (f_0 + f_1 + f_2)$. Outside the triangle, $\rho_i$ is extended to be constant along rays from the center. Here is a visualization:

[!sketch|square live] SU(3)/weights.html The weights $\rho_i$. Hover over a corner to see its weight in isolation.

Here are a some final implementation details.