Elysia Tools

Navigation

Math

Bézier Curves and the de Casteljau Algorithm

Drag control points to reshape a Bézier curve, then move t to see the de Casteljau construction and Bernstein weights.

Open static visualization

Tool usage guide

Learn when to use this tool, what it supports, and how real users apply it.

Overview

A Bézier curve is determined by a sequence of control points. Start with the cubic preset and drag an interior point. The purple curve changes shape while its two endpoints stay where they are. The gold marker shows B(t), the point for the current parameter.

How de Casteljau finds a point

Fix t and take the same fraction along every edge of the control polygon. Connect the resulting points, then use the same t on the new segments. A cubic starts with four control points. Its next levels contain three points, two points and finally B(t).

The construction lines belong to the current t. Moving the slider changes those intermediate levels. The purple curve shows the full set of points traced as t ranges from zero to one.

What the Bernstein weights tell you

You can also compute B(t) as a weighted sum of the control points. The Bernstein weights depend on t and the curve degree. On the parameter interval from zero to one, they are nonnegative and add up to one, keeping the curve within the convex hull of its control points.

At fixed t, moving one control point moves B(t) by that point’s weight times its displacement. For the cubic at t = 0.50, the weight under P₁ tells you how far the gold marker will move when you shift that handle.

Endpoint directions and SVG paths

A degree-n curve starts at P₀ and ends at Pₙ. Its derivatives there are n(P₁ − P₀) and n(Pₙ − Pₙ₋₁). When those vectors are nonzero, they give the tangent directions. SVG uses the same representation in its Q and C commands for quadratic and cubic segments.

How it works

  1. 1Choose the curve degree. Each preset retains its own control points so you can switch back to a shape you edited.
  2. 2Pause playback and set t. Check the gold marker, the Bernstein weights and the selected control point coordinates. On this grid, x increases to the right and y increases downwards.
  3. 3Drag a handle or move it with the arrow keys. Reset curve restores the current degree’s preset and sets t to 0.50.

Edge cases & common failures

  • Coincident endpoint and handle

    The derivative is zero at that endpoint, so the collapsed control edge gives no tangent direction. The curve still passes through the endpoint.

  • Parameter speed and curve speed

    Playback advances t at a steady rate on each pass. The distance traveled per second depends on the local rate of change of B(t).

  • All control points coincide

    Every level of the construction stays at the same position, and the curve reduces to a single point.

Examples

1. Build a quadratic with midpoints

How to use

Select the quadratic preset, reset the curve and turn on the construction lines. Keep t at 0.50.

Outcome

The first two constructed points are the midpoints of the control edges. Their midpoint is B(t) = (0.500, 0.450).

2. Measure the influence of one handle

How to use

Reset the cubic preset and leave t at 0.50. Move P₁ straight down until its selected-point y reading goes from 0.200 to 0.600.

Outcome

The weight of P₁ is 0.375, so B(t) moves down by 0.150 to (0.500, 0.475).

At a Glance

Interactive Preview

Bézier Curves and the de Casteljau Algorithm
Static preview of this visualization. Use the interactive panel above to explore it.

Verified Results

Typical Experiments and Results

Every parameter set and result below is a fixed output of this page's built-in model (each asserted before delivery) and reproduces directly: set the Parameters column in the interactive panel.

ScenarioParametersResult
One quarter of a line segmentLinear preset, t = 0.25B(t) = (0.325, 0.600), b = (0.75, 0.25)
Quadratic midpoint constructionQuadratic preset, t = 0.50B(t) = (0.500, 0.450), b = (0.25, 0.50, 0.25)
Cubic endpointsCubic preset, t = 0 → 1B(0) = (0.150, 0.700), B(1) = (0.850, 0.700)
From control polygon to one pointCubic preset, t = 0.50Point counts 4 → 3 → 2 → 1, B(t) = (0.500, 0.325)
Fifth-degree weightsFifth-degree preset, t = 0.50b = (1, 5, 10, 10, 5, 1) / 32, B(t) ≈ (0.500, 0.294)
Moving one control pointCubic preset, t = 0.50, P₁.y = 0.20 → 0.60Δy = +0.150, B(t) = (0.500, 0.475)

Sources

References

Papers and datasets underlying this visualization - every formula, algorithm, and data anchor on the page traces back to the sources below.

  1. [1]

    Wolfgang Boehm, Andreas Müller (1999). On de Casteljau's algorithm. Computer Aided Geometric Design 16(7), 587–605.

    View source→ de Casteljau triangle, repeated (1 − t)A + tB, endpoint interpolation
  2. [2]

    Rida T. Farouki (2012). The Bernstein polynomial basis: A centennial retrospective. Computer Aided Geometric Design 29(6), 379–419.

    View source→ bₙ,ᵢ(t) = C(n, i)(1 − t)ⁿ⁻ⁱtⁱ, Σbₙ,ᵢ = 1, convex hull
  3. [3]

    Rida T. Farouki, V. T. Rajan (1988). Algorithms for polynomials in Bernstein form. Computer Aided Geometric Design 5(1), 1–26.

    View source→ Bernstein-form polynomial evaluation and numerical behavior
  4. [4]

    Ching-Kuang Shene. Derivatives of a Bézier Curve. Michigan Technological University, CS3621 course notes.

    View source→ B′(0) = n(P₁ − P₀), B′(1) = n(Pₙ − Pₙ₋₁)
  5. [5]

    Paul de Faget de Casteljau (1999). De Casteljau's autobiography: My time at Citroën. Computer Aided Geometric Design 16(7), 583–586.

    View source→ Firsthand account of cubic-curve construction at Citroën
  6. [6]

    Pierre E. Bézier (1968). How Renault Uses Numerical Control for Car Body Design and Tooling. SAE Technical Paper 680010.

    View source→ Free-form curve design and numerical tooling at Renault
  7. [7]

    W3C SVG Working Group. Paths. Scalable Vector Graphics (SVG) 2.

    View source→ §9.3.6 cubic C and §9.3.7 quadratic Q path commands

Related

Related tools and workflows

Development

Gray Code and Thermometer BCD Encoder Visualizer

Convert an N-bit value to binary, Gray, one-hot and thermometer codes with a counting truth table, Hamming-distance chart and Verilog/VHDL encoder stubs.

Utilities

Utility Bill Line-Item Decoder & Hidden Fee Detector (CSR/CFL/MHC/HFA Riders, Peak Demand, kWh↔Btu↔therm↔ton-hours)

Decode home and commercial electric/gas/water bills: classify tariff riders and charges (CSR/CFL/MHC/HFA-style codes, TOU on/off-peak, demand, capacity tag, decoupling), convert kWh↔Btu↔therms↔Ccf↔m³↔ton-hours with EIA factors, expose hidden fixed fees, and project annual cost with load-factor and peak-shaving savings.

Format Conversion

AsciiMath LaTeX MathML Equation Converter

Convert equations between AsciiMath, LaTeX and MathML: auto-detect the input format, produce canonical LaTeX, presentation MathML with an embedded TeX annotation, a best-effort AsciiMath back-translation, a screen-reader aria-label snippet (role=math), and a KaTeX HTML preview.

Media

Audio Automatic Fade Designer

Design and render musical fade-ins and fade-outs: bar-based lengths at your BPM or lengths auto-derived from detected silence, fades placed against the real music span, logarithmic curves, optional silence trimming.

Next

More visualizations nearby

Cookie settings

Essential cookies keep the site running. Analytics and personalized ads are optional.

Cookie policy