From a sine to a path
The wave is sampled at period × 18 points across the width, each at base − amplitude × sin(t × period × 2π + phase). Those points are joined with a Catmull-Rom spline converted to cubic beziers, which produces a curve that passes through every sample: the control points are derived from the neighbouring points rather than guessed, so the visible amplitude stays where the slider says.
Sampling density is the one trade in the generator. Too few points and a short period looks faceted; too many and the path grows without improving the shape. Eighteen samples per period keeps a full-bleed section smooth at about six kilobytes of markup, which is less than one photograph's worth of bytes for a shape that stays sharp at any width.
Why a blob needs a seed and not a random call
A blob is a ring of points around a centre, each pushed in or out by a small random factor and joined with a closed spline. If that randomness came from Math.random(), the shape would change on every reload and could never be shipped or discussed. A 32-bit integer seed feeding mulberry32 makes the sequence a pure function of the number: the same seed gives the same seven points in the same order, so the blob is a document you can reproduce, not a moment you happened to catch.
Consecutive layers are drawn from the seed plus a prime offset, so two layers of one blob are related but not identical, which is what makes a stacked blob read as depth rather than as a blurred edge.
preserveAspectRatio, and the amplitude that follows
A wave section usually wants to fill its container at any width, so the SVG is written with preserveAspectRatio="none". The viewBox is 1200 wide and 320 tall; a 1920-pixel container stretches the curve by 1.6 horizontally and leaves the height alone, which flattens the apparent amplitude. That is normally fine, and it is why the amplitude slider goes higher than a fixed-width design would need. When the amplitude has to be exact, keep the aspect ratio and let the SVG letterbox, or set a fixed background-size and repeat.
Data URI output, and where it stops
The CSS tab encodes the same markup with encodeURIComponent and puts it in a background-image. Every # in a colour becomes %23, which is the detail hand-written data URIs get wrong: an unencoded hash ends the URI at the fragment and the background silently disappears. The page also writes background-size: 100% 100%, because a data URI background defaults to the image's intrinsic size and would tile a 1200-wide wave across the element.
This form is for a web page. Most mail clients strip data URI backgrounds, and a CMS that sanitises CSS will strip them too; there, download the SVG and use it as an image with an empty alt, since the shape is decoration.
Decoration has rules too
The generated markup has no script, no external reference and no foreignObject, so it can be inlined in a page with a strict content policy and it cannot execute anything. Put aria-hidden="true" on a decorative inline SVG, or keep the role="img" and label this page writes and give it a real description if the shape carries meaning. And watch the contrast of text placed on top: a two-stop gradient from a dark to a light colour will fail a contrast check somewhere along its length, so either keep the text on the safe end or add a scrim.
When the section needs a background behind the wave, Pikkola Gradient makes the layers. When the shape is a sheet of sprites rather than an edge, Pikkola Sprite is the page.