Flag of the United Kingdom
Andreas Rejbrands webbplats

Algosim 3.1: The umbilic torus

As a second example of plotting parameterised surfaces, let’s make an animated umbilic torus.

Unlike the Möbius strip, the umbilic torus divides ℝ3 into two parts – there’s an “inside” and an “outside”. Also unlike the Möbius strip, it is a two-sided surface, although only the external face is visible from the outside. Similar to the Möbius strip, it has a single “edge”, but whereas the edge of the Möbius strip goes two times around the z axis, the edge of the umbilic torus goes three times around it.

The camera in the animation above rotates about the z axis at the same angular rate as a highlighted u = const parameter curve. A single point on this parameter curve is indicated by a yellow ball; this ball moves along the single edge of the torus, so it goes three times around the z axis before it returns to its original position.

An inset shows the parameter-plane coordinates of the ball’s position.

Notice that each u = const parameter curve – and therefore the cross section of the torus – is a deltoid.

Full source:

F ≔ (u, v) ↦

sin(u) ⋅ (7 + cos(u/3 − 2⋅v) + 2⋅cos(u/3 + v)),
cos(u) ⋅ (7 + cos(u/3 − 2⋅v) + 2⋅cos(u/3 + v)),
sin(u/3 − 2⋅v) + 2⋅sin(u/3 + v)
❩;
ForEach('(false, true), Opaque, (
S ≔ ClearScene("Umbilic torus");
T ≔ surf([−π, π] × [−π, π] @ F);
B ≔ sphere();
AdjustVisual(S,
"window width": 1080,
"window height": 1080);
AdjustVisual(S.axes, "grid count": 0);
AdjustVisual(T,
"unisided": true,
"show parameter curves": true,
"line width": .5,
"show surface": Opaque);
AdjustVisual(B,
"color": "yellow",
"radius": .2);
t ≔ 0.0;
u ≔ 0;
v ≔ 0;
Γ ≔ curve([−π, π] @ (s ↦ F(t, s)));
Π ≔ ClearDiagram("Parameter plane");
AdjustVisual(Π.view,
"xmin": −π,
"xmax": π,
"ymin": −π,
"ymax": π);
AdjustVisual(Π,
"auto normalize": true,
"window width": 300,
"window height": 300);
D ≔ disk(❨0, 0❩, 0.1);
scene("Umbilic torus");
repeat(
AdjustVisual(S.view, "rθφ": ❨28, π/4 − .75⋅π/4⋅sin(t/3)^5, π/4 − t❩);
Γ2 ≔ Γ; Γ ≔ curve([−π, π] @ (s ↦ F(t, s))); RemoveVisual(Γ2);
AdjustVisual(Γ,
"line width": 10,
"color": "black");
AdjustVisual(B, "position": F(u, v));
AdjustVisual(D, "position": ❨u, v❩);
t ≔ t + 0.02;
u ≔ u + 0.02;
if(u > π, (u ≔ u − 2⋅π; v ≔ v + 2⋅π/3));
if(v > π, (v ≔ v − 2⋅π));
sleep(0.01);
if(t > 3⋅2⋅π, break());
)
));

Visa alla tidigare notiser.

Visa enbart de senaste notiserna.