20
CSE4203: Computer Graphics Bézier Curves Mohammad Imrul Jubair 1 M. I. Jubair

Bézier Curves

  • Upload
    others

  • View
    11

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Bézier Curves

CSE4203: Computer Graphics

Bézier Curves

Mohammad Imrul Jubair

1M. I. Jubair

Page 2: Bézier Curves

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:

Page 3: Bézier Curves

Bézier Curves

• First described in 1972 by Pierre Bézier

M. I. Jubair 3

Page 4: Bézier Curves

Control Points

𝑷𝟎

𝑷𝟏

𝑷𝟐

M. I. Jubair 4

Page 5: Bézier Curves

Control Points

𝑷𝟎

𝑷𝟏

𝑷𝟐

M. I. Jubair 5

Page 6: Bézier Curves

Control Points

M. I. Jubair 6

Page 7: Bézier Curves

Inputs

• 𝑁 number of control points

• Degree, 𝑑 = 𝑁 − 1

For example,

For 3 Control Points, 𝑑 = 2

M. I. Jubair 7

Page 8: Bézier Curves

Inputs

• 𝑁 number of control points

• Degree, 𝑑 = 𝑁 − 1

What is the 𝑑 here?

M. I. Jubair 8

Page 9: Bézier Curves

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:

Page 10: Bézier Curves

Bézier Curves

𝑷𝟎

𝑷𝟏

𝑷𝟐

𝑸(𝒖)

M. I. Jubair 10Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati

Page 11: Bézier Curves

Bézier Curves

𝑷𝟎

𝑷𝟏

𝑷𝟐

𝑸(𝒖)

M. I. Jubair 11Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati

A point on the curve

Page 12: Bézier Curves

Bézier Curves

𝑷𝟎

𝑷𝟏

𝑷𝟐

𝑸(𝒖)

𝑸(𝟎)𝑸(𝟏)

Denoted with 𝑄𝑑(𝑢)

M. I. Jubair 12Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati

Page 13: Bézier Curves

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?

Page 14: Bézier Curves

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

Page 15: Bézier Curves

Bézier Curves

M. I. Jubair 15Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati

Page 16: Bézier Curves

Example

Why subscript 2 for 𝑄2(𝑢)?

M. I. Jubair 16Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati

Page 17: Bézier Curves

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

Page 18: Bézier Curves

Example

M. I. Jubair 18Credit: CPSC 589/689 Course Notes, University of Calgary, Faramarz Samavati

….. Do calculations ….

… Do calculations …

Page 19: Bézier Curves

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

Page 20: Bézier Curves

Thank You

M. I. Jubair 20