Blossoms CS 419 Advanced Topics in Computer Graphics John C. Hart - - PowerPoint PPT Presentation

blossoms
SMART_READER_LITE
LIVE PREVIEW

Blossoms CS 419 Advanced Topics in Computer Graphics John C. Hart - - PowerPoint PPT Presentation

Blossoms CS 419 Advanced Topics in Computer Graphics John C. Hart Borrowed somewhat from Tom Sederbergs notes p 1 de Casteljau p 12 p 2 p 012 1- t de Casteljau algorithm p 123 p 0123 evaluates a point on a p 01 Bezier curve by t


slide-1
SLIDE 1

Blossoms

CS 419 Advanced Topics in Computer Graphics John C. Hart Borrowed somewhat from Tom Sederberg’s notes

slide-2
SLIDE 2

de Casteljau

  • de Casteljau algorithm

evaluates a point on a Bezier curve by scaffolding lerps

  • Blossoming renames the

control and intermediate points, like p12, using a polar form, like p(0,t,1) p0 p1 p3 p2 p01 p12 p23 p012 p123 p0123 t 1-t

slide-3
SLIDE 3

de Casteljau

  • de Casteljau algorithm

evaluates a point on a Bezier curve by scaffolding lerps

  • Blossoming renames the

control and intermediate points, like p12, using a polar form, like p(0,t,1) p(0,0,0) p(1,0,0) p(1,1,1) p(1,1,0) p012 p123 p0123 t 1-t p01 p12 p23

slide-4
SLIDE 4

de Casteljau

  • de Casteljau algorithm

evaluates a point on a Bezier curve by scaffolding lerps

  • Blossoming renames the

control and intermediate points, like p12, using a polar form, like p(0,t,1) p(0,0,0) p(1,0,0) p(1,1,1) p(1,1,0) p012 p123 p0123 t 1-t p(t,0,0) p(1,t,0) p(1,1,t)

slide-5
SLIDE 5

de Casteljau

  • de Casteljau algorithm

evaluates a point on a Bezier curve by scaffolding lerps

  • Blossoming renames the

control and intermediate points, like p12, using a polar form, like p(0,t,1) p(0,0,0) p(1,0,0) p(1,1,1) p(1,1,0) p(t,t,0) p(1,t,t) t 1-t p(t,0,0) p(1,t,0) p(1,1,t) p0123

slide-6
SLIDE 6

de Casteljau

  • de Casteljau algorithm

evaluates a point on a Bezier curve by scaffolding lerps

  • Blossoming renames the

control and intermediate points, like p12, using a polar form, like p(0,t,1) p(0,0,0) p(1,0,0) p(1,1,1) p(1,1,0) p(t,t,0) p(1,t,t) p(t,t,t) t 1-t p(t,0,0) p(1,t,0) p(1,1,t)

slide-7
SLIDE 7

Blossoming Rules

  • # of parameters = degree
  • Order doesn’t matter

p(a,b,c) = p(b,a,c)

  • Linear in any parameter

ap(a,b,c) = p(aa,b,c) = p(a,ab,c) p(a,b+c,d) = p(a,b,d) + p(a,c,d)

  • Lerping:

(1-t) p(0,0,0) + t p(1,0,0) = p(0 (1-t),0,0) + p(1 t,0,0) = p(0 (1-t) + 1 t,0,0) = p(t,0,0) p(0,0,0) p(1,0,0) p(1,1,1) p(1,1,0) p(t,t,0) p(1,t,t) p(t,t,t) t 1-t p(t,0,0) p(1,t,0) p(1,1,t)

slide-8
SLIDE 8

Evaluation

  • Goal is to find p(t) by

diagonalization, by manipulating blossoms into p(t,t,t)

  • de Casteljau algorithm blossoms

into Bernstein polynomials p(0,0,0) p(1,0,0) p(1,1,1) p(1,1,0) p(t,t,0) p(1,t,t) p(t,t,t) t 1-t p(t,0,0) p(1,t,0) p(1,1,t) p(t) = p(t,t,t) = (1-t) p(t,t,0) + t p(t,t,1) = (1-t)[(1-t) p(t,0,0) + t p(t,0,1)] + t [(1-t) p(t,0,1) + t p(t,1,1)] = (1-t)2 p(t,0,0) + 2 (1-t) t p(t,0,1) + t2 p(t,1,1)

= (1-t)2[(1-t)p(0,0,0)+tp(1,0,0)]+2 (1-t)t [(1-t)p(0,0,1)+tp(1,0,1)]+t2[(1-t)p(0,1,1)+tp(1,1,1)]

= (1-t)3 p(0,0,0) + 3 (1-t)2 t p(0,0,1) + 3 (1-t) t2 p(0,1,1) + t3 p(1,1,1)

slide-9
SLIDE 9

B-Spline Blossoms

  • Three segments: [2,3],[3,4],[4,5]
  • Points within each segment

influenced by four surrounding control points

  • Knots influenced by three

surrounding control points

  • Need two extra knots at

each end of knot vector (in general, d-1 extra knots at each end) knot vector: [0 1 2 3 4 5 6 7] p(0,1,2) p(1,2,3) p(2,3,4) p(3,4,5) p(4,5,6) p(5,6,7) t=2 t=3 t=4 t=5

slide-10
SLIDE 10

Bohm Blossoms

  • Trick: Think of each segment

as a Bezier curve knot vector: [0 1 2 3 4 5 6 7] p(0,1,2) p(1,2,3) p(2,3,4) p(3,4,5) p(4,5,6) p(5,6,7) t=2 t=3 t=4 t=5

slide-11
SLIDE 11

Bohm Blossoms

  • Trick: Think of each segment

as a Bezier curve knot vector: [0 1 2 3 4 5 6 7] p(0,1,2) p(1,2,3) p(2,3,4) p(3,4,5) p(4,5,6) p(5,6,7) p(2,2,2) p(3,3,3) p(4,4,4) p(5,5,5)

slide-12
SLIDE 12

Bohm Blossoms

  • Trick: Think of each segment

as a Bezier curve

  • Where should the other

two control points go for the [2,3] segment? knot vector: [0 1 2 3 4 5 6 7] p(0,1,2) p(1,2,3) p(2,3,4) p(3,4,5) p(4,5,6) p(5,6,7) p(2,2,2) p(3,3,3)

slide-13
SLIDE 13

Bohm Blossoms

  • Trick: Think of each segment

as a Bezier curve

  • Where should the other

two control points go for the [2,3] segment?

  • Need to find:

p(2,2,3) = 2/3 p(1,2,3) + 1/3 p(4,2,3) p(3,2,3) = 1/3 p(1,2,3) + 2/3 p(4,2,3) knot vector: [0 1 2 3 4 5 6 7] p(0,1,2) p(1,2,3) p(4,2,3) p(3,4,5) p(4,5,6) p(5,6,7) p(2,2,2) p(3,3,3) p(2,2,3) p(3,2,3)

slide-14
SLIDE 14

Bohm Blossoms

  • Where are the endpoints located?
  • Need to find:

p(2,1,2) = 1/3 p(0,1,2) + 2/3 p(3,1,2) p(3,4,3) = 2/3 p(3,4,2) + 1/3 p(3,4,5) p(2,2,2) = 1/2 p(2,1,2) + 1/2 p(2,3,2) p(3,3,3) = 1/2 p(3,2,3) + 1/2 p(3,4,3)

  • Reveals how to turn a B-spline

into a Bezier curve! knot vector: [0 1 2 3 4 5 6 7] p(0,1,2) p(3,1,2) p(3,4,2) p(3,4,5) p(2,2,2) p(2,3,2) p(3,2,3) p(2,1,2) p(3,4,3) p(3,3,3)

slide-15
SLIDE 15

Knot Insertion

  • Suppose we want to add a

knot at t = 3.5 knot vector: [0 1 2 3 4 5 6 7] p(0,1,2) p(1,2,3) p(2,3,4) p(3,4,5) p(4,5,6) p(5,6,7) t=2 t=3 t=4 t=5

slide-16
SLIDE 16

Knot Insertion

  • Suppose we want to add a

knot at t = 3.5

  • Then we need new cp’s

p(2,3,3.5), p(3,3.5,4) and p(3.5,4,5) and can get rid of p(2,3,4) and p(3,4,5) knot vector: [0 1 2 3 4 5 6 7] p(0,1,2) p(1,2,3) p(2,3,4) p(3,4,5) p(4,5,6) p(5,6,7) t=2 t=3 t=4 t=5 p(2,3,3.5) p(3.5,4,5) p(3,3.5,4)

slide-17
SLIDE 17

Knot Insertion

  • Suppose we want to add a

knot at t = 3.5

  • Then we need new cp’s

p(2,3,3.5), p(3,3.5,4) and p(3.5,4,5) and can get rid of p(2,3,4) and p(3,4,5) knot vector: [0 1 2 3 3.5 4 5 6 7] p(0,1,2) p(1,2,3) p(4,5,6) p(5,6,7) t=2 t=5 p(2,3,3.5) p(3.5,4,5) p(3,3.5,4) t=3.5

slide-18
SLIDE 18

de Boor Algorithm

  • What if we want to

evaluate p(3.5)?

  • Then create a triple knot

at t = 3.5 and figure out where to put the control point p(3.5,3.5,3.5) knot vector: [0 1 2 3 3.5 4 5 6 7] p(0,1,2) p(1,2,3) p(4,5,6) p(5,6,7) t=2 t=5 p(2,3,3.5) p(3.5,4,5) p(3,3.5,4) t=3.5

slide-19
SLIDE 19

de Boor Algorithm

  • What if we want to

evaluate p(3.5)?

  • Then create a triple knot

at t = 3.5 and figure out where to put the control point p(3.5,3.5,3.5)

  • Need p(3,3.5,3.5)

and p(3.5,3.5,4)

  • Also subdivides B-spline into

[0,1,2,3,3.5,3.5,3.5] and [3.5,3.5,3.5,4,5,6,7] knot vector: [0 1 2 3 3.5 3.5 3.5 4 5 6 7] p(0,1,2) p(1,2,3) p(4,5,6) p(5,6,7) p(2,3,3.5) p(3.5,4,5) p(3,3.5,4)

p(3.5,3.5,3.5)

p(3.5,3.5,4) p(3,3.5,3.5)