gaussBell
A bell curve: 1 at zero, falling toward 0 on both sides.
gaussBell(x: Expr, k: Val): Expr
Import math from shaders/std and use math.gaussBell.
k sets the width. Larger values give a narrower bell. Pass a distance or a centered coordinate as x.
Parameters
| Name | Type | Notes |
|---|---|---|
x | Expr | |
k | Val |
Example
const profile = gaussBell(div(beam.across, beamWidth), 2.5)
See also
exp— e raised to the value.smoothstep— A soft edge: 0 belowe0, 1 abovee1, an S-curve between.