Skip to main content

Cubic Bezier point and tangent calculation

Short answer

Using Bernstein polynomials: P(0.25)=(1.0625,1.828), P(0.5)=(2.5,2.625). End tangents: P'(0)=3(B1-B0)=(3,9), P'(1)=3(B3-B2)=(3,-12).

A cubic Bezier curve has control points B0 = (0, 0), B1 = (1, 3), B2 = (4, 4) and B3 = (5, 0). Calculate the points on the curve at u = 0.25 and u = 0.5 and the tangent vectors at the two ends. Verify the u = 0.5 point by the de Casteljau method.

Equation

P(u)=(1−u)3B0+3u(1−u)2B1+3u2(1−u)B2+u3B3\mathbf P(u)=(1-u)^3\mathbf B_0+3u(1-u)^2\mathbf B_1+3u^2(1-u)\mathbf B_2+u^3\mathbf B_3

At u = 0.5

Weights: 0.125, 0.375, 0.375, 0.1250.125,\ 0.375,\ 0.375,\ 0.125.

x=0.125(0)+0.375(1)+0.375(4)+0.125(5)=0.375+1.5+0.625=2.5y=0.125(0)+0.375(3)+0.375(4)+0.125(0)=1.125+1.5=2.625\begin{aligned} x&=0.125(0)+0.375(1)+0.375(4)+0.125(5)=0.375+1.5+0.625=2.5 \\ y&=0.125(0)+0.375(3)+0.375(4)+0.125(0)=1.125+1.5=2.625 \end{aligned}

At u = 0.25

Weights: (0.75)3=0.421875(0.75)^3=0.421875; 3(0.25)(0.75)2=0.4218753(0.25)(0.75)^2=0.421875; 3(0.25)2(0.75)=0.1406253(0.25)^2(0.75)=0.140625; (0.25)3=0.015625(0.25)^3=0.015625.

x=0.421875(1)+0.140625(4)+0.015625(5)=0.421875+0.5625+0.078125=1.0625y=0.421875(3)+0.140625(4)=1.265625+0.5625=1.828125\begin{aligned} x&=0.421875(1)+0.140625(4)+0.015625(5)=0.421875+0.5625+0.078125=1.0625 \\ y&=0.421875(3)+0.140625(4)=1.265625+0.5625=1.828125 \end{aligned}

End tangents

P′(0)=3(B1−B0)=3(1,3)=(3, 9),P′(1)=3(B3−B2)=3(1,−4)=(3, −12)\mathbf P'(0)=3(\mathbf B_1-\mathbf B_0)=3(1,3)=(3,\ 9),\qquad \mathbf P'(1)=3(\mathbf B_3-\mathbf B_2)=3(1,-4)=(3,\ -12)

De Casteljau check at u = 0.5

Repeated mid-points:

LevelPoints
0(0,0), (1,3), (4,4), (5,0)
1(0.5,1.5), (2.5,3.5), (4.5,2)
2(1.5,2.5), (3.5,2.75)
3(2.5, 2.625)

The result (2.5, 2.625)(2.5,\ 2.625) equals the formula value.

Answer: P(0.25) = (1.0625, 1.828); P(0.5) = (2.5, 2.625); P'(0) = (3, 9); P'(1) = (3, -12).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Aided Design chapter 3 questions →