# Living Wave

Wave · y = f(x, t)

`y = sin(1/x + t)`

[Open in the app](https://www.wavelace.com/app#p=13) · [This page](https://www.wavelace.com/presets/living-wave)

### What it draws

Everything interesting is in `1/x`. Out at the edges it changes slowly and the curve is a long lazy swell. The local wavenumber is `1/x²`, so crests are `2π·x²` apart: `25` at `x = 2`, `6.28` at `x = 1`, both wider than the plot itself.

Closer in they crowd, to `1.57` at `x = 0.5` and `0.063` at `x = 0.1`. The zeros sit at `x = 1/(nπ − t)` for every whole `n`, an infinite crowd of them piling into the origin. At `x = 0` the formula has no finite value at all, and a gap is left there rather than a line drawn through it.

### Where the wiggles come from

Adding `t` to the phase makes the pattern move outward. A feature of fixed phase satisfies `1/x + t = constant`, so it sits at `x = 1/(c − t)` and travels at `x²` units per second. That is a crawl of `0.04` at `x = 0.2`, one unit per second at `x = 1`, four at `x = 2`. Oscillations are manufactured at the origin without end, stretch as they run out, and leave at the edge. At any fixed `x` the height cycles with period `2π ≈ 6.28` seconds at Speed 1.

Frozen at one instant this is the *topologist's sine curve*, the standard example of a set that is connected but not path-connected. No path along it reaches the origin, since that means climbing through infinitely many crests. Near `x = 0` the function takes every value between `−1` and `1` infinitely often, the real shadow of the essential singularity `sin(1/z)` has there. The picture cannot show it: near the middle the crests are finer than the plot can resolve, and the hash drawn there is aliasing rather than the function.

### Try

- Pull `Span of x` down to 1: the whole plot is the crowded region.
- Tame it with `sin(1/x + t)·x`, squeezed to nothing at the origin, which it now reaches.
- Make it worse with `sin(1/(x·x) + t)`: even in `x`, crests `π·x³` apart, aliasing further out.
- Turn `Speed` down to 0.25 and watch one crest walk out from the middle, slow at first, then faster.
- Look from `Top`: the tracks left through the ribbon curve away from the origin as the crests gather speed.

### Read more

- [Topologist's sine curve](https://en.wikipedia.org/wiki/Topologist%27s_sine_curve)
- [Essential singularity](https://en.wikipedia.org/wiki/Essential_singularity)
- [Aliasing](https://en.wikipedia.org/wiki/Aliasing)
- [Nyquist–Shannon sampling theorem](https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem)
