- 2069 Asar · 8 marks
Draw Bezier curve through 4 control points
Short answer
Use cubic Bezier blending: P(u)=(1−u)³P0+3u(1−u)²P1+3u²(1−u)P2+u³P3. Evaluate at u=0.5 gives (0.625,0.75). Curve passes through P0(0,0) and P3(2,3), shaped by control polygon without passing through P1,P2.
Given four 2-dimensional control points P0(0,0), P1(3,3), P2(-2,-2) and P3(2,3), draw a smooth curve using Bezier spline method.
Control points P0(0,0), P1(3,3), P2(−2,−2), P3(2,3). Four points give a cubic Bezier curve.
P(u) = (1−u)³P0 + 3u(1−u)²P1 + 3u²(1−u)P2 + u³P3
Power form: a = −P0 + 3P1 − 3P2 + P3 = (9 + 6 + 2, 9 + 6 + 3) = (17, 18); b = 3P0 − 6P1 + 3P2 = (−18 − 6, −18 − 6) = (−24, −24); c = −3P0 + 3P1 = (9, 9).
x(u) = 17u³ − 24u² + 9u, y(u) = 18u³ − 24u² + 9u
Blending values and points:
| u | B0 | B1 | B2 | B3 | x | y |
|---|---|---|---|---|---|---|
| 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 0.10 | 0.729 | 0.243 | 0.027 | 0.001 | 0.677 | 0.678 |
| 0.25 | 0.4219 | 0.4219 | 0.1406 | 0.0156 | 1.016 | 1.031 |
| 0.50 | 0.125 | 0.375 | 0.375 | 0.125 | 0.625 | 0.750 |
| 0.75 | 0.0156 | 0.1406 | 0.4219 | 0.4219 | 0.422 | 0.844 |
| 0.90 | 0.001 | 0.027 | 0.243 | 0.729 | 1.053 | 1.782 |
| 1 | 0 | 0 | 0 | 1 | 2 | 3 |
Example, u = 0.5: x = 0.375·3 + 0.375·(−2) + 0.125·2 = 1.125 − 0.75 + 0.25 = 0.625; y = 0.375·3 + 0.375·(−2) + 0.125·3 = 1.125 − 0.75 + 0.375 = 0.75.
Drawing steps: plot the four control points and join them to form the control polygon. Plot the points in the table and join them smoothly in order of u.
3 | o P3 o P1
|
2 | e
|
1 | d c b
| a
0 |----------------o P0----------------------> x
|
-1 |
|
-2 |o P2
-2 0 1 2 3
a, b, c, d, e = curve points at u = 0.1, 0.25, 0.5, 0.75, 0.9
curve order: P0 -> a -> b -> c -> d -> e -> P3
The curve leaves P0 along P0P1, goes out to about (1,1), turns back because of the pull of P2, and then moves up towards P3. It passes only through P0 and P3, not through P1 or P2.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Bezier curve through given points · Computer Graphics, chapter 5
- Liang-Barsky: P1(-5,3), P2(15,9) · Computer Graphics, chapter 3
- Bezier equation and point at u=0.8 · Computer Graphics, chapter 5
- Bezier points at u=0.25,0.5,0.75: (10,15)... · Computer Graphics, chapter 5 · asked 4×
- Bezier points at u=0.25,0.5,0.75: (2,10)... · Computer Graphics, chapter 5 · asked 2×
- Bezier points at u=0.25,0.5,0.75: (10,10)... · Computer Graphics, chapter 5 · asked 2×
- Uniform cubic B-spline segment points · Computer Aided Design, chapter 3
- B-spline curve versus Bezier curve · Computer Aided Design, chapter 3
- Get data from P0, send to P1 (asm and C) · Embedded System, chapter 9
- Sphere through four points · Mathematics, chapter 3