Skip to main content
100%

Catmull–Rom Curves

✓ Published0🌍 Public
Mmbostock
Last edited Nov 16, 2015
Created on Nov 13, 2015

Three interactive canvases compare Catmull–Rom curve interpolation under uniform, chordal, and centripetal parameterization, using the same seven control points rendered as white polylines. Each canvas overlays a static image of the curve, while a slider adjusts the alpha parameter via the `data-alpha` attribute. The code uses `d3.shape.line` with the `"catmull-rom"` interpolator and a Canvas 2D context to draw the paths. The example is based on Yuksel et al.’s research on parameterization effects, highlighting how each method handles overshoot and intersections differently.

AI-generated description

Cubic Catmull–Rom curves with (b) uniform, (c) chordal and (d) centripetal parameterization. From Yuksel et. al: “Uniform parameterization overshoots and often generates cusps and intersections within short curve segments, while chord-length parameterization exhibits similar behavior for longer curve segments. Centripetal parameterization is the only one that guarantees no intersections within curve segments.”

Similar vizzes