メインコンテンツまでスキップ

quarticIn: Fourth-Power Acceleration

Extreme polynomial acceleration from near-zero motion

The quarticIn function creates dramatic acceleration through fourth-power scaling. This produces extremely slow initial motion followed by rapid acceleration toward completion.

f(t)=t4f(t) = t^4

The quartic relationship amplifies the acceleration effect beyond quadratic and cubic curves. Values remain close to zero for extended periods before experiencing dramatic velocity increases.

ライブエディター
const fragment = () => {
  const w = 0.01
  const t = iTime.fract()
  const y = quarticIn(t)
  const Y = quarticIn(uv.x)
  const a = vec3(0.1, 0.3, 0.9)
  const b = vec3(0.9, 0.8, 0.2)
  const c = a.mix(b, y).mul(uv.x.step(t))
  const lines = mmin2(smoothstep(0, w, uv.mod(0.1).min(uv.sub(vec2(t, y)).abs())))
  const curve = stroke(uv.y.sub(Y), 0, w).mul(c)
  const color = lines.oneMinus().mul(0.2).add(curve)
  return vec4(color, 1)
}