§27's wind: a drag toward a moving air mass rather than toward rest.
a = coefficient · (wind − v)
The fixed point is v = wind — a particle released into it accelerates until
it drifts with the air and then stops accelerating, which is what
distinguishes wind from "a constant sideways push" (that is
uniformGravityField with a horizontal vector). Under the emitter's
step the approach is exactly geometric:
vₙ = wind + (v₀ − wind) · (1 − coefficient · dt)ⁿ
so 1 / coefficient is the e-folding time in seconds, and the same
coefficient · dt < 1 stability note as dragField applies.
windField(w, c) and dragField(c) differ by exactly the constant
c · w; both are shipped because authoring "the air moves at 4 m/s east" is
not the same act as authoring "damp everything".
§27's wind: a drag toward a moving air mass rather than toward rest.
The fixed point is
v = wind— a particle released into it accelerates until it drifts with the air and then stops accelerating, which is what distinguishes wind from "a constant sideways push" (that is uniformGravityField with a horizontal vector). Under the emitter's step the approach is exactly geometric:so
1 / coefficientis the e-folding time in seconds, and the samecoefficient · dt < 1stability note as dragField applies.windField(w, c)anddragField(c)differ by exactly the constantc · w; both are shipped because authoring "the air moves at 4 m/s east" is not the same act as authoring "damp everything".