Cubic Bezier and B-Spline Curves

Slides:



Advertisements
Similar presentations
Lecture Notes #11 Curves and Surfaces II
Advertisements

Lecture 10 Curves and Surfaces I
Geometric Modeling Notes on Curve and Surface Continuity Parts of Mortenson, Farin, Angel, Hill and others.
09/25/02 Dinesh Manocha, COMP258 Triangular Bezier Patches Natural generalization to Bezier curves Triangles are a simplex: Any polygon can be decomposed.
Overview June 9- B-Spline Curves June 16- NURBS Curves June 30- B-Spline Surfaces.
CS 445/645 Fall 2001 Hermite and Bézier Splines. Specifying Curves Control Points –A set of points that influence the curve’s shape Knots –Control points.
© University of Wisconsin, CS559 Spring 2004
Jehee Lee Seoul National University
B-Spline Blending Functions
1 Introduction Curve Modelling Jack van Wijk TU Eindhoven.
1 Curves and Surfaces. 2 Representation of Curves & Surfaces Polygon Meshes Parametric Cubic Curves Parametric Bi-Cubic Surfaces Quadric Surfaces Specialized.
CS CS 175 – Week 9 B-Splines Definition, Algorithms.
Rational Bezier Curves
09/04/02 Dinesh Manocha, COMP258 Bezier Curves Interpolating curve Polynomial or rational parametrization using Bernstein basis functions Use of control.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 12: Spline Curves (review) Ravi Ramamoorthi Most material.
CS CS 175 – Week 8 Bézier Curves Definition, Algorithms.
Modeling of curves Needs a ways of representing curves: Reproducible - the representation should give the same curve every time; Computationally Quick;
1 Lecture 13 Modeling Curved Lines and Surfaces. 2 Types of Surfaces Ruled Surfaces B-Splines and Bezier Curves Surfaces of Revolution.
1 Dr. Scott Schaefer The Bernstein Basis and Bezier Curves.
09/09/02 Dinesh Manocha, COMP258 Properties of Bezier Curves Invariance under affine parameter transformation P i B i,n (u) = P i B i,n ((u –a)/(b-a))
Geometric Modeling Surfaces Mortenson Chapter 6 and Angel Chapter 9.
Curves Mortenson Chapter 2-5 and Angel Chapter 9
Bezier and Spline Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Modelling: Curves Week 11, Wed Mar 23
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Curves Week 13, Mon 24 Nov 2003.
Bezier and Spline Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Parts of Mortenson Chapter 6-9,
Curve Surfaces June 4, Examples of Curve Surfaces Spheres The body of a car Almost everything in nature.
Splines III – Bézier Curves
Curve Modeling Bézier Curves
11/19/02 (c) 2002, University of Wisconsin, CS 559 Last Time Many, many modeling techniques –Polygon meshes –Parametric instancing –Hierarchical modeling.
(Spline, Bezier, B-Spline)
V. Space Curves Types of curves Explicit Implicit Parametric.
Introduction to Computer Graphics with WebGL
1 Dr. Scott Schaefer Smooth Curves. 2/109 Smooth Curves Interpolation  Interpolation through Linear Algebra  Lagrange interpolation Bezier curves B-spline.
Cornell CS465 Fall 2004 Lecture 15© 2004 Steve Marschner 1 2D Spline Curves CS 465 Lecture 15.
Quadratic Surfaces. SPLINE REPRESENTATIONS a spline is a flexible strip used to produce a smooth curve through a designated set of points. We.
Chapter VI Parametric Curves and Surfaces
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Parametric Curves.
Splines IV – B-spline Curves based on: Michael Gleicher: Curves, chapter 15 in Fundamentals of Computer Graphics, 3 rd ed. (Shirley & Marschner) Slides.
Parametric Surfaces Define points on the surface in terms of two parameters Simplest case: bilinear interpolation s t s x(s,t)x(s,t) P 0,0 P 1,0 P 1,1.
Computer Graphics Representing Curves and Surfaces.
Geometric Modelling 2 INFO410 & INFO350 S Jack Pinches
Keyframing and Splines Jehee Lee Seoul National University.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
CS 445 / 645 Introduction to Computer Graphics Lecture 23 Bézier Curves Lecture 23 Bézier Curves.
Representation of Curves & Surfaces Prof. Lizhuang Ma Shanghai Jiao Tong University.
04/18/02(c) 2002 University of Wisconsin Last Time Hermite Curves Bezier Curves.
Curves: ch 4 of McConnell General problem with constructing curves: how to create curves that are “smooth” CAD problem Curves could be composed of segments.
11/26/02(C) University of Wisconsin Last Time BSplines.
Parametric Curves CS 318 Interactive Computer Graphics John C. Hart.
(c) 2002 University of Wisconsin
1 CS 430/536 Computer Graphics I B-Splines and NURBS Week 5, Lecture 9 David Breen, William Regli and Maxim Peysakhov Geometric and Intelligent Computing.
Splines Sang Il Park Sejong University. Particle Motion A curve in 3-dimensional space World coordinates.
Rendering Bezier Curves (1) Evaluate the curve at a fixed set of parameter values and join the points with straight lines Advantage: Very simple Disadvantages:
Kansas State University Department of Computing and Information Sciences CIS 736: Computer Graphics Lecture 13 of 42 Wednesday, 15 February 2006 William.
Graphics Programming 2003, Lee Byung-Gook, Dongseo Univ., Graphics Programming Lee Byung-Gook Dongseo Univ.
Curves University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
CS552: Computer Graphics Lecture 19: Bezier Curves.
Introduction to Parametric Curve and Surface Modeling.
Graphics Programming 2003, Lee Byung-Gook, Dongseo Univ., Graphics Programming Lee Byung-Gook Dongseo Univ.
© University of Wisconsin, CS559 Spring 2004
Computer Graphics Lecture 38
CS5500 Computer Graphics May 11, 2006
Representation of Curves & Surfaces
Parametric Curves.
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
Chapter XVII Parametric Curves and Surfaces
Introduction to Parametric Curve and Surface Modeling
Presentation transcript:

Cubic Bezier and B-Spline Curves Geometric Modeling 91.580.201 Curves (continued) Cubic Bezier and B-Spline Curves Farin Chapters 4-5, 6, 8 Mortenson Chapters 4, 5

4 Typical Types of Parametric Curves Control points influence curve shape. Interpolating Curve passes through all control points. Hermite Defined by its 2 endpoints and tangent vectors at endpoints. Interpolates all its control points. Not invariant under affine transformations. Special case of Bezier and B-Spline. Bezier* Interpolates first and last control points. Invariant under affine transformations. Curve is tangent to first and last segments of control polygon. Easy to subdivide. Curve segment lies within convex hull of control polygon. Variation-diminishing. Special case of B-spline. B-Spline* Not guaranteed to interpolate control points. Greater local control than Bezier. *focus of this lecture source: Mortenson, Angel

Notation Mortenson Farin Control points and parameter: source: Mortenson, Farin

Bezier Curves Farin Chapter 4 The de Casteljau Algorithm

Parabola Construction Change of notation from Chapter 3 (previously): Now: Add: By substitution: source: Farin

The de Casteljau Algorithm Conceptually elegant, but not necessarily the fastest algorithm… Given: set: Example: cubic curve point source: Farin source: Farin

Some Bezier Curve Properties Affine invariance: Linear interpolation is affinely invariant. Invariance under affine parameter transformations (beyond [0,1] to [a,b]): Convex hull: Curve stays within convex hull of control polygon. Each intermediate point is a convex barycentric combination of previously generated points. Planar control polygon generates planar curve. Helpful for intersection tests. Endpoint interpolation: Curve passes through b0 and bn. Verify using scheme for t =0 and t =1. source: Farin

Bezier Curves Farin Chapter 5-6 & Mortenson Chapter 4 The Bernstein Form of a Bezier Curve

Bernstein polynomials. Bezier Geometric form (cubic case): Bernstein polynomials. 4 = number of control points = degree + 1 Evaluate at u=0 and u=1 to show tangents related to first and last control polygon line segment. source: Mortenson

Bezier Geometric form (general case): Bernstein polynomials. n+1 = number of control points = degree + 1 Rational form is invariant under perspective transformation: where hi are projective space coordinates (weights) See Chapter 13 of Farin for rational Bezier material. source: Mortenson

More Bezier Curve Properties Symmetry: Bernstein polynomials are symmetric with respect to u and 1- u. Convex Hull (again): Convex combination, so Bezier curve points all lie within convex hull of control polygon. Bezier curve with 4 control points source: Farin, Mortenson

More Bezier Curve Properties Degree elevation leaving curve unchanged Adding a control point elevates degree by 1. New vertices b(1)i obtained from old polygon by piecewise linear interpolation at parameter values i/(n+1). New control polygon is in convex hull of old one. source: Farin

More Bezier Curve Properties Repeated degree elevation: (in the limit) produces control polygon sequence that converges to the actual curve. Variation Diminishing: Piecewise linear interpolation is variation diminishing. Degree elevation uses piecewise linear interpolation. Each successive control polygon cannot intersect a given plane more often than the control polygon upon which it is based. Thus, the curve cannot intersect the plane more often than any of the control polygons. Corollary: convex control polygon produces convex curve segment. source: Farin

Composite Bezier Curves Joining adjacent curve segments is an alternative to degree elevation. Collinearity of cubic Bezier control points produces G1 continuity at join point: Evaluate at u=0 and u=1 to show tangents related to first and last control polygon line segment. For G2 continuity at join point, 5 vertices must be coplanar. source: Mortenson

B-Spline Curves Mortenson Chapter 5 & Farin Chapter 8

See Chapter 13 of Farin for rational B-spline material. Geometric form (non-uniform, non-rational case), where K controls degree (K -1) of basis functions: Cubic B-splines can provide C2 continuity at curve segment join points. N ti are n+1+K knot values that relate u to the control points. Uniform case: space knots at equal intervals of u. Repeated knots move curve closer to control points. Convex combination, so B-spline curve points all lie within convex hull of control polygon. Rational form (NURBS) is invariant under perspective transformation, where hi are projective space coordinates (weights). See Chapter 13 of Farin for rational B-spline material. source: Mortenson

Some B-Spline Curve Properties Affine invariance: Linear interpolation is affinely invariant. Invariance under affine parameter transformations (beyond [0,1] to [a,b]): Convex hull: Curve stays within convex hull of control polygon (see later slide). Each intermediate point is a convex barycentric combination of previously generated points. Planar control polygon generates planar curve. Helpful for intersection tests. No endpoint interpolation: unlike Bezier Variation diminishing Transformation to some other parametric forms: B-Spline curve can be transformed into Bezier form. See Mortenson p. 170. B-Spline curve can be transformed into Hermite form. See Mortenson p. 170-171. source: Farin, Mortenson

Cubic B-Spline Geometric form (cubic case): B-spline cubic basis functions 4 = number of control points = degree + 1 Convex combination, so B-spline curve points all lie within convex hull of control polygon. Uniform cubic B-spline: N1,4 N2,4 N3,4 N4,4 Evaluate at u=0 and u=1 to show curve endpoints and tangent directions related to control polygon. source: Mortenson

More B-Spline Curve Properties Symmetry: Basis functions possess parametric symmetry: Example: Uniform cubic B-spline: N1,4 N2,4 N3,4 N4,4 source: Farin, Mortenson

Shape Characterization of Uniform Cubic B-Spline Curve Segment Shape depends on control polygon 3 (non-collinear) control points determine triangle Type of curve segment and its monotonicity depends on location of 4th point p3 relative to triangle p0, p1, p2: SP: spiral control polygon induces convex, monotone curve segment. U: U-shaped convex control polygon induces convex, monotone curve segment. V:V-shaped convex control polygon induces 1 inflection point at curve segment endpoint. Curve segment is convex, monotone. N: N-shaped control polygon induces1 inflection point with convex, monotone pieces on both sides of inflection point. SI: self-intersecting control polygon induces 1 or 2 monotone curve subsegments. D: self-intersecting control polygon may induce loop, cusp or 2 inflection points. In all cases, curve segment can be partitioned into at most 2 monotone pieces. p0 p1 p2 SP SI U V N D source: Daniels, et al. building on Wang et al.

The deBoor Algorithm Given: knots & control points Conceptually elegant, but not necessarily the fastest algorithm… Given: knots & control points & parameter u, generalize de Casteljau algorithm. Example: quadratic case with 4 knots and 3 control points K , 1 u knot sequence u0, u1, u2, u3 = 0, 1, 3, 4 and u = 2.0 curve point source: Farin source: Farin

OpenGL Demo to accompany HW#2 Geometric Modeling 91.580.201 OpenGL Demo to accompany HW#2