Heart
Shape · (x, y, z) = f(u, v, t)
(0.1 · sin(v) · (15 · sin(u) − 4 · sin(3u)), 0.1 · sin(v) · (19 · cos(u) − 5 · cos(2u) − 2 · cos(3u)), 0.1 · 8 · cos(v))
Open in the app The dials and keys named below are the app's.
What it draws
The parameter u goes round the outline of a heart, and v sweeps that outline from the back of the figure to the front. The second expression is the height, 0.1·sin(v)·(19·cos(u) − 5·cos(2u) − 2·cos(3u)). The first is the width, 0.1·sin(v)·(15·sin(u) − 4·sin(3u)), and the third, 0.8·cos(v), is the depth. Nothing depends on t, so the figure stands still.
At v = π/2 the factor sin(v) is 1, and the outline is the heart at full size in the vertical plane z = 0. Its point is at u = π, height −2.2. The cleft between the lobes is at u = 0, height 1.2, and the lobes crest at 1.49. The widest points, x = ±1.9, fall at u = π/2 and 3π/2.
The heart curve
Both outline expressions are trigonometric polynomials: sums of sines and cosines of whole multiples of u. In the width, 15·sin(u) − 4·sin(3u) is a fattened form of 16·sin(u)³, which expands exactly to 12·sin(u) − 4·sin(3u). The extra 3 widens the lobes from ±1.6 to ±1.9.
In the height, 19·cos(u) alone would draw an ellipse. The term −5·cos(2u) pulls the top down at u = 0, and −2·cos(3u) pushes the two lobes up on either side. Between them they are the whole dent.
The sweep
The outline is scaled by sin(v) while it is placed in depth at 0.8·cos(v), and that pair traces an ellipse as v runs 0 → π. The heart therefore grows from a point at the back, reaches full size in the middle plane, and shrinks to a point at the front. It is a solid built the way a sphere is, with heart-shaped sections in place of circles.
Try
- Front in the deck: straight on, the outline is the plane heart curve.
- Put the textbook cube in the width, 0.1·sin(v)·16·sin(u)³: the same heart with narrower lobes, ±1.6 wide.
- Set Span of v (×π) to 2. Past v = π the factor sin(v) is negative, so a second heart, point upwards, is traced through the first.
- Give the depth a beat, 0.1·8·cos(v)·(1 + 0.3·sin(t)): the figure swells front to back every 2π ≈ 6.28 seconds at Speed 1.