1 / 19

Blossoms

Blossoms. CS 419 Advanced Topics in Computer Graphics John C. Hart Borrowed somewhat from Tom Sederberg’s notes. de Casteljau. p 1. p 12. p 2. p 012. 1- t. de Casteljau algorithm evaluates a point on a Bezier curve by scaffolding lerps

reeves
Download Presentation

Blossoms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. de Casteljau p1 p12 p2 p012 1-t • de Casteljau algorithmevaluates a point on aBezier curve byscaffolding lerps • Blossoming renames thecontrol and intermediatepoints, like p12, using apolar form, like p(0,t,1) p123 p0123 p01 t p23 p0 p3

  3. de Casteljau p(1,0,0) p12 p(1,1,0) p012 1-t • de Casteljau algorithmevaluates a point on aBezier curve byscaffolding lerps • Blossoming renames thecontrol and intermediatepoints, like p12, using apolar form, like p(0,t,1) p123 p0123 p01 t p23 p(0,0,0) p(1,1,1)

  4. de Casteljau p(1,0,0) p(1,t,0) p(1,1,0) p012 1-t • de Casteljau algorithmevaluates a point on aBezier curve byscaffolding lerps • Blossoming renames thecontrol and intermediatepoints, like p12, using apolar form, like p(0,t,1) p123 p0123 p(t,0,0) t p(1,1,t) p(0,0,0) p(1,1,1)

  5. de Casteljau p(1,0,0) p(1,t,0) p(1,1,0) p(t,t,0) 1-t • de Casteljau algorithmevaluates a point on aBezier curve byscaffolding lerps • Blossoming renames thecontrol and intermediatepoints, like p12, using apolar form, like p(0,t,1) p(1,t,t) p0123 p(t,0,0) t p(1,1,t) p(0,0,0) p(1,1,1)

  6. de Casteljau p(1,0,0) p(1,t,0) p(1,1,0) p(t,t,0) 1-t • de Casteljau algorithmevaluates a point on aBezier curve byscaffolding lerps • Blossoming renames thecontrol and intermediatepoints, like p12, using apolar form, like p(0,t,1) p(1,t,t) p(t,t,t) p(t,0,0) t p(1,1,t) p(0,0,0) p(1,1,1)

  7. Blossoming Rules p(1,0,0) p(1,t,0) p(1,1,0) p(t,t,0) 1-t • # 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) + tp(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(1,t,t) p(t,t,t) p(t,0,0) t p(1,1,t) p(0,0,0) p(1,1,1)

  8. Evaluation p(1,0,0) p(1,t,0) p(1,1,0) p(t,t,0) 1-t • Goal is to find p(t) bydiagonalization, bymanipulating blossomsinto p(t,t,t) • de Casteljau algorithm blossomsinto Bernstein polynomials p(1,t,t) p(t,t,t) p(t,0,0) t p(1,1,t) p(0,0,0) p(1,1,1) p(t) = p(t,t,t) = (1-t) p(t,t,0) + tp(t,t,1) = (1-t)[(1-t) p(t,0,0) + tp(t,0,1)] + t [(1-t) p(t,0,1) + tp(t,1,1)] = (1-t)2p(t,0,0) + 2 (1-t) tp(t,0,1) + t2p(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)3p(0,0,0) + 3 (1-t)2tp(0,0,1) + 3 (1-t) t2p(0,1,1) + t3p(1,1,1)

  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 ateach end of knot vector(in general, d-1 extraknots at each end) p(2,3,4) p(3,4,5) t=3 t=4 p(1,2,3) p(4,5,6) t=2 t=5 p(0,1,2) p(5,6,7) knot vector: [0 1 2 3 4 5 6 7]

  10. Bohm Blossoms • Trick: Think of each segmentas a Bezier curve p(2,3,4) p(3,4,5) t=3 t=4 p(1,2,3) p(4,5,6) t=2 t=5 p(0,1,2) p(5,6,7) knot vector: [0 1 2 3 4 5 6 7]

  11. Bohm Blossoms • Trick: Think of each segmentas a Bezier curve p(2,3,4) p(3,4,5) p(3,3,3) p(4,4,4) p(1,2,3) p(4,5,6) p(2,2,2) p(5,5,5) p(0,1,2) p(5,6,7) knot vector: [0 1 2 3 4 5 6 7]

  12. Bohm Blossoms • Trick: Think of each segmentas a Bezier curve • Where should the othertwo control points gofor the [2,3] segment? p(2,3,4) p(3,4,5) p(3,3,3) p(1,2,3) p(4,5,6) p(2,2,2) p(0,1,2) p(5,6,7) knot vector: [0 1 2 3 4 5 6 7]

  13. Bohm Blossoms • Trick: Think of each segmentas a Bezier curve • Where should the othertwo control points gofor 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) p(4,2,3) p(3,4,5) p(3,2,3) p(3,3,3) p(2,2,3) p(1,2,3) p(4,5,6) p(2,2,2) p(0,1,2) p(5,6,7) knot vector: [0 1 2 3 4 5 6 7]

  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-splineinto a Bezier curve! p(3,4,2) p(3,4,3) p(3,4,5) p(3,2,3) p(3,3,3) p(2,3,2) p(3,1,2) p(2,2,2) p(2,1,2) p(0,1,2) knot vector: [0 1 2 3 4 5 6 7]

  15. Knot Insertion • Suppose we want to add aknot at t = 3.5 p(2,3,4) p(3,4,5) t=3 t=4 p(1,2,3) p(4,5,6) t=2 t=5 p(0,1,2) p(5,6,7) knot vector: [0 1 2 3 4 5 6 7]

  16. Knot Insertion • Suppose we want to add aknot at t = 3.5 • Then we need new cp’sp(2,3,3.5), p(3,3.5,4)and p(3.5,4,5)and can get rid ofp(2,3,4) and p(3,4,5) p(3,3.5,4) p(2,3,4) p(3,4,5) p(3.5,4,5) p(2,3,3.5) t=3 t=4 p(1,2,3) p(4,5,6) t=2 t=5 p(0,1,2) p(5,6,7) knot vector: [0 1 2 3 4 5 6 7]

  17. Knot Insertion • Suppose we want to add aknot at t = 3.5 • Then we need new cp’sp(2,3,3.5), p(3,3.5,4)and p(3.5,4,5)and can get rid ofp(2,3,4) and p(3,4,5) p(3,3.5,4) p(3.5,4,5) p(2,3,3.5) t=3.5 p(1,2,3) p(4,5,6) t=2 t=5 p(0,1,2) p(5,6,7) knot vector: [0 1 2 3 3.5 4 5 6 7]

  18. de Boor Algorithm • What if we want toevaluate p(3.5)? • Then create a triple knotat t = 3.5 and figure outwhere to put the controlpoint p(3.5,3.5,3.5) p(3,3.5,4) p(3.5,4,5) p(2,3,3.5) t=3.5 p(1,2,3) p(4,5,6) t=2 t=5 p(0,1,2) p(5,6,7) knot vector: [0 1 2 3 3.5 4 5 6 7]

  19. de Boor Algorithm • What if we want toevaluate p(3.5)? • Then create a triple knotat t = 3.5 and figure outwhere to put the controlpoint 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] p(3,3.5,4) p(3.5,3.5,4) p(3,3.5,3.5) p(3.5,4,5) p(2,3,3.5) p(3.5,3.5,3.5) p(1,2,3) p(4,5,6) p(0,1,2) p(5,6,7) knot vector: [0 1 2 3 3.5 3.5 3.5 4 5 6 7]

More Related