MA 323 Geometric Modelling Course Notes: Day 10 Higher Order Polynomial Curves

Similar documents
MA 323 Geometric Modelling Course Notes: Day 28 Data Fitting to Surfaces

MA 323 Geometric Modelling Course Notes: Day 14 Properties of Bezier Curves

CS 450 Numerical Analysis. Chapter 7: Interpolation

Computer Graphics Curves and Surfaces. Matthias Teschner

Video 11.1 Vijay Kumar. Property of University of Pennsylvania, Vijay Kumar

CHAPTER 2 SENSITIVITY OF LINEAR SYSTEMS; EFFECTS OF ROUNDOFF ERRORS

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li.

Splines. Parameterization of a Curve. Curve Representations. Roller coaster. What Do We Need From Curves in Computer Graphics? Modeling Complex Shapes

Interactive Graphics. Lecture 9: Introduction to Spline Curves. Interactive Graphics Lecture 9: Slide 1

An introduction to interpolation and splines

Natural Numbers and Integers. Big Ideas in Numerical Methods. Overflow. Real Numbers 29/07/2011. Taking some ideas from NM course a little further

Scientific Computing: Interpolation

lecture 10: B-Splines

Spline Methods Draft. Tom Lyche and Knut Mørken. Department of Informatics Centre of Mathematics for Applications University of Oslo

4 Visualization and. Approximation

Curves and Surfaces 1

Know it. Control points. B Spline surfaces. Implicit surfaces

MA 323 Geometric Modelling Course Notes: Day 31 Blended and Ruled Surfaces Coons Patches

Design considerations

Spline Methods Draft. Tom Lyche and Knut Mørken

Curves D.A. Forsyth, with slides from John Hart

Curves and Surfaces Computer Graphics I Lecture 9

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

Interpolation and Splines

Spline Methods Draft. Tom Lyche and Knut Mørken

Handout 4 - Interpolation Examples

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics

CS130 : Computer Graphics Curves. Tamar Shinar Computer Science & Engineering UC Riverside

CS130 : Computer Graphics Curves (cont.) Tamar Shinar Computer Science & Engineering UC Riverside

February 23 Math 2335 sec 51 Spring 2016

CS 6210 Fall 2016 Bei Wang. Review Lecture What have we learnt in Scientific Computing?

Spline Notes. Marc Olano University of Maryland, Baltimore County. February 20, 2004

The Bisection Method versus Newton s Method in Maple (Classic Version for Windows)

08 - Designing Approximating Curves

In this course we will need a set of techniques to represent curves and surfaces in 2-d and 3-d. Some reasons for this include

Parametric curves. Reading. Curves before computers. Mathematical curve representation. CSE 457 Winter Required:

Maximizing an interpolating quadratic

Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 6:

Lecture 9: Introduction to Spline Curves

Until now we have worked with flat entities such as lines and flat polygons. Fit well with graphics hardware Mathematically simple

Derivative. Bernstein polynomials: Jacobs University Visualization and Computer Graphics Lab : ESM4A - Numerical Methods 313

Prof. Fanny Ficuciello Robotics for Bioengineering Trajectory planning

MA 323 Geometric Modelling Course Notes: Day 21 Three Dimensional Bezier Curves, Projections and Rational Bezier Curves

(Refer Slide Time: 00:02:24 min)

Curves and Surfaces for Computer-Aided Geometric Design

Central issues in modelling

Optimizations and Lagrange Multiplier Method

Intro to Modeling Modeling in 3D

Simulation in Computer Graphics. Particles. Matthias Teschner. Computer Science Department University of Freiburg

Curve and Surface Basics

Curve Representation ME761A Instructor in Charge Prof. J. Ramkumar Department of Mechanical Engineering, IIT Kanpur

Spline Curves. Spline Curves. Prof. Dr. Hans Hagen Algorithmic Geometry WS 2013/2014 1

MATH 51: MATLAB HOMEWORK 3

Consider functions such that then satisfies these properties: So is represented by the cubic polynomials on on and on.

AP Calculus BC Course Description

SYSTEMS OF NONLINEAR EQUATIONS

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10

Math 370 Exam 5 Review Name

Truncation Errors. Applied Numerical Methods with MATLAB for Engineers and Scientists, 2nd ed., Steven C. Chapra, McGraw Hill, 2008, Ch. 4.

8 Piecewise Polynomial Interpolation

CHAPTER 6 Parametric Spline Curves

Remark. Jacobs University Visualization and Computer Graphics Lab : ESM4A - Numerical Methods 331

Natural Quartic Spline

Parametric curves. Brian Curless CSE 457 Spring 2016

DOWNLOAD PDF BIG IDEAS MATH VERTICAL SHRINK OF A PARABOLA

Curves and Surfaces Computer Graphics I Lecture 10

Grade 9 Math Terminology

CS321 Introduction To Numerical Methods

For each question, indicate whether the statement is true or false by circling T or F, respectively.

PITSCO Math Individualized Prescriptive Lessons (IPLs)

DEPARTMENT - Mathematics. Coding: N Number. A Algebra. G&M Geometry and Measure. S Statistics. P - Probability. R&P Ratio and Proportion

NUMERICAL ANALYSIS USING SCILAB: NUMERICAL STABILITY AND CONDITIONING

99 International Journal of Engineering, Science and Mathematics

Polynomials tend to oscillate (wiggle) a lot, even when our true function does not.

1 Trajectories. Class Notes, Trajectory Planning, COMS4733. Figure 1: Robot control system.

A Curve Tutorial for Introductory Computer Graphics

Math 225 Scientific Computing II Outline of Lectures

Introduction to ANSYS DesignXplorer

A NON-TRIGONOMETRIC, PSEUDO AREA PRESERVING, POLYLINE SMOOTHING ALGORITHM

Curve fitting using linear models

Computer Graphics. Curves and Surfaces. Hermite/Bezier Curves, (B-)Splines, and NURBS. By Ulf Assarsson

NO CALCULATOR ALLOWED

Concept of Curve Fitting Difference with Interpolation

Bezier Curves, B-Splines, NURBS

Lecture 9. Curve fitting. Interpolation. Lecture in Numerical Methods from 28. April 2015 UVT. Lecture 9. Numerical. Interpolation his o

Polynomial Approximation and Interpolation Chapter 4

AM205: lecture 2. 1 These have been shifted to MD 323 for the rest of the semester.

Interpolation by Spline Functions

1 - Local smoothness analysis

1.2 Numerical Solutions of Flow Problems

SECONDARY DRAFT SYLLABUS. 2. Representation of functions. 3. Types of functions. 4. Composition of functions (two and three)

OUTLINE. Quadratic Bezier Curves Cubic Bezier Curves

Numerical Integration

5.5 Newton s Approximation Method

8 Project # 2: Bézier curves

MAT128A: Numerical Analysis Lecture Two: Finite Precision Arithmetic

COMPUTER AIDED ENGINEERING DESIGN (BFF2612)

Piecewise polynomial interpolation

ECE 204 Numerical Methods for Computer Engineers MIDTERM EXAMINATION /4:30-6:00

Parameterization. Michael S. Floater. November 10, 2011

Transcription:

MA 323 Geometric Modelling Course Notes: Day 10 Higher Order Polynomial Curves David L. Finn December 14th, 2004 Yesterday, we introduced quintic Hermite curves as a higher order variant of cubic Hermite curves. The advantage of quintic curves that we were concerned with is that they provide us with a method for joining curves in a manner that is twice differentiable, that is in a C 2 manner. This is useful for animation and motion planning as we can prescribe the position, velocity and acceleration at a series of data points and smoothly interpolate between the given values. Today, we want to consider in some detail the problem of interpolation and data fitting with higher order polynomial curves. This involves generalizing the methods introduced for quadratic and cubic curves. However, we will discuss why these methods are not used often in geometrically modelling, in terms of what properties we can infer about the curve from the controls. We also look at how stable the methods are to small perturbations in the variations of the points and times to be interpolated. The general difference with the interpolation problem with higher order polynomial curves is that you need to use more information. To interpolate with a nth degree polynomial one needs to supply n + 1 data points, as there are n + 1 unknowns in the equation for an nth degree polynomial, a 0 + a 1 t + a 2 t 2 + + a n t n. In the next subsection, we consider the method of interpolation based on the work of the French mathematician Joseph Louis Lagrange. This provides a theoretical answer to the interpolation problem, and generalizes the method used to perform quadratic interpolation and cubic interpolation. 10.1 Lagrange Interpolation Given n+1 points {p i } and n+1 parameter values t i with i = 0, 1,, n and t 0 < t 1 < < t n, finding a polynomial curve c(t) with c(t i ) = p i can be accomplished by the methods presented in the previous sections. One can set up a system of n + 1 equations and n + 1 unknowns and solve or one can design the appropriate basis functions that construct the curve. However, we note that the matrix method exploited in the section on cubic curves does not generalize nicely to variable degree problems. Especially, if you want to add new points interactively and generate the curve automatically. The reason for this is simple. You need to resolve the system of equations each time increasing the degree of the polynomial. In general, matrix algebra methods are only appropriate when the degree of the polynomial is fixed before hand. It is theoretically possible, but potentially time-consuming given that

10-2 solving a system of linear equations is a n 3 algorithm, meaning that we need to perform roughly 1000 operations to determine the coefficients with 10 data points and we need to perform roughly 1000000 operations to determine the coefficients with 100 data points. We will thus examine the basis function approach, that is known as Lagrange interpolation, which is n 2 method, meaning we need to perform 100 operations to determine the coefficients 10 data points and we need to perform roughly 10000 operations to determine the coefficients with 100 data points. Lagrange interpolation is built in an inductive manner. We consider the base case of linear polynomial interpolation, and then consider how this extends to quadratic polynomial interpolation. We then continue the process inductively with the goal being to define n + 1 nth degree polynomial functions L n i (t) (i=0,1,..n) that satisfy { L n 1 if i = j, i (t j ) = 0 otherwise. The interpolating polynomial curve is then c(t) = n i=0 Ln i (t) p i. Recall the linear function that passes through the points p 0 and p 1 at times t 0 and t 1 could be written as t t 1 p 0 + t t 0 p 1. t 0 t 1 t 1 t 0 The important observation of this linear interpolant is the form. This interpolant can be written as L(t) = L 0 (t) p 0 + L 1 (t) p 1. The functions L 0 (t) and L 1 (t) are designed so that L 0 (t) satisfies L 0 (t 0 ) = 1, L(t 1 ) = 0 and L 1 (t) satisfies L 1 (t 0 ) = 0, L 1 (t 1 ) = 1. Notice the form of the basis function as a quotient. From the section on interpolation with parabolic arcs solution by quadratics, we found that the quadratic Lagrange basis functions are L 2 0(t) = (t t 1)(t t 2 ) (t 0 t 1 )(t 0 t 2 ) L 2 1(t) = (t t 0)(t t 2 ) (t 1 t 0 )(t 1 t 2 ) L 2 2(t) = (t t 0)(t t 2 ) (t 2 t 0 )(t 2 t 1 ) Again notice the form of the basis function as a quotient. Furthermore, notice that the basis functions for quadratic interpolation can be viewed as a product of the linear interpolation functions. It is this that allows the inductive construction, though the inductive construction is hidden in the algebra. In the general construction, we first note that an nth degree polynomial that satisfies L n i (t j) = 0 for i j is given by (t t 0 )(t t 1 ) (t t i 1 )(t t i+1 ) (t t n ). The other constraint L n i (t i) = 1 is obtained by dividing by the value of the above function when t = t i. Therefore, the basis functions are L n i (t) = (t t 0)(t t 1 ) (t t i 1 )(t t i+1 ) (t t n ) (t i t 0 )(t i t 1 ) (t i t i 1 )(t i t i+1 ) (t i t n ). A typical graph of basis function looks like

10-3 Figure 1: Graph of Typical Lagrange Basis Function Figure 2: Graph of Typical Interpolants Using the Lagrange basis function pictured in Figure 1, we obtain the following curves with various points. For our purposes, there is a large problem with Lagrange interpolation. The interpolant can have wild variation. The key element that controls this oscillation is the spacing of the parameter values. The functional values of the basis functions are in fact not between 0 and 1 (an important property to be discussed later). In fact, another major problem is the fact that in this manner of interpolation the values of the Lagrange basis function L n i (t) is not necessarily close to zero when t t j < ɛ. We do have L n i (t j) = 0 for i j, but the value L n i (t) is not uniformly close to zero when t is close to t j. The derivative of the basis functions can be very large at t = t j.

10-4 To demonstrate the possibility of wild variation, we show an example of a set of basis functions that generate some wild variation and an example of interpolating with the same data points as in 2. Figure 3: Wilder Variation in a Lagrange Basis Function Figure 4: Interpolations with Wilder Variation Lagrange Basis Functions

10-5 We show another example of basis functions with wild variation and another set of examples of interpolation using the basis functions above with roughly the same data points as in 2. Figure 5: Wilder Variation in a Lagrange Basis Function Figure 6: Interpolations with Wilder Variation Lagrange Basis Functions

10-6 Here is a third set of basis functions with wild variation and another set of examples of interpolation with roughly the same data points as in 2. Figure 7: Wilder Variation in a Lagrange Basis Function Figure 8: Interpolations with Wilder Variation Lagrange Basis Functions

10-7 The parameter values used above were chosen semi-randomly. You could argue that since the parameter values were not chosen to represent properties of the data we obtained possibly nonsensical results. The figures below represent using chord length parameter values, which can still have some problems. Figure 9: Lagrange Basis Function for Data with Chord Length Parameter Values Figure 10: Interpolations with Chord Length Parameter Lagrange Basis Functions

10-8 10.2 Problems and Numerical Stability One of the problems with Lagrange interpolation is that there is no clear indication as to where the curve will lie with the given data points. The parametrization of the curve greatly affects the location of the curve. Specifically, using roughly the same data points, we obtain vastly different curves in the figures 2, 4, 6 and 8. This is a great problem. We would like the data points to enforce on the curve some control without using extra structure as in chord length parameter values. There are some problems with the methods presented so far in the course, especially when one starts using actual data instead of concocted examples. The principal problem with the polynomials methods we have introduced is that we are working with the monomial basis {1, t, t 2,, t n }, which is numerically unstable. When we solve for the coefficients a 0, a 1,, a n of a polynomial curve, the data supplied is frequently not going to be exact and calculations performed will not be done in exact arithmetic. This means that the data and the calculations are only done to a fixed decimal place accuracy. In an interpolation problem, this possibly causes the curve not to pass through the desired points. In addition, the curves produced by these methods can vary greatly under small variations of the data. To see this, run the Maple worksheet available on Angel and look at the effect of using different decimal place accuracy, also see figure below. Other issues to consider are the design of the relevant basis functions. The monomial basis functions {1, t, t 2,, t n } are designed for problems where Taylor polynomial data is supplied, the value and derivatives at one point. Lagrange basis functions are designed for interpolation problems. Hermite basis functions are designed for interpolation problems involving function values and derivative values at different endpoints. Each of these types of basis functions are designed for different purposes and thus have different types of error propagation involved. For instance, polynomials written in the monomial basis have small errors (given small roundoff error in the coefficients) near t = 0, but the error grows as t becomes larger. The Lagrange basis functions have small error near each given parameter value {t i }, but the error from the true curve can grow large in between the given parameter values, due to the oscillations in the basis functions. Hermite polynomials have similar problems with the monomial basis. The advantage is that the data at the second endpoint sort of corrects the error propagation. If one is truly interested in error analysis of the methods introduced in this chapter, they

10-9 should consult a text on Numerical Analysis and take a course in Numerical Analysis. For our purposes, these methods while conceptually easy are not good for design problems, with the exception of Hermite polynomials which do lend themselves to design and creation of curves. In the next few days, we will introduce a better method at least for numerical stability and for design of curves. Exercises 1. (Computational) Compare the basis functions and the interpolants for the data points x 1.0 2.0 2.5 1.0 0.0 y 0.0 1.0 4.0 3.0-1.0 using equally spaced parameter values and chord length parameter values rounding values to three decimal point accuracy. Which in your opinion produces the better curve. 2. (Computational) Repeat the above exercise using the data points x 1.0 2.1 2.4 1.0 0.2 y 0.0 0.9 4.1 2.9-1.1 3. How do the interpolations and the basis functions compare in the previous two exercises.