Bspline Notes Jordan Smith UC Berkeley CS184 Outline • Bézier Basis Polynomials – Linear – Quadratic – Cubic • Uniform Bspline Basis Polynomials – Linear – Quadratic – Cubic • Uniform Bsplines.
Download ReportTranscript Bspline Notes Jordan Smith UC Berkeley CS184 Outline • Bézier Basis Polynomials – Linear – Quadratic – Cubic • Uniform Bspline Basis Polynomials – Linear – Quadratic – Cubic • Uniform Bsplines.
Bspline Notes Jordan Smith UC Berkeley CS184 Outline • Bézier Basis Polynomials – Linear – Quadratic – Cubic • Uniform Bspline Basis Polynomials – Linear – Quadratic – Cubic • Uniform Bsplines from Convolution V001 Review of Bézier Curves DeCastlejau Algorithm V011 V111 V000 Insert at t = ¾ 001 000 Review of Bézier Curves DeCastlejau Algorithm 011 Insert at t = ¾ 111 001 Review of Bézier Curves DeCastlejau Algorithm 0¾1 011 00¾ ¾11 000 Insert at t = ¾ 111 001 Review of Bézier Curves DeCastlejau Algorithm 0¾1 011 0¾¾ 00¾ ¾¾1 ¾11 000 Insert at t = ¾ 111 001 Review of Bézier Curves DeCastlejau Algorithm 0¾1 011 0¾¾ 00¾ ¾¾¾ ¾¾1 ¾11 000 Insert at t = ¾ 111 001 Review of Bézier Curves DeCastlejau Algorithm 0¾1 011 0¾¾ 00¾ ¾¾¾ ¾¾1 ¾11 000 Insert at t = ¾ 111 001 Review of Bézier Curves DeCastlejau Algorithm 0¾1 011 0¾¾ 00¾ ¾¾¾ ¾¾1 ¾11 000 Insert at t = ¾ 111 001 Review of Bézier Curves DeCastlejau Algorithm 0¾1 011 0¾¾ 00¾ ¾¾¾ ¾¾1 ¾11 000 Insert at t = ¾ 111 Bézier Curves Summary • DeCastlejau algorithm – Evaluate Position(t) and Tangent(t) – Subdivides the curve into 2 subcurves with independent control polygons • Subdivision of Bézier curves and convex hull property allows for: – Adaptive rendering based on a flatness criterion – Adaptive collision detection using line segment tests Linear Bézier Basis Poly’s V0 Vt Vt Bez1(t) = 1-t V0 V1 = (1-t) V0 + t V1 t V1 Knots: -1 0 1 2 Quadratic Bézier Basis Poly’s V01 Vtt V0t Vt1 V00 V11 Vtt Bez2(t) = 1-t = t V0t 1-t V00 Vt1 t 1-t V01 t V11 (1-t)2 V00 + 2(1-t)t V01 + t2 V11 Quadratic Bézier Basis Poly’s Bez2(t) = (1-t)2 V00 + 2(1-t)t V01 + t2 V11 Knots: -1 0 1 2 Cubic Bézier Basis Poly’s 0t1 001 011 ttt 0tt tt1 00t t11 000 111 Vttt 1-t Bez3(t) = t V0tt Vtt1 1-t t 1-t V00t V0t1 = t Vt11 1-t t 1-t t 1-t V000 V001 V011 t V111 (1-t)3 V000 + 3(1-t)2t V001 + 3(1-t)t2 V011 + t3 V111 Cubic Bézier Basis Poly’s Bez3(t) = (1-t)3 V000 + 3(1-t)2t V001 + 3(1-t)t2 V011 + t3 V111 Knots: -1 0 1 2 Blossoming of Bsplines 234 123 Knots: 345 456 0 1 2 3 4 5 6 7 Blossoming of Bsplines 234 33.54 345 233.5 123 Knots: 3.545 456 0 1 2 3 3.5 4 5 6 7 Blossoming of Bsplines 234 33.53.5 33.54 3.53.54 345 233.5 123 Knots: 3.545 456 0 1 2 3 3.5 4 5 6 7 Blossoming of Bsplines 234 33.53.5 33.54 3.53.54 3.53.53.5 233.5 123 Knots: 345 3.545 456 0 1 2 3 3.5 4 5 6 7 Bspline Blossoming Summary • Blossoming of Bsplines is a generalization of the DeCastlejau algorithm • Control point index triples on the same control line share 2 indices with each other • Inserting a knot (t value) – Adds a new control point and curve segment – Adjusts other control points to form a control polygon • Inserting the same t value reduces the parametric continuity of the curve • A control point triple with all 3 indices equal is a point on the Bspline curve Uniform Linear Bspline Basis Poly’s V0 Vt Vt B1(t) = 1-t V0 V1 = (1-t) V0 + t V1 t V1 Knots: -1 0 1 2 Uniform Quadratic Bspline Basis Poly’s V01 V0t Vtt Vt1 V-10 V12 Vtt 1 t 1 t 2 t V0t B2(t) = 1 V-10 Vt1 t 1 t 1 2 2 1 V01 t t 2 2 V12 2 2 1 2t 2t 2 2 t 2 V -10 V 01 V12 Uniform Quadratic Bspline Basis Poly’s B 2 (t ) 1 t 2 2 V -10 1 2t 2t -2 -1 V 01 2 V-10 Knots: 2 V01 0 t 2 2 V12 V12 1 2 3 Uniform Cubic Bspline Basis Poly’s 0t1 -101 -10t 0tt 012 t12 tt1 ttt Vttt -2-10 1 t 123 t V0tt 1 B3(t) = 1 t 1 2 2 1 t2 t 2 2 3 3 1 V-101 Vt12 t 1 3 3 1 V012 4 6 t 3t 2 t t 1 V - 2 -10 6 V0t1 t2 V-2-10 Vtt1 t 1 V-10t 1 t 3 t t 3 3 V123 3 6 2 3 1 3t 3t 3t 6 3 t 6 V -101 V 012 V123 Uniform Cubic Bspline Basis Poly’s B 3 (t ) 1 t 3 6 4 6 t 3t 2 V - 2 -10 3 6 1 3t 3t 3t 2 V -101 6 V-2-10 V-101 Knots: -3 -2 -1 3 V 012 t 3 6 V123 V012 V123 0 1 2 3 4 Uniform Bsplines from Convolution f (t ) g (t ) f ( t s ) g ( s ) ds 0 = 1 0 1 0 0 1 1 0 2 = 0 1 0 2 0 1 1 2 3 = 1 2 30 1 2 3 4