parabola: Parabolic Curvature Metamorphosis Engine
Parabolic Curve Generation
The parabola
function creates smooth parabolic curves based on the formula raised to a power. This generates bell-shaped curves that peak at the center (x=0.5) and fall off towards the edges, useful for creating smooth gradients and falloffs.
The fundamental transformation follows the curvature metamorphosis equation:
Where defines the field domain and controls curvature intensity. The base expression generates the canonical parabolic arch peaking at , while the exponential parameter enables adaptive curvature modulation:
This mathematical foundation enables seamless transitions between uniform distributions and highly focused field concentrations.
ライブエディター
const fragment = () => { const center = vec2(0.5, 0.5) const fieldPos = uv.sub(center).abs() const radialDistance = fieldPos.length().clamp(0, 0.5).mul(2) const temporalModulation = iTime.mul(0.4).sin().mul(0.5).add(1.5) const parabolicField = parabola(radialDistance, temporalModulation) const intensityMapping = parabola(parabolicField, iTime.mul(0.3).cos().abs().mul(3).add(1)) const focusedEnergy = intensityMapping.pow(2.2) const energyDistribution = focusedEnergy.mul(fieldPos.x.add(fieldPos.y).mul(1.5)) const r = focusedEnergy.mul(energyDistribution.pow(0.7)) const g = energyDistribution.mul(parabolicField.pow(1.8)) const b = parabolicField.mul(radialDistance.oneMinus().pow(0.9)) return vec4(r, g, b, 1) }