Bernstein polynomials of degree N are defined by

Similar documents
Interpolation and polynomial approximation Interpolation

Approximation of Circular Arcs by Parametric Polynomials

446 CHAP. 8 NUMERICAL OPTIMIZATION. Newton's Search for a Minimum of f(x,y) Newton s Method

The Essentials of CAGD

CMSC427 Parametric curves: Hermite, Catmull-Rom, Bezier

Lecture 23: Hermite and Bezier Curves

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

M2R IVR, October 12th Mathematical tools 1 - Session 2

SEC POWER METHOD Power Method

Sample Exam 1 KEY NAME: 1. CS 557 Sample Exam 1 KEY. These are some sample problems taken from exams in previous years. roughly ten questions.

On-Line Geometric Modeling Notes

Smooth Path Generation Based on Bézier Curves for Autonomous Vehicles

Home Page. Title Page. Contents. Bezier Curves. Milind Sohoni sohoni. Page 1 of 27. Go Back. Full Screen. Close.

1.1. The analytical denition. Denition. The Bernstein polynomials of degree n are dened analytically:

5.1 Least-Squares Line

9.2 Euler s Method. (1) t k = a + kh for k = 0, 1,..., M where h = b a. The value h is called the step size. We now proceed to solve approximately

p 1 p 0 (p 1, f(p 1 )) (p 0, f(p 0 )) The geometric construction of p 2 for the se- cant method.

Lecture 20: Bezier Curves & Splines

Introduction to Computer Graphics. Modeling (1) April 13, 2017 Kenshi Takayama

CGT 511. Curves. Curves. Curves. What is a curve? 2) A continuous map of a 1D space to an nd space

Curves, Surfaces and Segments, Patches

Introduction to Curves. Modelling. 3D Models. Points. Lines. Polygons Defined by a sequence of lines Defined by a list of ordered points

9.8 Boundary Value Problems. Another type of differential equation has the form. (1) x = f (t, x, x ) for a t b, with the boundary conditions

CSE 167: Lecture 11: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Bézier Curves and Splines

9.6 Predictor-Corrector Methods

MAT300/500 Programming Project Spring 2019

434 CHAP. 8 NUMERICAL OPTIMIZATION. Powell's Method. Powell s Method

632 CHAP. 11 EIGENVALUES AND EIGENVECTORS. QR Method

Arsène Pérard-Gayot (Slides by Piotr Danilewski)

Curves. Hakan Bilen University of Edinburgh. Computer Graphics Fall Some slides are courtesy of Steve Marschner and Taku Komura

CONTROL POLYGONS FOR CUBIC CURVES

MA 323 Geometric Modelling Course Notes: Day 07 Parabolic Arcs

Curve Fitting: Fertilizer, Fonts, and Ferraris

Keyframing. CS 448D: Character Animation Prof. Vladlen Koltun Stanford University

Continuous Curvature Path Generation Based on Bézier Curves for Autonomous Vehicles

Visualizing Bezier s curves: some applications of Dynamic System Geogebra

The Tangent Parabola The AMATYC Review, Vol. 23, No. 1, Fall 2001, pp

Geometric Lagrange Interpolation by Planar Cubic Pythagorean-hodograph Curves

Reading. w Foley, Section 11.2 Optional

Department of Mathematical and Statistical Sciences University of Alberta

Appendix E : Note on regular curves in Euclidean spaces

Pythagorean-hodograph curves

Section 8.1 Vector and Parametric Equations of a Line in

1.1 Single Variable Calculus versus Multivariable Calculus Rectangular Coordinate Systems... 4

King Fahd University of Petroleum and Minerals Prep-Year Math Program Math (001) - Term 181 Recitation (1.1)

Analyzing Functions Maximum & Minimum Points Lesson 75

Subdivision Matrices and Iterated Function Systems for Parametric Interval Bezier Curves

MATH 2433 Homework 1

1.2. Direction Fields: Graphical Representation of the ODE and its Solution Let us consider a first order differential equation of the form dy

MA 323 Geometric Modelling Course Notes: Day 20 Curvature and G 2 Bezier splines

MAT 300 Midterm Exam Summer 2017

Functions of Several Variables

Cubic Splines; Bézier Curves

Novel polynomial Bernstein bases and Bézier curves based on a general notion of polynomial blossoming

AFFINE COMBINATIONS, BARYCENTRIC COORDINATES, AND CONVEX COMBINATIONS

Parametric Functions and Vector Functions (BC Only)

Exercises for Multivariable Differential Calculus XM521

A Relationship Between Minimum Bending Energy and Degree Elevation for Bézier Curves

Introduction. Chapter Points, Vectors and Coordinate Systems

Q( t) = T C T =! " t 3,t 2,t,1# Q( t) T = C T T T. Announcements. Bezier Curves and Splines. Review: Third Order Curves. Review: Cubic Examples

SOLUTIONS TO SECOND PRACTICE EXAM Math 21a, Spring 2003

Path Planning based on Bézier Curve for Autonomous Ground Vehicles

Functions of Several Variables

Grade 11 Pre-Calculus Mathematics (1999) Grade 11 Pre-Calculus Mathematics (2009)

BROWN UNIVERSITY MATH 0350 MIDTERM 19 OCTOBER 2017 INSTRUCTOR: SAMUEL S. WATSON. a b. Name: Problem 1

MA 323 Geometric Modelling Course Notes: Day 12 de Casteljau s Algorithm and Subdivision

2 The De Casteljau algorithm revisited

Computer Graphics Keyframing and Interpola8on

Chapter 10: Conic Sections; Polar Coordinates; Parametric Equations

CBSE Class IX Syllabus. Mathematics Class 9 Syllabus

BÉZIER FITTING TO ALMOST OVAL GEAR DEVICES

Homework Assignments Math /02 Fall 2014

R1: Sets A set is a collection of objects sets are written using set brackets each object in onset is called an element or member

Rational Bézier Patch Differentiation using the Rational Forward Difference Operator

COURSE STRUCTURE CLASS -IX

Mathematics Class 9 Syllabus. Course Structure. I Number System 17 II Algebra 25 III Geometry 37 IV Co-ordinate Geometry 6 V Mensuration 5 Total 90

A crash course the geometry of hyperbolic surfaces

Utah Secondary Mathematics Core Curriculum Precalculus

11.4 Dot Product Contemporary Calculus 1

Lagrange Interpolation and Neville s Algorithm. Ron Goldman Department of Computer Science Rice University

MAT1035 Analytic Geometry

4.1 Analysis of functions I: Increase, decrease and concavity

ENGI 4430 Line Integrals; Green s Theorem Page 8.01

This exam will be over material covered in class from Monday 14 February through Tuesday 8 March, corresponding to sections in the text.

Lectures 9-10: Polynomial and piecewise polynomial interpolation

Utah Core State Standards for Mathematics - Precalculus

Scientific Computing

Algebra & Trigonometry for College Readiness Media Update, 2016

. For each initial condition y(0) = y 0, there exists a. unique solution. In fact, given any point (x, y), there is a unique curve through this point,

V(t) = Total Power = Calculating the Power Spectral Density (PSD) in IDL. Thomas Ferree, Ph.D. August 23, 1999

Chap 4. State-Space Solutions and

Recognise the Equation of a Circle. Solve Problems about Circles Centred at O. Co-Ordinate Geometry of the Circle - Outcomes

To find an approximate value of the integral, the idea is to replace, on each subinterval

Worksheet 1.8: Geometry of Vector Derivatives

- 1 - Items related to expected use of technology appear in bold italics.

Name: ID: Math 233 Exam 1. Page 1

We saw in Section 5.1 that a limit of the form. arises when we compute an area.

Planar interpolation with a pair of rational spirals T. N. T. Goodman 1 and D. S. Meek 2

ENGR 213: Applied Ordinary Differential Equations

Transcription:

SEC. 5.5 BÉZIER CURVES 309 5.5 Bézier Curves Pierre Bézier at Renault and Paul de Casteljau at Citroën independently developed the Bézier curve for CAD/CAM operations, in the 1970s. These parametrically defined polynomials are a class of approximating splines. Bézier curves are the basis of the entire Adobe PostScript drawing model that is used in the software products Adobe Illustrator, Macromedia Freehand, and Fontographer. Bézier curves continue to be the primary method of representing curves and surfaces in computer graphics (CAD/CAM, computer-aided geometric design). In Casteljau s original development, Bézier curves were defined implicitly by a recursive algorithm (see Property 1 below). The development of the properties of Bézier curves will be facilitated by defining them explicitly in terms of Bernstein polynomials. Definition 5.5. for i = 0, 1, 2,..., N, where Bernstein polynomials of degree N are defined by ( ) N B i,n (t) = t i (1 t) N i, i ( ) N = i N! i! (N i)!. In general, there are N + 1 Bernstein polynomials of degree N. For example, the Bernstein polynomials of degrees 1, 2, and 3 are (1) (2) B 0,1 (t) = 1 t, B 1,1 (t) = t; B 0,2 (t) = (1 t) 2, B 1,2 (t) = 2t(1 t), B 2,2 (t) = t 2 ; and (3) B 0,3 (t) = (1 t) 3, B 1,3 (t) = 3t(1 t) 2, B 2,3 (t) = 3t 2 (1 t), B 3,3 (t) = t 3 ; respectively. Properties of Bernstein Polynomials Property 1. Recurrence Relation Bernstein polynomials can be generated in the following way. Set B 0,0 (t) = 1 and B i,n (t) = 0fori < 0ori > N, and use the recurrence relation (4) B i,n (t) = (1 t)b i,n 1 (t) + tb i 1,N 1 (t) for i = 1, 2, 3,..., N 1. Property 2. Nonnegative on [0, 1] The Bernstein polynomials are nonnegative over the interval [0, 1] (see Figure 5.21).

310 CHAP. 5 CURVE FITTING Property 3. The Bernstein polynomials form a partition of unity (5) B i,n (t) = 1 Substituting x = t and y = 1 t into the binomial theorem (x + y) N = ( ) N x i y N i i yields ( ) N x i y N i = (t + (1 t)) N = 1 N = 1. i Property 4. Derivatives d (6) dt B i,n (t) = N(B i 1,N 1 (t) B i,n 1 (t)) Formula (6) is established by taking the derivative of the Bernstein polynomial in Definition 5.5. d dt B i,n (t) = d ( ) N t i (1 t) N i dt i in! = i! (N i)! ti 1 (1 t) N i N(N 1)! = (i 1)! (N i)! ti 1 (1 t) N i ( (N 1)! = N (i 1)! (N i)! ti 1 (1 t) N i = N ( B i 1,N 1 (t) B i,n 1 (t) ) (N i)n! i! (N i)! ti (1 t) N i 1 N(N 1)! i! (N i 1)! ti (1 t) N i 1 (N 1)! i! (N i 1)! ti (1 t) N i 1 ) Property 5. Basis The Bernstein polynomials of order N (B i,n (t) for i = 0, 1,..., N) form a basis of the space of all polynomials of degree less than or equal to N. Property 5 states than any polynomial of degree less than or equal to N can be written uniquely as a linear combination of the Bernstein polynomials of order N. The concept of a basis of a vector space is introduced in Chapter 11. Given a set of control points, {P i } N,aBézier curve of degree N is now defined as a weighted sum of the Bernstein polynomials of degree N.

SEC. 5.5 BÉZIER CURVES 311 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 B 0,3 (t) B 1,3 (t) B 3,3 (t) B 2,3 (t) 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 t Figure 5.21 Bernstein polynomials of degree three. Definition 5.6. Given a set of control points {P i } N, where P i = (x i, y i ),abézier curve of degree N is (7) P(t) = P i B i,n (t), where B i,n (t), fori = 0, 1,..., N, are the Bernstein polynomials of degree N, and t [0, 1]. In formula (7) the control points are ordered pairs representing x- and y-coordinates in the plane. Without ambiguity the control points can be treated as vectors and the corresponding Bernstein polynomials as scalars. Thus formula (7) can be represented parametrically as P(t) = (x(t), y(t)), where (8) x(t) = x i B i,n (t) and y(t) = y i B i,n (t), and 0 t 1. The function P(t) is said to be a vector-valued function, or equivalently, the range of the function is a set of points in the xy-plane. Example 5.16. Find the Bézier curve which has the control points (2, 2), (1, 1.5), (3.5, 0), and (4, 1). Substituting the x- and y-coordinates of the control points and N = 3intoformula(8) yields (9) x(t) = 2B 0,3 (t) + 1B 1,3 (t) + 3.5B 2,3 (t) + 4B 3,3 (t) (10) y(t) = 2B 0,3 (t) + 1.5B 1,3 (t) + 0B 2,3 (t) + 1B 3,3 (t).

312 CHAP. 5 CURVE FITTING 2 P 0 1.5 P 1 y 1 P 3 0.5 0 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 x Figure 5.22 Bézier curve of degree three and convex hull of control points. P 2 Substituting the Bernstein polynomials of degree three, found in formula (3), into formulas (9) and(10) yields (11) (12) x(t) = 2(1 t) 3 + 3t(1 t) 2 + 10.5t 2 (1 t) + 4t 3 y(t) = 2(1 t) 3 + 4.5t(1 t) 2 + t 3. Simplifying formulas (11) and (12) yields P(t) = (2 3t + 10.5t 2 5.5t 3, 2 1.5t 3t 2 + 3.5t 3 ), where 0 t 1. The functions x(t) and y(t) in formulas (11) and (12) are polynomials and are continuous and differentiable over the interval 0 t 1. Thus the graph of the Bézier curve P(t) is a continuous and differentiable curve in the xy-plane (see Figure 5.22), where 0 t 1. Note. P(0) = (2, 2) and P(1) = (4, 1). The graph of the curve starts at the first control point (2, 2) and ends at the last control point (4, 1). Properties of Bézier Curves Property 1. The points P 0 and P 1 are on the curve P(t) Substituting t = 0 into Definition 5.5 yields { 1 fori = 0 B i,n (0) = 0 fori = 0.

SEC. 5.5 BÉZIER CURVES 313 Similarly, B i,n (1) = 1fori = N and is zero for i = 0, 1,...,N 1. Substituting these results into Definition 5.6 yields P(0) = P i B i,n (0) = P 0 and P(1) = P i B i,n (1) = P N. Thus the first and last points in the sequence of control points, {P i } N, are the endpoints of the Bézier curve. Note. The remaining control points are not necessarily on the curve. In Example 5.16 there were four control points and the resulting components x(t) and y(t) were third-degree polynomials. In general, when there are N + 1 control points the resulting components will be polynomials of degree N. Since polynomials are continuous and have continuous derivatives of all orders, it follows that the Bézier curve in Definition 5.6 will be continuous and have derivatives of all orders. Property 2. P(t) is continuous and has derivatives of all orders on the interval [0, 1] The derivative of P(t), with respect to t,is P (t) = d dt = = P i B i,n (t) P i d dt B i,n (t) P i N(B i 1,N 1 (t) B i,n 1 (t)) (Property 4 of Bernstein polynomials). Setting t = 0 and substituting B i,n (0) = 1 for i = 0 and B i,n (0) = 0fori 1(Definition 5.5) into the right-hand side of the expression for P (t) and simplifying yields P (0) = P i N(B i 1,N 1 (0) B i,n 1 (0)) = N(P 1 P 0 ). Similarly, P (1) = N(P N P N 1 ). In other words, the tangent lines to a Bézier curve at the endpoints are parallel to the lines through the endpoints and the adjacent control points. The property is illustrated in Figure 5.23.

314 CHAP. 5 CURVE FITTING Property 3. P (0) = N(P 1 P 0 ) and P (1) = N(P N P N 1 ) The final property is based on the concept of a convex set. A subset C of the xy-plane is said to be a convex set, provided that all the points on the line segment joining any two points in C are also elements of the set C. For example, a line segment or a circle and its interior are convex sets, while a circle without its interior is not a convex set. The convex set concept extends naturally to higher-dimension spaces. Definition 5.7. containing C. The convex hull of a set C is the intersection of all convex sets Figure 5.22 shows the convex hull (the indicated quadrilateral and its interior) of the control points for the Bézier curve from Example 5.16. In the xy-plane the convex hull of a set of points, {P i } N, may be visualized by placing pins at each point and placing a rubber band around the resulting configuration. A sum N m i P i is said to be a convex combination of the points {P i } N, provided that the set of coefficients m 0, m 1,...,m N are nonnegative and N m i = 1. A convex combination of points must necessarily be a subset of the convex hull of the set of points. It follows from properties 2 and 3 of the Bernstein polynomials that the Bézier curve in formula (7) is a convex combination of the control points. Therefore, the graph of the curve must lie in the convex hull of the control points. Property 4. The Bézier curve lies in the convex hull of its set of control points The properties indicate that the graph of a Bézier curve of degree N is a continuous curve, bounded by the convex hull of the set of control points, {P i } N, and that the curve begins and ends at points P 0 and P N, respectively. Bézier observed that the graph is sequentially pulled toward each of the remaining control points P 1, P 2,...,P N 1. For example, if the control points P 1 and P N 1 are replaced by the control points Q 1 and Q N 1, which are farther away (but in the same direction) from the respective endpoints, then the resulting Bézier curve will more closely approximate the tangent line near the endpoints. Figure 5.23 illustrates the pulling and tangent effects using the Bézier curve P(t) from Example 5.16 and the curve Q(t) with control points (2, 2), (0, 1), (3, 1), and (4, 1). Clearly, Q 1, P 1, and P 0 = Q 0, and Q 2, P 2, and P 3 = Q 3 are collinear, respectively. The effectiveness of Bézier curves lies in the ease with which the shape of the curve can be modified (mouse, keyboard, or other graphical interface) by making small adjustments to the control points. Figure 5.24 shows four Bézier curves, of different degrees, with the corresponding sets of control points sequentially connected to form polygonal paths. The reader should observe that the polygonal paths provide a rough sketch of the resulting Bézier curves. Changing the coordinates of any one control point, say P k, will change the shape of the entire curve over the parameter interval 0 t 1. The changes in the shape of the curve will be somewhat localized, since the Bernstein polynomial B k,n, corresponding to the control point P k (formula (7)), has

SEC. 5.5 BÉZIER CURVES 315 2 P 0 = Q 0 1.5 1 Q 1 P 1 P(t) P 3 = Q 3 y 0.5 Q(t) 0 P 2 0.5 1 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 x Q 2 Figure 5.23 P(t), Q(t) and control points. a maximum at the parameter value t = k/n. Thus the majority of the change in the shape of the graph of the Bézier curve will occur near the point P(k/N). Consequently, creating a curve of a specified shaped requires a relatively small number of changes to the original set of control points. In practice, curves are produced using a sequence of Bézier curves sharing common endpoints. This process is analogous to that used in the creation of cubic splines. In that case it was necessary to use a sequence of cubic polynomials to avoid the oscillatory behavior of polynomials of high degree. Property 4 shows that the oscillatory behavior of higher-degree polynomials is not a problem with Bézier curves. Since changing one control point changes the shape of a Bézier curve, it is simpler to break the process into a series of Bézier curves and minimize the number of changes in the control points. Example 5.17. Find the composite Bézier curve for the four sets of control points {( 9, 0), ( 8, 1), ( 8, 2.5), ( 4, 2.5)}, {( 4, 2.5), ( 3, 3.5), ( 1, 4), (0, 4)} {(0, 4), (2, 4), (3, 4), (5, 2)}, {(5, 2), (6, 2), (20, 3), (18, 0)} Following the process outlined in Example 5.16 yields P 1 (t) = ( 9 + 3t 3t 2 + 5t 3, 3t + 1.5t 2 2t 3 ) P 2 (t) = ( 4 + 3t + 3t 2 2t 3, 2.5 + 3t 1.5t 2 ) P 3 (t) = (6t 3t 2 + 2t 3, 4 2t 3 ) P 4 (t) = (5 + 3t + 39t 2 29t 3, 2 + 3t 2 5t 3 ). The graph of the composite Bézier curve and corresponding control points is shown in Figure 5.25.

316 CHAP. 5 CURVE FITTING Figure 5.24 Bézier curves and polygonal paths. The Bézier curves in Example 5.17 do not meet smoothly at the common endpoints. To have two Bézier curves P(t) and Q(t) meet smoothly would require that P N = Q 0 and P (P N ) = Q (Q 0 ). Property 3 indicates that it is sufficient to require that the control points P N 1, P N = Q 0, and Q 1 be collinear. To illustrate, consider the Bézier curves P(t) and Q(t) of degree three with the control point sets {(0, 3), (1, 5), (2, 1), (3, 3)} and {(3, 3), (4, 5), (5, 1), (6, 3)}, respectively. Clearly, the control points (2, 1), (3, 3), and (4, 5) are collinear. Again, following the process outlined in Example 5.16: (13) (14) and P(t) = (3t, 3 + 6t 18t 2 + 12t 3 ) Q(t) = (3 + 3t, 3 + 6t 18t 2 + 12t 3 ) P (t) = (3, 6 36t + 36t 2 ) and Q (t) = (3, 6 36t + 36t 2 ). Substituting t = 1 and t = 0 into P (t) and Q (t), respectively, yields P (1) = (3, 6) = Q (0)

SEC. 5.5 BÉZIER CURVES 317 y 4 3.5 3 2.5 2 1.5 1 0.5 0 10 5 0 5 10 15 20 x Figure 5.25 Composite Bźier curves. 5 Q 1 4.5 4 3.5 y 3 2.5 P(t) P 3 Q 0 2 1.5 P 2 Q(t) 1 0 1 2 3 4 5 6 x Figure 5.26 Matching derivatives at Bézier curves at common endpoints. The graphs of P(t ) and Q(t ) and the smoothness at the common endpoint are shown in Figure 5.26.

Numerical Methods Using Matlab, 4 th Edition, 2004 John H. Mathews and Kurtis K. Fink ISBN: 0-13-065248-2 Prentice-Hall Inc. Upper Saddle River, New Jersey, USA http://vig.prenhall.com/