A minimal surface is what a soap film makes: at every point it curves as much one way as the other. Alfred Enneper found this one in 1864, and it has a simple formula in two parameters u and v. You will sample it on a grafted grid, fit a smooth surface through the samples and slice it into contour lines.
Reference: choose on the canvas toolbar to load the finished definition.
Build it
The parameter grid
-
Place four sliders: Parameter range: 1.2 (0.5 – 2) with Decimals
2, Grid: 30 (10 – 50) and Contours: 12 (2 – 40) with Decimals0, and Size: 20 (5 – 40). -
Place a Multiplication (Maths) with B
-1after Parameter range, and two Range (Maths) components, u and v, from −range to +range with Grid → N.
The formula
-
Place three Expression (Maths) components:
-
X:
z*(x - x3/3 + x*y2); -
Y:
z*(y - y3/3 + y*x2); -
Z:
z*(x2 - y2). -
On all three wire u → x, v → y with Graft on y, and Size → z.
-
-
Place a Construct Point (Vector) with X, Y and Z: 31 rows of 31 points.
-
Place an Addition (Maths), Grid +
1, and a Surface From Points (Surface): the points → P with Flatten, the Addition → U.
Contours
-
Place an Expression,
0.95*z*x*2, with *Parameter range → x and Size → z: just inside the highest point, so the top level is not a single point. Place a Multiplication with B-1after it. -
Place a Range, Levels, from the negative to the positive value with Contours → N, and a Contour (Curve) with Surface → S and Levels → D.
-
Turn Preview off on Construct Point.
What is happening
The formula comes from the Weierstrass–Enneper representation, which turns simple complex functions into minimal surfaces. The surface is a saddle whose edges curl over as u and v grow. It passes through itself once a point lies more than √3 from the origin in (u, v); the corners of the square grid lie √2 × the range out, so the surface stays clean up to a range of about 1.22. The geometry tests check that the fitted surface passes through points computed straight from the formula.
Each update takes about a second, mostly the contours.
Things to try
-
Raise Parameter range to 1.8 and watch the flaps cross; lower it to 0.6 for a gentle saddle.
-
Raise Contours to 30 for a dense topographic look.