Enum PdnWavesPattern
- Namespace
- PaintDotNet.Effects.Gpu
- Assembly
- PaintDotNet.Effects.Gpu.dll
Specifies how PdnWavesEffect arranges its wavefronts, and which direction it displaces the image in.
public enum PdnWavesPattern
Fields
Linear = 0Parallel wavefronts travelling in the direction given by the effect's Angle, displacing the image perpendicular to that direction. Never folds.
Radial = 1Concentric wavefronts radiating from the effect's Center, displacing the image along the radius. This is the ripples-on-a-pond pattern. Folds at high amplitude.
LongitudinalLinear = 2Parallel wavefronts as with Linear, but displacing the image along the direction of travel instead of across it. This compresses and stretches the image into bands, like an accordion, rather than making it undulate. Folds at high amplitude.
Tangential = 3Concentric wavefronts as with Radial, but displacing the image around the center rather than toward and away from it, so successive rings twist in alternating directions. Never folds, so it tolerates much larger amplitudes than Radial.
SquareRings = 4Concentric square rings, using the larger of the two axis distances from Center in place of a true radius. Displaces along the radius. Folds at high amplitude.
DiamondRings = 5Concentric diamond rings, using the sum of the two axis distances from Center in place of a true radius. Displaces along the radius. Folds at high amplitude.
Crossed = 6Two sets of parallel wavefronts at right angles, each displacing the image across its own direction of travel. The result is a woven, basket-like warp. Each component is a shear on its own, but composing the two is not one-to-one, so this folds at high amplitude just as the along-gradient patterns do.
Angular = 7Wavefronts arranged as spokes around Center, with the phase driven by angle rather than distance. Displaces along the radius, producing rosettes and starbursts. The number of lobes comes from the effect's Lobes property; Wavelength is unused.
Spiral = 8Spiral wavefronts, combining a distance-driven phase with an angle-driven one. Displaces along the radius. The effect's Lobes property sets how many turns the spiral makes.
FromEdges = 9Wavefronts running parallel to the image border, displacing inward. The phase runs from zero at the nearest edge up to a maximum at Center, so the ripples travel in from the frame and converge on that point.
Each edge distance is normalized by how far Center sits from that edge. With Center in the middle of a square region that reduces to a plain distance-to-nearest-edge; on a non-square region it converges the wavefronts onto the single Center point rather than onto the long medial line that an unnormalized distance would produce.
Remarks
Each pattern is really two independent choices: where the wave's phase comes from (a projection
along a direction, a distance from a center point, an angle around it), and whether the
displacement runs along that phase gradient or across it.
That second choice decides whether the pattern can fold over itself. Displacement across
the gradient is a shear, and a shear is one-to-one at any amplitude. Displacement along
the gradient piles pixels up once the amplitude gets large relative to the wavelength — see the
remarks on Amplitude.