MA 323 Geometric Modelling Course Notes: Day 17 Bezier Splines I

Similar documents
MA 323 Geometric Modelling Course Notes: Day 02 Model Construction Problem

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

Computer Graphics. Geometric Modeling. Page 1. Copyright Gotsman, Elber, Barequet, Karni, Sheffer Computer Science - Technion. An Example.

the points are called control points approximating curve

(Refer Slide Time: 1:42)

Figure 2.1: Center of mass of four points.

CHAPTER 1 Splines and B-splines an Introduction

Geometric Modelling & Curves

We can display an object on a monitor screen in three different computer-model forms: Wireframe model Surface Model Solid model

November 16, Interpolation, Extrapolation & Polynomial Approximation

1 Cubic Hermite Spline Interpolation

Modeling Curves and Surfaces

3. Interpolation. Closing the Gaps of Discretization... Beyond Polynomials

EECS 556 Image Processing W 09. Interpolation. Interpolation techniques B splines

Essential Mathematics for Computer Graphics fast

Corollary. (f є C n+1 [a,b]). Proof: This follows directly from the preceding theorem using the inequality

88 CHAPTER 2. VECTOR FUNCTIONS. . First, we need to compute T (s). a By definition, r (s) T (s) = 1 a sin s a. sin s a, cos s a

Parametric Curves. (Com S 477/577 Notes) Yan-Bin Jia. Oct 8, 2015

BEZIER CURVES AND SURFACES

Computer Graphics CS 543 Lecture 12 (Part 1) Curves. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Trigonometric Functions and Equations

Curves and Surfaces. Goals. How do we draw surfaces? How do we specify a surface? How do we approximate a surface?

1 Review of Least Squares Solutions to Overdetermined Systems

TWO-DIMENSIONAL TRANSFORMATION

Polynomials. Dr. philippe B. laval Kennesaw State University. April 3, 2005

Traditional Drawing Tools

Degree Reduction of Interval SB Curves

Computer Animation: Art, Science and Criticism

Piecewise Cubic Splines

Problem of the Month: Once Upon a Time

Natural cubic splines

MATH 132: CALCULUS II SYLLABUS

2. Length and distance in hyperbolic geometry

PARAMETRIC MODELING. David Rosen. December By carefully laying-out datums and geometry, then constraining them with dimensions and constraints,

How To Use Design Mentor

A matrix method for degree-raising of B-spline curves *

Objectives. Materials

Graphical Integration Exercises Part Four: Reverse Graphical Integration

Estimating the Average Value of a Function

CATIA Wireframe & Surfaces TABLE OF CONTENTS

INTERPOLATION. Interpolation is a process of finding a formula (often a polynomial) whose graph will pass through a given set of points (x, y).

Finite Element Formulation for Plates - Handout 3 -

INCIDENCE-BETWEENNESS GEOMETRY

Overview of Data Fitting Component in Intel Math Kernel Library (Intel MKL) Intel Corporation

PERFORMANCE OF BÉZIER CURVES RENDERING IN WEB BROWSERS

Examples of Functions

PRACTICAL GUIDE TO DATA SMOOTHING AND FILTERING

Chapter 2. Parameterized Curves in R 3

Grade 7 & 8 Math Circles Circles, Circles, Circles March 19/20, 2013

1. Abstract 2. Introduction 3. Algorithms and Techniques

SolidWorks Implementation Guides. Sketching Concepts

B2.53-R3: COMPUTER GRAPHICS. NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions.

Intermediate Tutorials Modeling - Trees. 3d studio max. 3d studio max. Tree Modeling Matthew D'Onofrio Page 1 of 12

1 Review of Newton Polynomials

This week. CENG 732 Computer Animation. Challenges in Human Modeling. Basic Arm Model

Chapter 4. Polynomial and Rational Functions. 4.1 Polynomial Functions and Their Graphs

Chapter 13: Fibonacci Numbers and the Golden Ratio

An Instructional Aid System for Driving Schools Based on Visual Simulation

Core Maths C2. Revision Notes

Computational Geometry. Lecture 1: Introduction and Convex Hulls

Thnkwell s Homeschool Precalculus Course Lesson Plan: 36 weeks

COMMON CORE STATE STANDARDS FOR MATHEMATICS 3-5 DOMAIN PROGRESSIONS

Blender 3D Animation

Largest Fixed-Aspect, Axis-Aligned Rectangle

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite

By the end of this set of exercises, you should be able to:

1 The Brownian bridge construction

Estimated Pre Calculus Pacing Timeline

In mathematics, there are four attainment targets: using and applying mathematics; number and algebra; shape, space and measures, and handling data.

A Multi Level Sketching Tool for Pencil and Paper Animation

Precalculus REVERSE CORRELATION. Content Expectations for. Precalculus. Michigan CONTENT EXPECTATIONS FOR PRECALCULUS CHAPTER/LESSON TITLES

Fourth Grade Math Standards and "I Can Statements"

Mathematical Conventions Large Print (18 point) Edition

Objectives After completing this section, you should be able to:

Numerical Analysis An Introduction

Given a point cloud, polygon, or sampled parametric curve, we can use transformations for several purposes:

2.2 Derivative as a Function

Guide to Leaving Certificate Mathematics Ordinary Level

An Overview of the Finite Element Analysis

Charged Particle in a Magnetic Field

PCHS ALGEBRA PLACEMENT TEST

CSU Fresno Problem Solving Session. Geometry, 17 March 2012

Geometry: Unit 1 Vocabulary TERM DEFINITION GEOMETRIC FIGURE. Cannot be defined by using other figures.

BPS Math Year at a Glance (Adapted from A Story Of Units Curriculum Maps in Mathematics K-5) 1

Prentice Hall Mathematics: Algebra Correlated to: Utah Core Curriculum for Math, Intermediate Algebra (Secondary)

CS 4204 Computer Graphics

Functions: Piecewise, Even and Odd.

POLYNOMIAL FUNCTIONS

Deflections. Question: What are Structural Deflections?

1. Volatility Index. 2. India VIX* 3. India VIX :: computation methodology

16 Circles and Cylinders

Section 3-3 Approximating Real Zeros of Polynomials

A Geometric Characterization of Parametric Cubic Curves

Cabri Geometry Application User Guide

NURBS Drawing Week 5, Lecture 10

CMSC 425: Lecture 13 Animation for Games: Basics Tuesday, Mar 26, 2013

Zeros of Polynomial Functions

Oxford Cambridge and RSA Examinations

Making 3D Threads in Feature Based Solid Modelers

Mean value theorem, Taylors Theorem, Maxima and Minima.

Transcription:

MA 323 Geometric Modelling Course Notes: Day 17 Bezier Splines I David L. Finn Today, we start considering piecewise Bezier curves or Bezier splines. We have previously introduced the idea of piecewise polynomial curves (Hermite curves), which was a direct generalization of piecewise linear curves (polylines) and piecewise circular curves. We now want to extend the idea of piecewise polynomial curves to Bezier curves, and introduce the idea of a composite Bezier curve or a Bezier spline. The word spline comes from naval architecture when knots, ropes and pulleys were used to bend the wooden planks that were used to build wooden ships. In fact, much of the terminology involved with splines comes from the physical constructions of naval architecture. When constructing splines, it is typically done with respect to a smoothness condition. There are two types of smoothness that are considered, functional and geometric. These involve different notions of continuity. Functional continuity involves orders of continuity with respect to the parameter of the curve, while geometric continuity involves continuity with respect to the arc-length parameter of the curve. Today and tomorrow, we will only consider splines with respect to functional continuity. To look at geometric continuity, we need to look in more detail at the differential geometry of curves. 17.1 Piecewise Bezier Curves We define a piecewise Bezier curve by giving two (or more) sets of control points. Let p 1 0, p 1 1, p 1 2,, p 1 n be one set of control points and p 2 0, p 2 1, p 2 2,, p 2 n be another set of control points. [It is convention that one joins curves of the same order, as using degree elevation we can always arrange the curves to have the same degree.] We can use each set to define a Bezier curve, let b 1 (t) be the curve with control points {p 1 i } and let b 2(t) be the curve with control points {p 2 j }. We can then define a piecewise Bezier curve by { b 1 (s) if 0 s 1 b(s) = b 2 (s 1) if 1 s 2 We must define the curve in this manner so for each value of s we get back one point. We note that there is a slight problem with this definition. When t = 1, this curve is possibly multi-valued, depending on the values of the last control point of b 1 (t) and the first control point of b 2 (t), that is p 1 n and p 2 0. The parameter t for each Bezier curve b i (t) is a local parameter, used to construct the Bezier curve, while the parameter s defining the piecewise Bezier curve is a global parameter. Notice that a piecewise Bezier curve as defined above is continuous if and only if p 1 n = p 2 0. This is due to the endpoint interpolation property for Bezier curves, and in this case the curve is single valued. When p 1 n p 2 0, a Bezier curve as defined above is not continuous and

17-2 the definition is not single-valued. A piecewise Bezier curve that is continuous (p 1 n = p 2 0) is said to have zeroth order continuity. Higher orders of functional continuity are defined by continuity of the derivatives of the curve at the joint point p 1 n = p 2 0. Figure 1: A piecewise Bezier curve consisting of 4 cubic curves In the diagram above, notice that there is a sharp corner where the first and second arcs are joined and there is a sharp corner where the three and fourth arcs are joined, but there is no apparent corner where the second and third arcs are joined. Even though the individual Bezier curves are smooth, piecewise Bezier curves do not have to be smooth. At the joint p 1 n = p 2 0, the piecewise Bezier curve can have a sharp corner as illustrated in the diagram above. To define a piecewise Bezier curve, so that it does not have a sharp corner, we consider the value of the derivative for each curve at the joint p i (1) = pi + 1(0) (using the uniform knot sequence see below), the values of the derivatives p i (1) and p i+1 (0). Recall from the previous notes that the derivative of a Bezier curve is the Bezier curve b(t) = i=0 n Bi n (t) p i i=0 n 1 b (t) = n B n 1 i (t) i p, where i p = p i+1 p i are the first differences of the control points. Therefore using a uniform knot sequence that is t 0 = 0, t 1 = 1, t 2 = 2 et cetera, we have that b 1(1) = n (p 1 n p 1 n 1) = n (p 2 1 p 2 0) = p 2(0) from B n 0 (0) = 1 and B n i (0) = 0 if i > 0, and Bn i (1) = 0 if i < n and Bn n(1) = 1. We thus conclude from p 2 0 = p 1 n that p 2 0 = p 1 n = 1 2 (p1 n 1 + p 2 1). Therefore, to construct a piecewise Bezier curve using two curves we give n points for each curve, and define the joint point as

17-3 the midpoint of the the segment p 1 n 1 and p 2 1. An example of such a joining of two Bezier curves to produce a piecewise defined Bezier curve is given below. Figure 2: Construction of cubic C 1 Bezier spline of two segments The procedure above generalizes to construct C 1 Bezier splines. For the remainder of this chapter we will mainly consider piecewise cubic Bezier curves, which we will consider in detail in the next section. But first, we note that there is no reason that we have to use 0 t 1 as the interval over which the first Bezier curve is defined and there is no reason that we have to use 1 t 2 as the interval over which the second Bezier curve is defined. We can instead define the composite curve over the arbitrary subintervals. This is an important observation that will be exploited when defining B-splines and is important in animation, at it allows one to use time explicitly in controlling the motion and designing the path of the motion. To define a piecewise Bezier curve, we thus technically require in addition to control points a knot sequence t 0 < t 1 < t 2 < < t L where L is the number of arcs used to create the piecewise Bezier curve. The knot sequence t 0 = 0, t 1 = 1,, t L = L is called the uniform knot sequence, and if no knot sequence is given you are to assume that the uniform knot sequence is used in creating a piecewise Bezier curve. To create a Bezier curve using a nonuniform knot sequence, we first consider the linear transformation that maps the interval t 0 t t 1 to 0 τ 1, that is τ = (t t 0 )/(t 1 t 0 ). We then use (t t 0 )/(t 1 t 0 ) as the parameter in the Bernstein polynomials defining the Bezier curve, to define the curve c 1 (t) can be defined as c 1 (t) = n i=0 B n i ( ) t t0 t 1 t 0 p 1 i = b 1 ( t t 0 t 1 t 0 ), where b 1 is the Bezier curve with control points {p 1 i }. The second arc of the piecewise Bezier

17-4 curve is likewise defined as c 2 (t) = n i=0 B n i ( ) t t1 t 2 t 1 p 2 i = b 2 ( t t 1 t 2 t 1 ). This can be extended to other other arcs defined on t i t t i+1 in the obvious manner. We note the parameterization of the curve has no affect on the zeroth order continuity of a piecewise Bezier curve. The equality of the first and last control points determine the zeroth order continuity. In fact, the fact that c i (t) = b i ((t t i 1 )/(t i t i 1 )) implies that the parameterization of a piecewise Bezier curve has no affect on the shape of the curve, since τ(t) = (t t i 1 )/(t i t i 1 ) is a one-to-one and onto function from [t i 1, t i ] to [0, 1], and there is a inverse t = t i 1 + τ(t i t i 1 ). Reparameterizations of a curve in general have no affect on the shape of curve, but can affect the smoothness of the curve as you are to demonstrate in one of the exercises. Exercises 1. Play with the applet: Creating C 0 Bezier Splines. This applet uses the uniform knot sequence, as the knot sequence has no affect on the curve. 2. Where do you place the control points to approximate a circle with a C 0 Bezier spline? Use the Applet: Fitting a C 0 Bezier spline to a circle to investigate this. How does the number of segments change the configuration of the control points and the control polyline? 3. Given the control polyline below sketch the C 0 cubic Bezier spline. Figure 3: Construct C 0 cubic Bezier spline

17-5 4. Given the control points below, determine if the C 0 cubic Bezier spline will be differentiable with the uniform knot sequence. Figure 4: Is this C 0 Bezier spline differentiable? 5. Determine the conditions required for a piecewise Bezier curve with two cubic curves with control points p k 0, p k 1, p k 2 and p k 3 (k = 1 or k = 2) using the nonuniform knot sequence t 0, t 1, t 2 to be C 1, that is have a continuous derivative at the joint point p 1 3 = p 2 0. This means compute b 1(t 1 ) and b 2(t 1 ) where b 1 (t) = B 3 i ((t t 0)/(t 1 t 0 )) p 1 i and b 2 (t) = B 3 i ((t t 1)/(t 2 t 1 )) p 2 i, and determine the relations between p1 2, p 1 3 = p 2 0, p 2 1. 17.2 C 1 cubic Bezier Splines We now start considering curves that truly are Bezier splines. Our principal interest in this section is with C 1 cubic Bezier splines. Cubic Bezier splines are of special interest as they allow us to define and approximate curves very well with simple curves. The approximation of a circle by using cubic curves to approximate a quarter circle in the interactive exercises is a simple example of the use of cubic Bezier splines. Let us start by considering, a piecewise Bezier curve consisting of three cubic Bezier curves. To define this piecewise curve, we need 10 control points. Each cubic curve requires 4 points for a total of 12 points, but there are two joint points, meaning we need 10 control points. If we desire the curve to smooth at the joint points, we really only need 8 control points, as the joint points are defined by the two nearest points. The first three control points of the first cubic curve segment, the last three control points of the third cubic curve segment, and the middle two control points of the second curve segment, see the diagram below. In general, we need to be given 2L + 2 points to define a C 1 cubic Bezier spline (with the uniform knot sequence) that is made up of L cubic Bezier arcs. This is an advantage over the number of points that must be given to create a C 0 cubic Bezier spline, as 3L + 1 points need to be given to create a C 0 cubic Bezier spline. The exact procedure for producing the Bezier spline is given below. We start with the spline control points d 1, d 0, d 1,, d 2L. [The index in defining the spline control points begins at 1 so that the last spline control

17-6 Figure 5: A differentiable piecewise Bezier curve of three segments point is given by 2L from which it is easy to determine the number of curve segments.] To produce, the L cubic Bezier curves we need 4L control points, however since the spline is to be continuous L 1 of these points are joints (the points where consecutive cubic curves meet), that means we really need to define 3L + 1 control points from the 2L + 2 spline control points. From the 3L + 1 control points p 0, p 1, p 2,, p 3L, we define the individual cubic Bezier curves b j (t) with j = 1, 2,, L as b j (t) = (1 t) 3 p 3j 3 + 3t(1 t) 2 p 3j 2 + 3t 2 (1 t) p 3j 1 + t 3 p j The procedure for defining the control points p i from the given control points d 1, d 0, d 1,, d 2L and a uniform knot sequence is to set p 0 = d 1 p 1 = d 0 p 2 = d 1 to start the definition of the control points of the Bezier curves. Then we define, p 3i+1 = d 2i and p 3i+2 = d 2i+1 for i = 1, 2,, L 1. This gives the middle two points of each intermediate Bezier curve, and all but the final point in the last Bezier curve. We then define p 3L = d 2L (the last control point in defining the piecewise Bezier curve = the last control point in the Bezier spline), and then we define p 3i = 1 2 (p 3i 1 + p 3i+1 ) with i = 1, 2,, L 1, which gives the joint points of the Bezier curves. See diagram, below. To use a nonuniform knot sequence, the points p 3i where two cubic Bezier curves meet in the spline no longer need to be at the midpoint of the segment p 3i 1 and p 3i+1 that are defined

17-7 Figure 6: A C 1 Bezier spline of 4 segments with its spline control points. directly from the control points d k. It does have to be on the line segment p 3i 1 p 3i+1 but not necessarily at the midpoint. The exact location is determined by the knot sequence, see exercises below. Exercises 1. Play with the applet: Creating C 1 (cubic) Bezier Splines. Notice the difference between a C 1 Bezier spline and the Bezier curve with the same control points. In particular, play with how the control points affect the shape of the curve. This applet uses uniform knot sequences. 2. Where do you place the control points to approximate a circle with a C 1 Bezier spline? Use the Applet: Fitting a C 1 Bezier spline to a circle to investigate this. How does the number of segments change the configuration of the control points and the control polyline? 3. Determine the algorithm to create an nth degree C 1 Bezier spline, a piecewise Bezier curve consisting of nth order Bezier curves. 4. Extend the conditions from Exercise 4 in the previous subsection to define a cubic Bezier spline with L cubic arcs and a nonuniform knot sequence. 5. Determine the conditions relating the control points of an nth degree C 1 Bezier spline to the associated piecewise Bezier curve using a non-uniform knot sequence. 6. Sketch the C 1 Bezier spline given the control polylines below (assuming a uniform) sequence

17-8 Figure 7: Sketch the C 1 Bezier spline given the control polyline Figure 8: Sketch the C 1 Bezier spline given the control polyline