Parametric Curves & SurfacesOutlineOverviewCurvesMany applications in graphicsGoalsParametric curvesParametric polynomial curvesPiecewise parametric polynomialsCredit where credit is dueSlide 11Bézier curvesSlide 13Representing curvesParametric-nessBezier curve formulaHow much to weight each pointWeighting of the pointsAdditional notationAn aside: continuityJoining Bezier segmentsWe could have used fewer pointsFont issuesSlide 24Bezier curves vs. B-splinesHow B-splines work(uniform) B-splinesB-spline formulationSlide 29Uniform B-splinesParameter range of curveB-spline weightsSlide 33Repeated control pointsRepeated end control pointsSlide 36Non-uniform B-splinesSlide 38Uniform vs. non-uniformB-splines and Bezier curvesKnot multiplicitySlide 42Slide 43Slide 44Slide 45Slide 46Rational curvesSlide 48Dimensional projection3-D -> 2-D version of rational curves4-D -> 3-D version of rational curvesWhy use rational curves?Slide 53NURBSMore NURBS propertiesSlide 56Bezier PatchesManipulating Bezier PatchesConnecting Bezier patchesProblems connecting Bezier patchesBezier TeapotSlide 62Slide 63B-spline PatchesReplicating control pointsA few closing thoughts…ParametricCurves & SurfacesAaron BloomfieldCS 445: Introduction to GraphicsFall 200622OutlineOutline•IntroductionIntroduction•Bezier CurvesBezier Curves•B-SplinesB-Splines–Uniform B-SplinesUniform B-Splines–Non-uniform B-SplinesNon-uniform B-Splines•Rational CurvesRational Curves–Rational Bezier CurvesRational Bezier Curves•NURBSNURBS•Bezier PatchesBezier Patches•B-spline PatchesB-spline Patches3Overview Today: CurvesNext Time: SurfacesPrzemyslaw Prusinkiewicz4CurvesSplines: mathematical way to express curvesMotivated by “loftsman’s spline”Long, narrow strip of wood/plasticUsed to fit curves through specified data pointsShaped by lead weights called “ducks”Gives curves that are “smooth” or “fair”Have been used to design:AutomobilesShip hullsAircraft fuselage/wing5Many applications in graphicsFonts ABCAnimation pathsShape modelingetc…Animation(Angel, Plate 1)Shell(Douglas Turnbull)6GoalsSome attributes we might like to have:Predictable controlLocal controlVersatilityContinuityWe’ll satisfy these goals using:PiecewiseParametricPolynomials7Parametric curvesA parametric curve in the plane is expressed as:x = x(u)y = y(u)Example: a circle with radius r centered at origin:x = r cos uy = r sin uIn contrast, an implicit representation is:x2 + y2 = r28Parametric polynomial curvesA parametric polynomial curve is:Advantages of polynomial curvesEasy to computeEasy differentiationniiiuaux0)(niiiubuy0)(9Piecewise parametric polynomialsUse different polynomial functionson different parts of the curveProvides flexibilityHow do you guarantee continuity/smoothness at join points (called knots)? In the rest of this lecture, we’ll look at:Bézier curves: general class of polynomial curvesSplines: ways of putting these curves together10Credit where credit is dueAll the scanned images in this presentation are from Alan Watt’s 3D Computer Graphics book, 3rd edition (2000).1111OutlineOutline•IntroductionIntroduction•Bezier CurvesBezier Curves•B-SplinesB-Splines–Uniform B-SplinesUniform B-Splines–Non-uniform B-SplinesNon-uniform B-Splines•Rational CurvesRational Curves–Rational Bezier CurvesRational Bezier Curves•NURBSNURBS•Bezier PatchesBezier Patches•B-spline PatchesB-spline Patches12Developed independently in the 1960s byBézier (at Renault) deCasteljau (at Citroen)Bezier developed them to help design automobilesBézier curves13Consider the curve defined by the four points P0, P1, P2, and P3:The curve starts out at P0And starts out tangent to the line between P0 and P1It moves in the direction of P1Then in the direction of P2And ends at P3 (and tangent to the line between P2 and P3)Show Blender demo…Bézier curvesP0P1P2P314Representing curvesWe will see a way to represent such curvesThey cannot be a regular function:not a function!15Parametric-nessu is defined to range from 0 to 1 across the Bezier curveP0P1P2P3u=0u=1u=0.516Bezier curve formulaWe’ll weight the points of the control polygon to generate the curve Where Bi(u) is the weighting for that pointAlternatively, P0P1P2P3)()()()()(33221100uBPuBPuBPuBPuQ 30)()(iiiuBPuQu=0u=117How much to weight each pointBecause there are four points, our weights will have to be cubicAt P0, the curve is also at P0, so the weight will have to be (1-u)3At P1, the curve is also at P1, so the weight will have to be u3This leads to the Bernstein polynomials as our weights:33222130)()1(3)()1(3)()1()(uuBuuuBuuuBuuBP0P1P2P318Weighting of the points19Additional notationOur equation:When expanded, becomes:Can be represented in matrix form as… which equals: 30)()(iiiuBPuQ33222130)1(3)1(3)1()( uPuuPuuPuPuQ PUBuQz)( 32102300010033036313311)(PPPPuuuuQ20An aside: continuityNo continuity: the two segments are not in contactC0 continuity: they meet at the same pointC1 continuity: the first derivatives meet at the same pointThis means that the tangents at the join point are the sameC2 continuity: the second derivatives meet at the same pointEtc.21Joining Bezier segmentsWe want C1 continuity (at least!)To preserve C0 continuity, S3 must equal R0To preserve C1 continuity, S2, S3/R0, and R1 must be co-linearThis places additional constraints on multi-segmented Bezier curves22We could have used fewer pointsUsed two points:Linear interpolation, which results in a lineUsed three points:Quadratic (i.e. x2) interpolation, which results in curves that aren’t as flexible as desiredUsed five or more pointsResults in many mathematical complications23Font issuesTrue type fonts (and now OpenFont fonts)Use quadratic Bezier curvesThus, have problems representing smooth curvesPostScript fontsUse cubic Bezier curvesThis is what printers useMicrosoft made quadratic fonts that match PostScript’s cubic fontsArial for Helvetica, Times New Roman for Times Roman, etc.Linux uses fonts with
View Full Document