Ran the equations Hamid Naderi Yeganeh published for his Sea Wave image and measured how close the result gets to his original. The equations are written on the artwork itself and no text version could be found, so they were read off the image symbol by symbol and turned into a numpy script that renders 2000×1200 on the original grid. The whole image is one closed-form function with no if anywhere: every condition is a step written as e^(−e^(kx)) with a very large k, the wave is 60 stacked layers with the product ∏(1−J) acting as a z-buffer, and the foam is 17 octaves of cosine noise. The playable version in this entry is a shader that runs the same equations on the GPU of whatever device opens the page: F, how many layers are drawn, the values once suspected of being misread, the step steepness k and the foam octaves can all be changed, and the image and the F(x) chart follow. The original is his work and is not reproduced here; every image in this entry is drawn from these equations.
The full equations
Transcribed from the formulas Hamid Naderi Yeganeh printed on his Sea Wave image, reordered from the pixel colour down to the smallest parts. Every function takes (x, y); the arguments are left out.
A 2000×1200 image · column m = 1…2000, row n = 1…1200 · the three channels are one equation at v = 0, 1, 2
Turns a value of H into a colour, 0–255 · the first transcription dropped the e^(−…) around the exponent of |x|, which is why that image came out white · the playable version in this entry opens with clamp(255x), within 1/255 of this F
Water (L) and sky, separated by the mask R₇₀
Paints layer by layer, s = −9…50 · the product ∏(1 − J_u) acts as a z-buffer: the first layer covering a pixel sets its colour
Wave layer s · no if anywhere, every condition is a step e^(−e^(kx)) · the term e^(−5000(s + 19/2)) makes J_s = 0 for every s ≤ −10
The sky and foam-edge mask
Foam noise, summed over 17 frequencies
Starting values
LAB.06 — A shader runs the same equations as render.py on the GPU of whatever device opens this page · it opens at the starting values: the published constants with F as clamp · measured on the author's integrated GPU at 2000×1200: 99.65% of pixels match render.py exactly and the rest differ by at most 1 per colour channel · the original image is not on this page, so there is no live similarity figure
ROUND 01Dropped
F as first transcribed, missing an e^(−…) — the whole image collapses to 4 colours, almost all white
ROUND 02Kept
F as clamp(255x) — sky, foam and ripples all appear, but the right edge shows more sky than the original
LAB.06 — Each frame is labelled kept or dropped · the reason sits underneath it
What was learned
The hardest knot was F(x), the last step that turns a value into a colour. The first transcription read its second factor as |x|^(e^(1000(x−1))) and gave a 4-colour image that is almost entirely white: the real H values sit between 0.106 and 1.196, and across nearly all of that range that term is about 1, which suggested a whole e^(−…) layer had been dropped, not a single minus sign. But the rendered image could only say the first reading was wrong, not which reading is right: clamp(255x) and wrapping the exponent in one more e^(−…) both give 15,552 colours and differ by at most 1/255 on just 9 pixels, invisible to the eye. The answer came from zooming into the original again (17 Sep 2026): the exponent of |x| is e^(−e^(1000(x−1))), as suspected, and the other 15 equations match the transcription exactly. Moved onto the GPU, the colours match numpy exactly on 99.65% of pixels at 2000×1200 and differ by at most 1 per channel on the rest (measured on the author's integrated GPU); the float32 GPU needed exponents clamped at ±80 instead of ±700 (e^700 overflows float32), which leaves the steps unchanged.
What fell short
Compared pixel by pixel with the original, 89.6% matches and 10.4% does not (mean colour difference 28 out of 765). Sky covers 32.3% of the original and 41.4% of the render; the left edge is nearly exact (strip x 0–250: 64.2% in the original, 64.6% rendered) but the right edge drifts (strip x 1750–2000: 2.3% vs 16.7%), because on the positive-x side |U_s| grows toward 1, C_s settles near 3, 400·C_s lands near 1200, well outside ±40 of 560 − 8s, and no wave layer attaches there. Three hypotheses that the equations were misread were tested: swapping U and V (worse), moving the 400 multiplier on C_s across 150–500, and moving the ±40 threshold across 40–120. All three failed. Zooming into the original again line by line (17 Sep 2026) found every equation matches the transcription except F, and the clamp used for rendering differs from the true F by at most 1/255, so the right-edge drift does not come from a misreading; why a render of the printed equations differs from his picture is still unknown. The constants were not bent to make the picture closer: this entry measures the published equations, it does not fit the image.
Line of experiments
LAB.06Drawing a sea wave with equations alone(this entry)