How to visualize a 4-dimensional parametric surface?
A simple minded possibility is to use a perspective projection (similar to what I did here). Applied to the 4D Klein bottle, we have
With[{p = 1/3, r = 1/2, ε = -1/3, (* Klein bottle parameters *)
f = 3, d = 1, (* projection parameters *)
k = 3 (* perspective over k-th coordinate *)},
ParametricPlot3D[Function[pt, f Delete[pt, k]/(d - Extract[pt, k])] @
{r (Cos[u/2] Cos[v] - Sin[u/2] Sin[2 v]),
r (Sin[u/2] Cos[v] + Cos[u/2] Sin[2 v]),
p Cos[u] (1 + ε Sin[v]), p Sin[u] (1 + ε Sin[v])},
{u, 0, 2 π}, {v, 0, 2 π},
Mesh -> False, PlotPoints -> 55]]
In addition to perspective projection, one might want to also apply a preliminary rotation (via e.g. RotationTransform[]
) to the parametric equations before projecting over one of the axes, adding another element of flexibility.
There are an infinite number of projections of multidimensional figures on 3D. I will show one variant that is suitable for this case
F[u_, v_] := {x[u, v], y[u, v], z[u, v], t[u, v]}
x[u_, v_, r_] := r (Cos[u/2] Cos[v] - Sin[u/2] Sin[2 v])
y[u_, v_, r_] := r (Sin[u/2] Cos[v] + Cos[u/2] Sin[2 v])
z[u_, v_, p_, \[Epsilon]_] := p Cos[u] (1 + \[Epsilon] Sin[v])
t[u_, v_, p_, \[Epsilon]_] := p Sin[u] (1 + \[Epsilon] Sin[v])
KleinBottle4D[p_, r_, \[Epsilon]_, \[Alpha]_] :=
ParametricPlot3D[{x[u, v, r], y[u, v, r],
Cos[\[Alpha]]*z[u, v, p, \[Epsilon]] +
Sin[\[Alpha]]*t[u, v, p, \[Epsilon]]}, {u, 0, 2*Pi}, {v, 0, 2*Pi},
ColorFunction -> Hue, PlotRange -> All, Mesh -> None]
KleinBottle4D[1/3, 1/2, -1/3, Pi/4]