Attempting to embed the flat square torus in $\mathbb{R}^3$ — a necessarily imperfect compromise
Flat tori do not embed smoothly in R3 — this is a consequence of the Gauss equation relating intrinsic and extrinsic curvature. But it is interesting to see what happens when one tries. This program starts with a torus mesh whose intrinsic geometry is that of the flat square torus R2/Z2 and attempts to find an embedding into R3 via a spring-and-charge system.
The spring system tries to enforce the flat metric while the mesh is forced to close up as a torus in 3-space. The result is a compromise surface that necessarily has nonzero Gaussian curvature. Properties of the spring-charge system can be modified via the menu in the upper right.
Controls: Click and drag to orbit, scroll to zoom.