Property Amplitude
- Namespace
- PaintDotNet.Effects.Gpu
- Assembly
- PaintDotNet.Effects.Gpu.dll
Amplitude
The furthest distance that a pixel will be displaced, in pixels. This is an upper bound
rather than an exact figure: a waveform steep enough to fold earlier than a sine is scaled
down to match it, and so does not reach the full amplitude. Negative values invert the
wave, which is equivalent to shifting the phase by 180 degrees.
The default value is 100. There is no fixed ceiling: callers scale this to the image, and
half the minor axis of a large one runs past any bound worth naming.
public DynamicImage.ValuePropertyAccessor<float> Amplitude { get; }
Property Value
Remarks
Whether there is a practical ceiling here depends on the pattern. Where displacement runs
along the same axis as the wave's phase (Radial,
LongitudinalLinear, SquareRings,
DiamondRings, Spiral, and
FromEdges), too much of it makes the image fold over itself.
Staying below WaveLength/(2pi) keeps the mapping one-to-one. That single
bound covers every waveform, because each one is normalized so that its steepest slope is
no greater than a sine's; the exception is Semicircle, whose
slope is unbounded where its arcs meet, so it creases at any amplitude.
Crossed shares that bound even though each of its two
components displaces across its own phase gradient, because composing two perpendicular
shears gives a Jacobian determinant of 1 - A^2f'*f'/WaveLength^2, which changes sign at
the same ratio.
Linear and Tangential have no
limit at all: the first is a single shear, and the second rotates each circle around
Center rigidly. Both are invertible at any amplitude.
Angular is its own case. It takes its phase from the angle,
so WaveLength does not apply, and it always degenerates within a radius of
roughly the amplitude around Center, where the displacement reaches back
past the center.