Bézier curves
The conceptWhy a letter on your screen stays smooth when you zoom to 400%
A Bézier curve is a smooth curve stored as just a few points, called control points. The curve starts at the first point and ends at the last; the points in between pull it towards them like magnets, but it usually does not touch them.
To draw it, slide a number t from 0 to 1; for each t, the formula blends the control points with weights that add up to 1. With start 0, middle 10 and end 0, the curve peaks at only 5: the middle point pulls but is not reached.
What it’s forGives the position of a point on a quadratic Bézier curve with three control points.
B(t) = (1−t)²·P₀ + 2(1−t)t·P₁ + t²·P₂
- t
- how far along the curve you are, from 0 (start) to 1 (end)
- P₀, P₂
- the start and end points, which the curve passes through
- P₁
- the control point that bends the curve towards itself
- B(t)
- the point on the curve at position t
What it givesOne point on the curve; repeating for many values of t traces the whole curve.
- P₀ = 0, P₁ = 10, P₂ = 0, t = 0.5
- Weights: 0.25, 0.5, 0.25
- 0.25·0 + 0.5·10 + 0.25·0 = 5