A two-dimensional surface embedded in four-dimensional space \(\mathbb{R}^4\) is defined by two parameters, \(u\) and \(v\): \[ \mathbf{r} = \begin{pmatrix} x(u,v)\\ y(u,v)\\ z(u,v)\\ w(u,v)\\ \end{pmatrix} \] In four dimensions, there are \(\binom{4}{2} = 6\) fundamental planes of rotation, \((XY,XZ,XW,YZ,YW,ZW)\). Each planar rotation matrix is defined as such: \[ R_{xy}(\alpha)= \begin{pmatrix} \cos\alpha & -\sin\alpha & 0 & 0 \\ \sin\alpha & \cos\alpha & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}, \quad R_{xz}(\beta)= \begin{pmatrix} \cos\beta & 0 & -\sin\beta & 0 \\ 0 & 1 & 0 & 0 \\ \sin\beta & 0 & \cos\beta & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix} \] \[ R_{xw}(\gamma)= \begin{pmatrix} \cos\gamma & 0 & 0 & -\sin\gamma \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ \sin\gamma & 0 & 0 & \cos\gamma \end{pmatrix}, \quad R_{yz}(\delta)= \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & \cos\delta & -\sin\delta & 0 \\ 0 & \sin\delta & \cos\delta & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix} \] \[ R_{yw}(\epsilon)= \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & \cos\epsilon & 0 & -\sin\epsilon \\ 0 & 0 & 1 & 0 \\ 0 & \sin\epsilon & 0 & \cos\epsilon \end{pmatrix}, \quad R_{zw}(\eta)= \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & \cos\eta & -\sin\eta \\ 0 & 0 & \sin\eta & \cos\eta \end{pmatrix} \] The full four-dimensional rotation matrix, \(R\), is the product of these six planar rotation matrices. \[ R = R_{xy}(\alpha) R_{xz}(\beta) R_{xw}(\gamma) R_{yz}(\delta) R_{yw}(\epsilon) R_{zw}(\eta) \] Applying this rotation matrix to the original surface yields its rotated coordinates. \[ \mathbf{r}_{\text{rot}}(u,v) = R\,\mathbf{r}(u,v) = \begin{pmatrix} x'(u,v)\\ y'(u,v)\\ z'(u,v)\\ w'(u,v)\\ \end{pmatrix} \]
To visualize a four-dimensional surface, we need to project it into three dimensions. This can be done using a technique analogous to three-dimensional perspective projection.
We perform the projection from a center in \(\mathbb{R}^4\) located at \(w = 0\), and define a perspective distance \(D > 0\) along the \(W\)-axis. The center of projection is the point \((0,0,0,D)\).
The effective depth of a point is defined as the distance from the point to the projection center along the \(W\)-axis: \(D - w'\). Points with \(D - w' \le 0\) lie behind the projection center and are therefore clipped, as they cannot be meaningfully projected. For the remaining visible points, the three-dimensional coordinates are obtained by dividing the first three rotated coordinates by the effective depth: \[ X(u,v) = \frac{x'(u,v)}{D-w'(u,v)}, \quad Y(u,v) = \frac{y'(u,v)}{D-w'(u,v)}, \quad Z(u,v) = \frac{z'(u,v)}{D-w'(u,v)} \] Finally, our new parametric surface in three dimensions is: \[ \mathbf{R}_{\text{rot}}(u,v) = \begin{pmatrix} X(u,v)\\ Y(u,v)\\ Z(u,v) \end{pmatrix} \] Anyways, we are done with the math so here is a visualization with a tesseract.