Skip to content

Wake

Draw a stylus through the bath and the water ahead of the tip bulges forward while the water at the flanks streams backward around it. That is the instantaneous flow around a rigid cylinder of radius aa moving through an inviscid fluid — the potential-flow doublet. In the stroke frame, with xx along the tip’s per-pass motion d⃗\vec d (magnitude U ΔtU\,\Delta t):

for r>a:xsrc=x−d a2(x2−y2)r4,ysrc=y−d 2a2xyr4\text{for } r > a:\quad x_{src} = x - d\,\frac{a^2 (x^2 - y^2)}{r^4},\qquad y_{src} = y - d\,\frac{2 a^2 x y}{r^4} for r≤a:Psrc=P−d⃗\text{for } r \le a:\quad P_{src} = P - \vec d

Inside the tip there is no fluid: the body moves rigidly with the pen. That boundary condition removes the r→0r \to 0 singularity exactly and matches the outer field with zero seam on the motion axis.

Two strokes of length d — left to right through the top-left cluster, top to bottom through the bottom-right — one sub-step per pace: the forward bulge, the trailing cusp, the rings threaded around the tip.open full size ↗

The viscous profile: an impulse in a Stokes layer

Section titled “The viscous profile: an impulse in a Stokes layer”

The doublet is the inviscid limit. Since v0.7 the settings offer a second fluid for the same stroke: the paint layer as a 2-D unsteady Stokes flow, and the stylus tip as an impulsive point force spread over the tip radius. The velocity of an impulse Fx^ δ(x)δ(t)F\hat{x}\,\delta(\mathbf{x})\delta(t) follows from the stream function ψ=(F/ρ) y (1−e−s)/(2πr2)\psi = (F/\rho)\,y\,(1 - e^{-s})/(2\pi r^2) with s=r2/4ντs = r^2/4\nu\tau; integrating it in time gives the displacement in closed form. With the impulse as a Gaussian blob of radius aa (the tip) and the momentum diffused to ℓ=a2+4νt\ell = \sqrt{a^2 + 4\nu t} by the end of the pass, in the stroke frame:

χ(S)=1−e−SS,Φ(S)=χ(S)+E1(S),S0=r2a2,S1=r2ℓ2,L=ln⁡ℓa\chi(S) = \frac{1 - e^{-S}}{S},\qquad \Phi(S) = \chi(S) + E_1(S),\qquad S_0 = \frac{r^2}{a^2},\quad S_1 = \frac{r^2}{\ell^2},\quad L = \ln\frac{\ell}{a} dx=d2L[Φ(S1)−Φ(S0)]−dL y2r2[χ(S1)−χ(S0)],dy=dL xyr2[χ(S1)−χ(S0)]d_x = \frac{d}{2L}\bigl[\Phi(S_1) - \Phi(S_0)\bigr] - \frac{d}{L}\,\frac{y^2}{r^2}\bigl[\chi(S_1) - \chi(S_0)\bigr], \qquad d_y = \frac{d}{L}\,\frac{xy}{r^2}\bigl[\chi(S_1) - \chi(S_0)\bigr]

where E1E_1 is the exponential integral and the normalisation makes the tip itself move by exactly dd. The field is exactly divergence-free and mirror-symmetric about the stroke, and its far field is a 1/r21/r^2 doublet tail like the inviscid wake’s. Unlike the doublet it is a linearized displacement, area-preserving to first order per pass, so it is sub-stepped at d≤a/4d \le a/4, the same budget as the doublet (measured: ∣∇d∣≤0.25 d/a|\nabla d| \le 0.25\,d/a for every ℓ/a≥1.5\ell/a \ge 1.5). The setting spread is ℓ/a\ell/a: small is a sharp, close stroke; large is soft and far-reaching.

The same two strokes with the viscous profile: the bands ahead of the tip compress into a point and spread perpendicular to the motion, a sharp V trails the tip — what Jaffer saw in the tank. Drag l to see viscosity take over.open full size ↗
  • Magnitude is not a parameter. It is the tip displacement d=U Δtd = U\,\Delta t — wake strength is pen speed, by physics.
  • Sub-stepping is required. At exactly d=a/2d = a/2 the inverse map’s Jacobian reaches zero at the rear stagnation point (1−2d/a1 - 2d/a), so a/2a/2 is the fold threshold itself, not a safe budget. The engine subdivides every stroke segment so each pass stays at or under a/4a/4, counting the passes against the same per-frame budget as glide tines.
  • Orientation test. Ink directly ahead of the tip must bulge forward, ink at the flanks stream backward. If it renders inside-out, the inverse-lookup sign is flipped — the earlier draft’s ++ contradicted its own zero-seam claim at the front pole, and the field was re-derived from the doublet potential φ=−Ua2x/r2\varphi = -U a^2 x / r^2 that satisfies the no-penetration boundary.
  • Tip radius from force: a=0.006+0.030⋅forcea = 0.006 + 0.030 \cdot \text{force} canvas heights — a harder press is a fatter tip and a wider wake.
  • Every stylus stroke segment, in both Marble and Play mode, rides a wake through sumi_add_wake. Desktop: middle-drag (the scroll wheel sets aa).
  • A wind legato. In wind mode a note change drags the sounding drop to the new pitch’s site as a rigid tip — aa is the drop’s current radius, the profile and spread are the stylus settings — and then the new note strikes. The one MIDI-driven wake: the operator that made the wandering brush unnecessary.
  • Never generated. The wake is physical, not musical, and is deliberately absent from the play surface’s stream: a DAW recording of a pencil performance replays the notes, bends, CC 74 and pressure exactly — and no wakes, because a DAW has no stylus in the water. This is one of the two documented exceptions to the loopback-conformance rule (the other is CC 74 under slide_mode = 1).

The closed-form short-stylus-stroke field is Aubrey Jaffer’s: Oseen Flow in Paint Marbling (arXiv:1702.02106, 2017) derives an exact velocity field for slow, viscous (Oseen) flow past a stylus and turns it into a marbling homeomorphism by iterating it — he notes the displacement itself has no closed form. midi-sink converged on the same problem from the inviscid end — the potential doublet with a rigid tip — before finding his paper. The viscous profile above takes a third route to the same picture: the exact time-integrated response of a Stokes layer to an impulse, which is closed form for a force at rest, applied along the stroke one sub-step at a time. The lineage note is the least we owe. See the citations.

a is the tip radius, d the total stroke length; the engine sub-steps the stroke internally so the picture is the same however long the stroke.

midi-sink 2.0.0-rc.5 · AGPL-3.0 · source