bézier curves
TRANSCRIPT
CSE4203: Computer Graphics
Bézier Curves
Mohammad Imrul Jubair
1M. I. Jubair
Polynomials
Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati, Fall 2013M. I. Jubair 2
𝑦 = 𝑎𝑥0 + 𝑏𝑥1
𝑦 = 𝑎𝑥0 + 𝑏𝑥1 + 𝑐𝑥2+ 𝑑𝑥3
𝑦 = 𝑎𝑥0 + 𝑏𝑥1 + 𝑐𝑥2
1st degree polynomial:
2nd degree polynomial:
3rd degree polynomial:
Bézier Curves
• First described in 1972 by Pierre Bézier
M. I. Jubair 3
Control Points
𝑷𝟎
𝑷𝟏
𝑷𝟐
M. I. Jubair 4
Control Points
𝑷𝟎
𝑷𝟏
𝑷𝟐
M. I. Jubair 5
Control Points
M. I. Jubair 6
Inputs
• 𝑁 number of control points
• Degree, 𝑑 = 𝑁 − 1
For example,
For 3 Control Points, 𝑑 = 2
M. I. Jubair 7
Inputs
• 𝑁 number of control points
• Degree, 𝑑 = 𝑁 − 1
What is the 𝑑 here?
M. I. Jubair 8
Bézier Curves
𝑷𝟎
𝑷𝟏
𝑷𝟐
𝑸(𝒖)
M. I. Jubair 9Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati
𝑖=0
2
𝐵𝑖, 2𝑢 𝑃𝑖 =𝐵0,2
𝑢 𝑃0+ 𝐵1,2𝑢 𝑃1+ 𝐵2,2
𝑢 𝑃2Example:
Bézier Curves
𝑷𝟎
𝑷𝟏
𝑷𝟐
𝑸(𝒖)
M. I. Jubair 10Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati
Bézier Curves
𝑷𝟎
𝑷𝟏
𝑷𝟐
𝑸(𝒖)
M. I. Jubair 11Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati
A point on the curve
Bézier Curves
𝑷𝟎
𝑷𝟏
𝑷𝟐
𝑸(𝒖)
𝑸(𝟎)𝑸(𝟏)
Denoted with 𝑄𝑑(𝑢)
M. I. Jubair 12Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati
Bézier Curves
𝑷𝟎
𝑷𝟏
𝑷𝟐
𝑸(𝒖)
𝑸(𝟎)𝑸(𝟏)
Where is 𝑄𝑑 0.5 situated?
M. I. Jubair 13Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati
Where is 𝑄𝑑 0 situated?
Where is 𝑄𝑑 1 situated?
Bézier Curves
𝑷𝟎
𝑷𝟏
𝑷𝟐
𝑸(𝒖)
𝑸(𝟎)𝑸(𝟏)
Online simulator: https://ytyt.github.io/siiiimple-bezier/
M. I. Jubair 14Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati
Bézier Curves
M. I. Jubair 15Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati
Example
Why subscript 2 for 𝑄2(𝑢)?
M. I. Jubair 16Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati
Example
M. I. Jubair 17Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati
𝑄2 𝑢 = 𝐵0,2𝑢 𝑃0+ 𝐵1,2
𝑢 𝑃1+ 𝐵2,2𝑢 𝑃2
Example
M. I. Jubair 18Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati
….. Do calculations ….
… Do calculations …
Disadvantages
• A change to any of the control point alters the entire curve.
• Having a large number of control points requires high polynomials to be evaluated. This is expensive to compute.
Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati M. I. Jubair 19
Thank You
M. I. Jubair 20