2D Computer Graphics Diego Nehab Summer 2020 IMPA 1 Bzier curves - - PowerPoint PPT Presentation

2d computer graphics
SMART_READER_LITE
LIVE PREVIEW

2D Computer Graphics Diego Nehab Summer 2020 IMPA 1 Bzier curves - - PowerPoint PPT Presentation

2D Computer Graphics Diego Nehab Summer 2020 IMPA 1 Bzier curves Curve modeling by splines 2 Anchored in place by lead weights called ducks Physical process Interpolating, smooth, energy minimizing No local control Curve modeling by


slide-1
SLIDE 1

2D Computer Graphics

Diego Nehab Summer 2020

IMPA 1

slide-2
SLIDE 2

Bézier curves

slide-3
SLIDE 3

Curve modeling by splines

2

slide-4
SLIDE 4

Curve modeling by splines

Thin strip of wood used in building construction Anchored in place by lead weights called ducks Physical process Interpolating, smooth, energy minimizing No local control

3

slide-5
SLIDE 5

Curve modeling by splines

Thin strip of wood used in building construction Anchored in place by lead weights called ducks Physical process Interpolating, smooth, energy minimizing No local control

3

slide-6
SLIDE 6

Curve modeling by splines

Thin strip of wood used in building construction Anchored in place by lead weights called ducks Physical process Interpolating, smooth, energy minimizing No local control

3

slide-7
SLIDE 7

Curve modeling by splines

Thin strip of wood used in building construction Anchored in place by lead weights called ducks Physical process Interpolating, smooth, energy minimizing ✓ No local control

3

slide-8
SLIDE 8

Curve modeling by splines

Thin strip of wood used in building construction Anchored in place by lead weights called ducks Physical process Interpolating, smooth, energy minimizing ✓ No local control ✗

3

slide-9
SLIDE 9

Burmester curve

4

slide-10
SLIDE 10

Lagrangian interpolation

Computational process k + 1 vertices {p0, . . . , pk} defjne a curve γ(t) =

k

  • i=0

pi

  • j=i(t − j)
  • j=i(i − j) ,

t ∈ [0, k] Similar issues

5

slide-11
SLIDE 11

B-splines

Defjne a family of generating functions βn recursively β0(t) =    1, − 1

2 ≤ t < 1 2

0,

  • therwise

βn = βn−1 ∗ β0, n ∈ N Notation for convolution h = f ∗ g ⇔ h(t) = ∞

−∞

f(u) g(u − t)dt

6

slide-12
SLIDE 12

B-splines

Defjne a family of generating functions βn recursively β0(t) =    1, − 1

2 ≤ t < 1 2

0,

  • therwise

βn = βn−1 ∗ β0, n ∈ N Notation for convolution h = f ∗ g ⇔ h(t) = ∞

−∞

f(u) g(u − t)dt

  • 4
  • 2

2

  • 0.2

0.2 0.4 0.6 0.8 1.

6

slide-13
SLIDE 13

B-splines

Defjne a family of generating functions βn recursively β0(t) =    1, − 1

2 ≤ t < 1 2

0,

  • therwise

βn = βn−1 ∗ β0, n ∈ N Notation for convolution h = f ∗ g ⇔ h(t) = ∞

−∞

f(u) g(u − t)dt

  • 4
  • 2

2

  • 0.2

0.2 0.4 0.6 0.8 1.

  • 4
  • 2

2

  • 0.2

0.2 0.4 0.6 0.8 1.

6

slide-14
SLIDE 14

B-splines

Defjne a family of generating functions βn recursively β0(t) =    1, − 1

2 ≤ t < 1 2

0,

  • therwise

βn = βn−1 ∗ β0, n ∈ N Notation for convolution h = f ∗ g ⇔ h(t) = ∞

−∞

f(u) g(u − t)dt

  • 4
  • 2

2

  • 0.2

0.2 0.4 0.6 0.8 1.

  • 4
  • 2

2

  • 0.2

0.2 0.4 0.6 0.8 1.

  • 4
  • 2

2

  • 0.2

0.2 0.4 0.6 0.8 1.

6

slide-15
SLIDE 15

B-splines

Defjne a family of generating functions βn recursively β0(t) =    1, − 1

2 ≤ t < 1 2

0,

  • therwise

βn = βn−1 ∗ β0, n ∈ N Notation for convolution h = f ∗ g ⇔ h(t) = ∞

−∞

f(u) g(u − t)dt

  • 4
  • 2

2

  • 0.2

0.2 0.4 0.6 0.8 1.

  • 4
  • 2

2

  • 0.2

0.2 0.4 0.6 0.8 1.

  • 4
  • 2

2

  • 0.2

0.2 0.4 0.6 0.8 1.

  • 4
  • 2

2

  • 0.2

0.2 0.4 0.6 0.8 1.

6

slide-16
SLIDE 16

B-splines

Examples β0(t) =    1, − 1

2 ≤ t < 1 2

0,

  • therwise

1 t

1 t 1 t 1 t t 1

  • therwise

2 t 1 8 3

2t 2

3 2

t

1 2 1 4 3

4t2

1 2

t

1 2 1 8 9

12t 4t2

1 2

t

2 2

  • therwise

7

slide-17
SLIDE 17

B-splines

Examples β0(t) =    1, − 1

2 ≤ t < 1 2

0,

  • therwise

β1(t) =        1 + t, −1 ≤ t < 0 1 − t, 0 ≤ t < 1 0,

  • therwise

2 t 1 8 3

2t 2

3 2

t

1 2 1 4 3

4t2

1 2

t

1 2 1 8 9

12t 4t2

1 2

t

2 2

  • therwise

7

slide-18
SLIDE 18

B-splines

Examples β0(t) =    1, − 1

2 ≤ t < 1 2

0,

  • therwise

β1(t) =        1 + t, −1 ≤ t < 0 1 − t, 0 ≤ t < 1 0,

  • therwise

β2(t) =             

1 8(3 + 2t)2,

− 3

2 ≤ t < − 1 2 1 4(3 − 4t2),

− 1

2 ≤ t < 1 2 1 8(9 − 12t + 4t2), 1 2 ≤ t < 2 2

0,

  • therwise

7

slide-19
SLIDE 19

B-splines

k + 1 vertices {p0, . . . , pk} and generating function βn defjne a curve γ(t) =

k

  • i=0

βn(t − i) pi, t ∈ [0, k] Local control Differentiable n times everywhere Non-interpolating

  • Interpolation requires solving a banded linear system

Many, many interesting properties

8

slide-20
SLIDE 20

B-splines

k + 1 vertices {p0, . . . , pk} and generating function βn defjne a curve γ(t) =

k

  • i=0

βn(t − i) pi, t ∈ [0, k] Local control ✓ Differentiable n times everywhere Non-interpolating

  • Interpolation requires solving a banded linear system

Many, many interesting properties

8

slide-21
SLIDE 21

B-splines

k + 1 vertices {p0, . . . , pk} and generating function βn defjne a curve γ(t) =

k

  • i=0

βn(t − i) pi, t ∈ [0, k] Local control ✓ Differentiable n times everywhere ✓ Non-interpolating

  • Interpolation requires solving a banded linear system

Many, many interesting properties

8

slide-22
SLIDE 22

B-splines

k + 1 vertices {p0, . . . , pk} and generating function βn defjne a curve γ(t) =

k

  • i=0

βn(t − i) pi, t ∈ [0, k] Local control ✓ Differentiable n times everywhere ✓ Non-interpolating ✗

  • Interpolation requires solving a banded linear system ✓

Many, many interesting properties

8

slide-23
SLIDE 23

B-splines

k + 1 vertices {p0, . . . , pk} and generating function βn defjne a curve γ(t) =

k

  • i=0

βn(t − i) pi, t ∈ [0, k] Local control ✓ Differentiable n times everywhere ✓ Non-interpolating ✗

  • Interpolation requires solving a banded linear system ✓

Many, many interesting properties

8

slide-24
SLIDE 24

Polylines

k + 1 vertices {p0, . . . , pk} defjne k segments

  • γ0(t), . . . , γk−1(t)
  • ,

t ∈ [0, 1] Each segment defjned by linear interpolation

i t

1 t pi t pi

1

i k 1 Local control Interpolates all control points Not differentiable at interpolated points

9

slide-25
SLIDE 25

Polylines

k + 1 vertices {p0, . . . , pk} defjne k segments

  • γ0(t), . . . , γk−1(t)
  • ,

t ∈ [0, 1] Each segment defjned by linear interpolation γi(t) = (1 − t) pi + t pi+1, i ∈ {0, . . . , k − 1} Local control Interpolates all control points Not differentiable at interpolated points

9

slide-26
SLIDE 26

Polylines

k + 1 vertices {p0, . . . , pk} defjne k segments

  • γ0(t), . . . , γk−1(t)
  • ,

t ∈ [0, 1] Each segment defjned by linear interpolation γi(t) = (1 − t) pi + t pi+1, i ∈ {0, . . . , k − 1} Local control ✓ Interpolates all control points Not differentiable at interpolated points

9

slide-27
SLIDE 27

Polylines

k + 1 vertices {p0, . . . , pk} defjne k segments

  • γ0(t), . . . , γk−1(t)
  • ,

t ∈ [0, 1] Each segment defjned by linear interpolation γi(t) = (1 − t) pi + t pi+1, i ∈ {0, . . . , k − 1} Local control ✓ Interpolates all control points ✓ Not differentiable at interpolated points

9

slide-28
SLIDE 28

Polylines

k + 1 vertices {p0, . . . , pk} defjne k segments

  • γ0(t), . . . , γk−1(t)
  • ,

t ∈ [0, 1] Each segment defjned by linear interpolation γi(t) = (1 − t) pi + t pi+1, i ∈ {0, . . . , k − 1} Local control ✓ Interpolates all control points ✓ Not differentiable at interpolated points ✗

9

slide-29
SLIDE 29

Polylines

k + 1 vertices {p0, . . . , pk} defjne k segments

  • γ0(t), . . . , γk−1(t)
  • ,

t ∈ [0, 1] Each segment defjned by linear interpolation γi(t) = (1 − t) pi + t pi+1, i ∈ {0, . . . , k − 1} Local control ✓ Interpolates all control points ✓ Not differentiable at interpolated points ✗

9

slide-30
SLIDE 30

Bézier curves

Generalization of linear interpolation kn 1 vertices p0 pkn defjne k segments of degree n

n 0 t n n t n k 1 n t

t 0 1 Defjned recursively, for j k 1

i t

pi i nj n j 1

m i

t 1 t

m 1 i

t t

m 1 i 1

t i nj n j 1 m De Casteljau algorithm Geometric interpretation

10

slide-31
SLIDE 31

Bézier curves

Generalization of linear interpolation kn + 1 vertices {p0, . . . , pkn} defjne k segments of degree n

  • γn

0(t), γn n(t), . . . , γn (k−1)n(t)

  • ,

t ∈ [0, 1] Defjned recursively, for j k 1

i t

pi i nj n j 1

m i

t 1 t

m 1 i

t t

m 1 i 1

t i nj n j 1 m De Casteljau algorithm Geometric interpretation

10

slide-32
SLIDE 32

Bézier curves

Generalization of linear interpolation kn + 1 vertices {p0, . . . , pkn} defjne k segments of degree n

  • γn

0(t), γn n(t), . . . , γn (k−1)n(t)

  • ,

t ∈ [0, 1] Defjned recursively, for j ∈ {0, . . . , k − 1} γ0

i (t) = pi,

i ∈

  • nj, . . . , n(j + 1)
  • ,

γm

i (t) = (1 − t) γm−1 i

(t) + t γm−1

i+1 (t),

i ∈

  • nj, . . . , n(j + 1) − m
  • De Casteljau algorithm

Geometric interpretation

10

slide-33
SLIDE 33

Bézier curves

Generalization of linear interpolation kn + 1 vertices {p0, . . . , pkn} defjne k segments of degree n

  • γn

0(t), γn n(t), . . . , γn (k−1)n(t)

  • ,

t ∈ [0, 1] Defjned recursively, for j ∈ {0, . . . , k − 1} γ0

i (t) = pi,

i ∈

  • nj, . . . , n(j + 1)
  • ,

γm

i (t) = (1 − t) γm−1 i

(t) + t γm−1

i+1 (t),

i ∈

  • nj, . . . , n(j + 1) − m
  • De Casteljau algorithm

Geometric interpretation

10

slide-34
SLIDE 34

Bézier curves

Generalization of linear interpolation kn + 1 vertices {p0, . . . , pkn} defjne k segments of degree n

  • γn

0(t), γn n(t), . . . , γn (k−1)n(t)

  • ,

t ∈ [0, 1] Defjned recursively, for j ∈ {0, . . . , k − 1} γ0

i (t) = pi,

i ∈

  • nj, . . . , n(j + 1)
  • ,

γm

i (t) = (1 − t) γm−1 i

(t) + t γm−1

i+1 (t),

i ∈

  • nj, . . . , n(j + 1) − m
  • De Casteljau algorithm

Geometric interpretation

10

slide-35
SLIDE 35

Bernstein polynomials

Algebraic interpretation Expanding and collecting the pi terms,

n i t n j n j

1 t n

j tj pi j

Using Bernstein polynomials

n i t n j

bj n t pi

j

with bj n t

n j

1 t n

j tj

Basis for the space of polynomials Pn with degree n or less (Why?)

11

slide-36
SLIDE 36

Bernstein polynomials

Algebraic interpretation Expanding and collecting the pi terms, γn

i (t) = n

  • j=0

n

j

  • (1 − t)n−j tj pi+j

Using Bernstein polynomials

n i t n j

bj n t pi

j

with bj n t

n j

1 t n

j tj

Basis for the space of polynomials Pn with degree n or less (Why?)

11

slide-37
SLIDE 37

Bernstein polynomials

Algebraic interpretation Expanding and collecting the pi terms, γn

i (t) = n

  • j=0

n

j

  • (1 − t)n−j tj pi+j

Using Bernstein polynomials γn

i (t) = n

  • j=0

bj,n(t) pi+j with bj,n(t) = n

j

  • (1 − t)n−j tj

Basis for the space of polynomials Pn with degree n or less (Why?)

11

slide-38
SLIDE 38

Bernstein polynomials

Algebraic interpretation Expanding and collecting the pi terms, γn

i (t) = n

  • j=0

n

j

  • (1 − t)n−j tj pi+j

Using Bernstein polynomials γn

i (t) = n

  • j=0

bj,n(t) pi+j with bj,n(t) = n

j

  • (1 − t)n−j tj

Basis for the space of polynomials Pn with degree n or less (Why?)

11

slide-39
SLIDE 39

Control points and blending weights

In matrix form γn

i (t) =

  • pni

pni+1 · · · pni+n

  • Bézier control points CB

i

      b0,n(t) b1,n(t) . . . bn,n(t)      

blending weights Bn t

CB

i Bn t

Linear invariance is quite obvious in this form

12

slide-40
SLIDE 40

Control points and blending weights

In matrix form γn

i (t) =

  • pni

pni+1 · · · pni+n

  • Bézier control points CB

i

      b0,n(t) b1,n(t) . . . bn,n(t)                 

blending weights Bn(t)

CB

i Bn t

Linear invariance is quite obvious in this form

12

slide-41
SLIDE 41

Control points and blending weights

In matrix form γn

i (t) =

  • pni

pni+1 · · · pni+n

  • Bézier control points CB

i

      b0,n(t) b1,n(t) . . . bn,n(t)                 

blending weights Bn(t)

= CB

i Bn(t)

Linear invariance is quite obvious in this form

12

slide-42
SLIDE 42

Control points and blending weights

In matrix form γn

i (t) =

  • pni

pni+1 · · · pni+n

  • Bézier control points CB

i

      b0,n(t) b1,n(t) . . . bn,n(t)                 

blending weights Bn(t)

= CB

i Bn(t)

Linear invariance is quite obvious in this form

12

slide-43
SLIDE 43

Change of basis

Can be converted back and forth to power basis Pn(t) =

  • 1

t · · · tnT Bn(t) = Bn Pn(t) Examples B1 1 1 1 B2 1 2 1 2 2 1 B3 1 3 3 1 3 6 3 3 3 1

n i t

CB

i Bn t

CB

i Change of basis

Bn

Power basis control points CP

i

Pn t CP

i Pn t 13

slide-44
SLIDE 44

Change of basis

Can be converted back and forth to power basis Pn(t) =

  • 1

t · · · tnT Bn(t) = Bn Pn(t) Examples B1 =

  • 1

−1 1

  • B2 =

   1 −2 1 2 −2 1    B3 =      1 −3 3 −1 3 −6 3 3 −3 1     

n i t

CB

i Bn t

CB

i Change of basis

Bn

Power basis control points CP

i

Pn t CP

i Pn t 13

slide-45
SLIDE 45

Change of basis

Can be converted back and forth to power basis Pn(t) =

  • 1

t · · · tnT Bn(t) = Bn Pn(t) Examples B1 =

  • 1

−1 1

  • B2 =

   1 −2 1 2 −2 1    B3 =      1 −3 3 −1 3 −6 3 3 −3 1      γn

i (t) = CB i Bn(t) = CB i Change of basis

  • Bn

Power basis control points CP

i

Pn(t) = CP

i Pn(t) 13

slide-46
SLIDE 46

Bézier curves

Local control ✓ Interpolates every nth point Differentiable except (perhaps) at interpolation points PostScript, SVG (Inkscape), RVG Mathematica

14

slide-47
SLIDE 47

Bézier curves

Local control ✓ Interpolates every nth point ✓ Differentiable except (perhaps) at interpolation points PostScript, SVG (Inkscape), RVG Mathematica

14

slide-48
SLIDE 48

Bézier curves

Local control ✓ Interpolates every nth point ✓ Differentiable except (perhaps) at interpolation points ✓ PostScript, SVG (Inkscape), RVG Mathematica

14

slide-49
SLIDE 49

Bézier curves

Local control ✓ Interpolates every nth point ✓ Differentiable except (perhaps) at interpolation points ✓ PostScript, SVG (Inkscape), RVG Mathematica

14

slide-50
SLIDE 50

Bézier curves

Local control ✓ Interpolates every nth point ✓ Differentiable except (perhaps) at interpolation points ✓ PostScript, SVG (Inkscape), RVG Mathematica

14

slide-51
SLIDE 51

Affine invariance of Bézier segments

Let T be an affjne transformation and let γn(t) =

n

  • j=0

bj,n(t) pj be a Bézier curve segment. We want to show that T

n j

bj n t pj

n j

bj n t T pj This will be true if and only if all points in the Bézier curve are affjne combinations of the control points.

15

slide-52
SLIDE 52

Affine invariance of Bézier segments

Let T be an affjne transformation and let γn(t) =

n

  • j=0

bj,n(t) pj be a Bézier curve segment. We want to show that T

  • n
  • j=0

bj,n(t) pj

  • =

n

  • j=0

bj,n(t) T(pj). This will be true if and only if all points in the Bézier curve are affjne combinations of the control points.

15

slide-53
SLIDE 53

Affine invariance of Bézier segments

Let T be an affjne transformation and let γn(t) =

n

  • j=0

bj,n(t) pj be a Bézier curve segment. We want to show that T

  • n
  • j=0

bj,n(t) pj

  • =

n

  • j=0

bj,n(t) T(pj). This will be true if and only if all points in the Bézier curve are affjne combinations of the control points.

15

slide-54
SLIDE 54

Affine invariance of Bézier segments

Indeed,

n

  • j=0

bj,n(t) =

n

  • j=0

n

j

  • (1 − t)n−j tj

1 t t n 1n 1 The Bernstein polynomials therefore form a partition of unity To apply an affjne transformation to a Bézier curve, simply transform the control points

16

slide-55
SLIDE 55

Affine invariance of Bézier segments

Indeed,

n

  • j=0

bj,n(t) =

n

  • j=0

n

j

  • (1 − t)n−j tj =
  • (1 − t) + t

n 1n 1 The Bernstein polynomials therefore form a partition of unity To apply an affjne transformation to a Bézier curve, simply transform the control points

16

slide-56
SLIDE 56

Affine invariance of Bézier segments

Indeed,

n

  • j=0

bj,n(t) =

n

  • j=0

n

j

  • (1 − t)n−j tj =
  • (1 − t) + t

n = 1n = 1. The Bernstein polynomials therefore form a partition of unity To apply an affjne transformation to a Bézier curve, simply transform the control points

16

slide-57
SLIDE 57

Affine invariance of Bézier segments

Indeed,

n

  • j=0

bj,n(t) =

n

  • j=0

n

j

  • (1 − t)n−j tj =
  • (1 − t) + t

n = 1n = 1. The Bernstein polynomials therefore form a partition of unity To apply an affjne transformation to a Bézier curve, simply transform the control points

16

slide-58
SLIDE 58

Affine invariance of Bézier segments

Indeed,

n

  • j=0

bj,n(t) =

n

  • j=0

n

j

  • (1 − t)n−j tj =
  • (1 − t) + t

n = 1n = 1. The Bernstein polynomials therefore form a partition of unity To apply an affjne transformation to a Bézier curve, simply transform the control points

16

slide-59
SLIDE 59

Convex hull property for Bézier segments

p =

i αipi is a convex combination of {pi} if i αi = 1 and αi ≥ 0.

A set of points C is convex if every convex combination of points in C also belongs to C The convex hull of a set points S is the smallest convex set that contains S If is a Bézier curve, then t t 0 1 is contained in the convex hull of its control points

  • From partition of unity and positivity in 0 1
  • Useful for curve intersection, quick bounding box, etc

17

slide-60
SLIDE 60

Convex hull property for Bézier segments

p =

i αipi is a convex combination of {pi} if i αi = 1 and αi ≥ 0.

A set of points C is convex if every convex combination of points in C also belongs to C The convex hull of a set points S is the smallest convex set that contains S If is a Bézier curve, then t t 0 1 is contained in the convex hull of its control points

  • From partition of unity and positivity in 0 1
  • Useful for curve intersection, quick bounding box, etc

17

slide-61
SLIDE 61

Convex hull property for Bézier segments

p =

i αipi is a convex combination of {pi} if i αi = 1 and αi ≥ 0.

A set of points C is convex if every convex combination of points in C also belongs to C The convex hull of a set points S is the smallest convex set that contains S If is a Bézier curve, then t t 0 1 is contained in the convex hull of its control points

  • From partition of unity and positivity in 0 1
  • Useful for curve intersection, quick bounding box, etc

17

slide-62
SLIDE 62

Convex hull property for Bézier segments

p =

i αipi is a convex combination of {pi} if i αi = 1 and αi ≥ 0.

A set of points C is convex if every convex combination of points in C also belongs to C The convex hull of a set points S is the smallest convex set that contains S If γ is a Bézier curve, then

  • γ(t) | t ∈ [0, 1]
  • is contained in the convex

hull of its control points

  • From partition of unity and positivity in 0 1
  • Useful for curve intersection, quick bounding box, etc

17

slide-63
SLIDE 63

Convex hull property for Bézier segments

p =

i αipi is a convex combination of {pi} if i αi = 1 and αi ≥ 0.

A set of points C is convex if every convex combination of points in C also belongs to C The convex hull of a set points S is the smallest convex set that contains S If γ is a Bézier curve, then

  • γ(t) | t ∈ [0, 1]
  • is contained in the convex

hull of its control points

  • From partition of unity and positivity in [0, 1]
  • Useful for curve intersection, quick bounding box, etc

17

slide-64
SLIDE 64

Derivative of Bézier segment

Since derivative operator is linear and γn(t) = n

j=0 bj,n(t) pj, all we

have to do is differentiate the Bernstein polynomials

  • bj,n(t)

′ = n

j

  • (1 − t)n−j tj′

j n

j

1 t n

j tj 1

n j

n j

1 t n

1 j tj

n n

1 j 1

1 t

n 1 j 1 tj 1

n n

1 j

1 t n

1 j tj

n bj

1 n 1 t

bj n

1 t

Therefore,

n

t

n 1 j

bj n

1 t qj

with qj n pj

1

pj

18

slide-65
SLIDE 65

Derivative of Bézier segment

Since derivative operator is linear and γn(t) = n

j=0 bj,n(t) pj, all we

have to do is differentiate the Bernstein polynomials

  • bj,n(t)

′ = n

j

  • (1 − t)n−j tj′

= j n

j

  • (1 − t)n−j tj−1 − (n − j)

n

j

  • (1 − t)n−1−j tj

n n

1 j 1

1 t

n 1 j 1 tj 1

n n

1 j

1 t n

1 j tj

n bj

1 n 1 t

bj n

1 t

Therefore,

n

t

n 1 j

bj n

1 t qj

with qj n pj

1

pj

18

slide-66
SLIDE 66

Derivative of Bézier segment

Since derivative operator is linear and γn(t) = n

j=0 bj,n(t) pj, all we

have to do is differentiate the Bernstein polynomials

  • bj,n(t)

′ = n

j

  • (1 − t)n−j tj′

= j n

j

  • (1 − t)n−j tj−1 − (n − j)

n

j

  • (1 − t)n−1−j tj

= n n−1

j−1

  • (1 − t)(n−1)−(j−1) tj−1 − n

n−1

j

  • (1 − t)n−1−j tj

n bj

1 n 1 t

bj n

1 t

Therefore,

n

t

n 1 j

bj n

1 t qj

with qj n pj

1

pj

18

slide-67
SLIDE 67

Derivative of Bézier segment

Since derivative operator is linear and γn(t) = n

j=0 bj,n(t) pj, all we

have to do is differentiate the Bernstein polynomials

  • bj,n(t)

′ = n

j

  • (1 − t)n−j tj′

= j n

j

  • (1 − t)n−j tj−1 − (n − j)

n

j

  • (1 − t)n−1−j tj

= n n−1

j−1

  • (1 − t)(n−1)−(j−1) tj−1 − n

n−1

j

  • (1 − t)n−1−j tj

= n

  • bj−1,n−1(t) − bj,n−1(t)
  • Therefore,

n

t

n 1 j

bj n

1 t qj

with qj n pj

1

pj

18

slide-68
SLIDE 68

Derivative of Bézier segment

Since derivative operator is linear and γn(t) = n

j=0 bj,n(t) pj, all we

have to do is differentiate the Bernstein polynomials

  • bj,n(t)

′ = n

j

  • (1 − t)n−j tj′

= j n

j

  • (1 − t)n−j tj−1 − (n − j)

n

j

  • (1 − t)n−1−j tj

= n n−1

j−1

  • (1 − t)(n−1)−(j−1) tj−1 − n

n−1

j

  • (1 − t)n−1−j tj

= n

  • bj−1,n−1(t) − bj,n−1(t)
  • Therefore,

(γn)′(t) =

n−1

  • j=0

bj,n−1(t) qj with qj = n(pj+1 − pj).

18

slide-69
SLIDE 69

Derivative of Bézier segment

What is the derivative at the endpoints? How do we connect segments so that they are C1 continuous? What about G1 continuity? Show in Inkscape

19

slide-70
SLIDE 70

Derivative of Bézier segment

What is the derivative at the endpoints? How do we connect segments so that they are C1 continuous? What about G1 continuity? Show in Inkscape

19

slide-71
SLIDE 71

Derivative of Bézier segment

What is the derivative at the endpoints? How do we connect segments so that they are C1 continuous? What about G1 continuity? Show in Inkscape

19

slide-72
SLIDE 72

Derivative of Bézier segment

What is the derivative at the endpoints? How do we connect segments so that they are C1 continuous? What about G1 continuity? Show in Inkscape

19

slide-73
SLIDE 73

Degree elevation of Bézier segment

Express a segment γn(t) as γn+1(t)? (write bj,n(t) in terms of bk,n+1(t)?) Easy to express both bj n

1 t and bj 1 n 1 t in terms of bj n t

bj n

1 t n 1 j

1 t n

1 j tj n 1 n 1 j 1

t bj n t bj

1 n 1 t n 1 j 1

1 t n

j tj n 1 j 1 t bj n t

From these, bj n t

n 1 j n 1 bj n 1 t j 1 n 1 bj 1 n 1 t

Expanding and collecting terms,

n t n i

bi n t pi

n 1 j

bj n

1 t qj n 1 t

with q0 p0, qn

1

pn, and qi

j n 1 pi 1

1

j n 1 pi 20

slide-74
SLIDE 74

Degree elevation of Bézier segment

Express a segment γn(t) as γn+1(t)? (write bj,n(t) in terms of bk,n+1(t)?) Easy to express both bj,n+1(t) and bj+1,n+1(t) in terms of bj,n(t) bj,n+1(t) = n+1

j

  • (1 − t)n+1−j tj

n 1 n 1 j 1

t bj n t bj

1 n 1 t n 1 j 1

1 t n

j tj n 1 j 1 t bj n t

From these, bj n t

n 1 j n 1 bj n 1 t j 1 n 1 bj 1 n 1 t

Expanding and collecting terms,

n t n i

bi n t pi

n 1 j

bj n

1 t qj n 1 t

with q0 p0, qn

1

pn, and qi

j n 1 pi 1

1

j n 1 pi 20

slide-75
SLIDE 75

Degree elevation of Bézier segment

Express a segment γn(t) as γn+1(t)? (write bj,n(t) in terms of bk,n+1(t)?) Easy to express both bj,n+1(t) and bj+1,n+1(t) in terms of bj,n(t) bj,n+1(t) = n+1

j

  • (1 − t)n+1−j tj =

n+1 n+1−j (1 − t) bj,n(t)

bj

1 n 1 t n 1 j 1

1 t n

j tj n 1 j 1 t bj n t

From these, bj n t

n 1 j n 1 bj n 1 t j 1 n 1 bj 1 n 1 t

Expanding and collecting terms,

n t n i

bi n t pi

n 1 j

bj n

1 t qj n 1 t

with q0 p0, qn

1

pn, and qi

j n 1 pi 1

1

j n 1 pi 20

slide-76
SLIDE 76

Degree elevation of Bézier segment

Express a segment γn(t) as γn+1(t)? (write bj,n(t) in terms of bk,n+1(t)?) Easy to express both bj,n+1(t) and bj+1,n+1(t) in terms of bj,n(t) bj,n+1(t) = n+1

j

  • (1 − t)n+1−j tj =

n+1 n+1−j (1 − t) bj,n(t)

bj+1,n+1(t) = n+1

j+1

  • (1 − t)n−j tj

n 1 j 1 t bj n t

From these, bj n t

n 1 j n 1 bj n 1 t j 1 n 1 bj 1 n 1 t

Expanding and collecting terms,

n t n i

bi n t pi

n 1 j

bj n

1 t qj n 1 t

with q0 p0, qn

1

pn, and qi

j n 1 pi 1

1

j n 1 pi 20

slide-77
SLIDE 77

Degree elevation of Bézier segment

Express a segment γn(t) as γn+1(t)? (write bj,n(t) in terms of bk,n+1(t)?) Easy to express both bj,n+1(t) and bj+1,n+1(t) in terms of bj,n(t) bj,n+1(t) = n+1

j

  • (1 − t)n+1−j tj =

n+1 n+1−j (1 − t) bj,n(t)

bj+1,n+1(t) = n+1

j+1

  • (1 − t)n−j tj = n+1

j+1 t bj,n(t)

From these, bj n t

n 1 j n 1 bj n 1 t j 1 n 1 bj 1 n 1 t

Expanding and collecting terms,

n t n i

bi n t pi

n 1 j

bj n

1 t qj n 1 t

with q0 p0, qn

1

pn, and qi

j n 1 pi 1

1

j n 1 pi 20

slide-78
SLIDE 78

Degree elevation of Bézier segment

Express a segment γn(t) as γn+1(t)? (write bj,n(t) in terms of bk,n+1(t)?) Easy to express both bj,n+1(t) and bj+1,n+1(t) in terms of bj,n(t) bj,n+1(t) = n+1

j

  • (1 − t)n+1−j tj =

n+1 n+1−j (1 − t) bj,n(t)

bj+1,n+1(t) = n+1

j+1

  • (1 − t)n−j tj = n+1

j+1 t bj,n(t)

From these, bj,n(t) = n+1−j

n+1 bj,n+1(t) + j+1 n+1 bj+1,n+1(t)

Expanding and collecting terms,

n t n i

bi n t pi

n 1 j

bj n

1 t qj n 1 t

with q0 p0, qn

1

pn, and qi

j n 1 pi 1

1

j n 1 pi 20

slide-79
SLIDE 79

Degree elevation of Bézier segment

Express a segment γn(t) as γn+1(t)? (write bj,n(t) in terms of bk,n+1(t)?) Easy to express both bj,n+1(t) and bj+1,n+1(t) in terms of bj,n(t) bj,n+1(t) = n+1

j

  • (1 − t)n+1−j tj =

n+1 n+1−j (1 − t) bj,n(t)

bj+1,n+1(t) = n+1

j+1

  • (1 − t)n−j tj = n+1

j+1 t bj,n(t)

From these, bj,n(t) = n+1−j

n+1 bj,n+1(t) + j+1 n+1 bj+1,n+1(t)

Expanding and collecting terms, γn(t) =

n

  • i=0

bi,n(t) pi =

n+1

  • j=0

bj,n+1(t) qj = γn+1(t) with q0 = p0, qn+1 = pn, and qi =

j n+1 pi−1 + (1 − j n+1) pi 20

slide-80
SLIDE 80

Degree elevation of Bézier segment

Examples

  • p0

p1

  • p0

1 2(p0 + p1)

p1

  • p0

p1 p2

  • p0

1 3(p0 + 2p1) 1 3(2p1 + p2)

p2

  • 21
slide-81
SLIDE 81

References

  • G. Farin. Curves and Surfaces for CAGD, A Practical Guide, 5th edition.

Morgan Kaufmann, 2002.

22