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

Similar documents
Information About Ellipses

Fitting a Natural Spline to Samples of the Form (t, f(t))

Perspective Projection of an Ellipse

Least-Squares Fitting of Data with Polynomials

Distance Between Ellipses in 2D

Reconstructing an Ellipsoid from its Perspective Projection onto a Plane

Least Squares Fitting of Data by Linear or Quadratic Structures

Solving Systems of Polynomial Equations

The Laplace Expansion Theorem: Computing the Determinants and Inverses of Matrices

Intersection of Ellipsoids

Principal Curvatures of Surfaces

Intersection of Infinite Cylinders

Intersection of Objects with Linear and Angular Velocities using Oriented Bounding Boxes

Intersection of Ellipses

Intersection of Rectangle and Ellipse

LINEAR ALGEBRA 1, 2012-I PARTIAL EXAM 3 SOLUTIONS TO PRACTICE PROBLEMS

Least Squares Fitting of Data

Distance from Line to Rectangle in 3D

Interpolation of Rigid Motions in 3D

HW2 - Due 01/30. Each answer must be mathematically justified. Don t forget your name.

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.

(a) II and III (b) I (c) I and III (d) I and II and III (e) None are true.

Distance from a Point to an Ellipse, an Ellipsoid, or a Hyperellipsoid

The Essentials of CAGD

Distance to Circles in 3D

Remark By definition, an eigenvector must be a nonzero vector, but eigenvalue could be zero.

Econ Slides from Lecture 7

Conceptual Questions for Review

Eigenvalues and Eigenvectors: An Introduction

Chapter 7. Canonical Forms. 7.1 Eigenvalues and Eigenvectors

Chapter 3 Transformations

LINEAR ALGEBRA SUMMARY SHEET.

Question: Given an n x n matrix A, how do we find its eigenvalues? Idea: Suppose c is an eigenvalue of A, then what is the determinant of A-cI?

235 Final exam review questions

MA 323 Geometric Modelling Course Notes: Day 07 Parabolic Arcs

Quadratic forms. Here. Thus symmetric matrices are diagonalizable, and the diagonalization can be performed by means of an orthogonal matrix.

Linear Algebra Practice Problems

The Area of Intersecting Ellipses

Remark 1 By definition, an eigenvector must be a nonzero vector, but eigenvalue could be zero.

Lecture 8 : Eigenvalues and Eigenvectors

homogeneous 71 hyperplane 10 hyperplane 34 hyperplane 69 identity map 171 identity map 186 identity map 206 identity matrix 110 identity matrix 45

22m:033 Notes: 7.1 Diagonalization of Symmetric Matrices

Lecture 15, 16: Diagonalization

Exercise Set 7.2. Skills

BASIC ALGORITHMS IN LINEAR ALGEBRA. Matrices and Applications of Gaussian Elimination. A 2 x. A T m x. A 1 x A T 1. A m x

Chapter 5. Eigenvalues and Eigenvectors

(v, w) = arccos( < v, w >

Solving Homogeneous Systems with Sub-matrices

Topic 2 Quiz 2. choice C implies B and B implies C. correct-choice C implies B, but B does not imply C

1 Last time: least-squares problems

Computationally, diagonal matrices are the easiest to work with. With this idea in mind, we introduce similarity:

LINEAR ALGEBRA QUESTION BANK

Low-Degree Polynomial Roots

Econ 204 Supplement to Section 3.6 Diagonalization and Quadratic Forms. 1 Diagonalization and Change of Basis

SOLUTIONS: ASSIGNMENT Use Gaussian elimination to find the determinant of the matrix. = det. = det = 1 ( 2) 3 6 = 36. v 4.

MATH 221, Spring Homework 10 Solutions

Review of Linear Algebra

Jordan normal form notes (version date: 11/21/07)

CS168: The Modern Algorithmic Toolbox Lecture #8: How PCA Works

MATH. 20F SAMPLE FINAL (WINTER 2010)

APPLICATIONS The eigenvalues are λ = 5, 5. An orthonormal basis of eigenvectors consists of

8. Diagonalization.

Computing Orthonormal Sets in 2D, 3D, and 4D

Review problems for MA 54, Fall 2004.

Math 1553, Introduction to Linear Algebra

Final Exam, Linear Algebra, Fall, 2003, W. Stephen Wilson

Course Summary Math 211

MATH 31 - ADDITIONAL PRACTICE PROBLEMS FOR FINAL

Math 205, Summer I, Week 4b:

Linear Algebra: Matrix Eigenvalue Problems

Lecture 12: Diagonalization

Math 3191 Applied Linear Algebra

Final Exam Practice Problems Answers Math 24 Winter 2012

Diagonalization of Matrix

Example Linear Algebra Competency Test

CS 246 Review of Linear Algebra 01/17/19

7. Symmetric Matrices and Quadratic Forms

Review of Linear Algebra

MATH 1120 (LINEAR ALGEBRA 1), FINAL EXAM FALL 2011 SOLUTIONS TO PRACTICE VERSION

and let s calculate the image of some vectors under the transformation T.

MATH 304 Linear Algebra Lecture 23: Diagonalization. Review for Test 2.

1. Linear systems of equations. Chapters 7-8: Linear Algebra. Solution(s) of a linear system of equations (continued)

v = 1(1 t) + 1(1 + t). We may consider these components as vectors in R n and R m : w 1. R n, w m

Notes on basis changes and matrix diagonalization

Announcements Wednesday, November 7

Ma/CS 6b Class 23: Eigenvalues in Regular Graphs

CALCULUS ON MANIFOLDS. 1. Riemannian manifolds Recall that for any smooth manifold M, dim M = n, the union T M =

Linear Geometry. Paul L. Bailey. Department of Mathematics, BASIS Scottsdale address: Date: February 26, 2019

Symmetric Matrices and Eigendecomposition

Math 315: Linear Algebra Solutions to Assignment 7

Midterm for Introduction to Numerical Analysis I, AMSC/CMSC 466, on 10/29/2015

1. General Vector Spaces

Math 21b Final Exam Thursday, May 15, 2003 Solutions

2. Every linear system with the same number of equations as unknowns has a unique solution.

Math 2B Spring 13 Final Exam Name Write all responses on separate paper. Show your work for credit.

Remarks on Definitions

Symmetric matrices and dot products

1 Linear Algebra Problems

Math 302 Outcome Statements Winter 2013

Ph.D. Katarína Bellová Page 1 Mathematics 2 (10-PHY-BIPMA2) EXAM - Solutions, 20 July 2017, 10:00 12:00 All answers to be justified.

Transcription:

A Relationship Between Minimum Bending Energy and Degree Elevation for Bézier Curves David Eberly, Geometric Tools, Redmond WA 9852 https://www.geometrictools.com/ This work is licensed under the Creative Commons Attribution 4. International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4./ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 9442, USA. Created: October 24, 21 Contents 1 Introduction 2 2 Degree Elevation 2 3 Minimizing Bending Energy 3 4 The General Problem 5 5 Computing Matrix M 7 1

1 Introduction A Bézier curve of degree d is of the form X(t) = d B i (t)p i = i= d c d,i (1 t) d i t i P i (1) where P i are control points and B i (t) are the Bernstein polynomials with c d,i = d!/[i!(d i)!] and t [, 1]. Let us assume that minimally P and P d are specified; that is, the endpoints of the curve are known quantities. The other control points may be selected as necessary, depending on the situation. The motivation for this document is that conditions are imposed whereby some, but not all, of the control points are determined. The unknown control points are selected to minimize the bending energy, E(P ) = i= X (t) 2 dt (2) where P represents the collection of d + 1 control points. The indices of the n known control points are {k,..., k n 1 } and the indices of the m unknown control points are {u,..., u m 1 } with the union of the two sets being {,..., d}; necessarily n + m = d + 1. This type of problem arose in a surface-fitting application, where samples of the form (x, y, f(x, y)) were specified, the (x, y) pairs were connected using a Delaunay triangulation, and a globally C 2 graph with local control had to be constructed using degree 9 Bézier triangle patches. Some of the control points of the patches were determined by the samples, but the remaining control points had to be chosen one way or another. The choice was made to minimize bending energy of the final graph. This document shows how the minimization of bending energy is related to degree elevation, but for curves. The extension to surface patches is discussed in a separate document. 2 Degree Elevation The Bézier curve of degree d is specified in Equation (1). The same curve may be represented as a Bézier curve of degree d + 1. The idea is that 1 = (1 t) + t for all t, so the degree d curve can be multiplied by 1 using this identity. For example, consider the linear curve Multiplying by (1 t) + t leads to X(t) = (1 t)p + tp 1 (3) X(t) = [(1 t) + t] [(1 t)p + tp 1 ] ( ) = (1 t) 2 P + 2(1 t)t P+P 1 2 + t 2 P 1 (4) = (1 t) 2 Q + 2(1 t)tq 1 + t 2 Q 2 where Q = P, Q 2 = P 1, and Q 1 = (Q + Q 2 )/2. Equation (4) is formally a quadratic Bézier curve, but it still represents the line segment defined by Equation (3). 2

Generally, the degree-elevated curve is where d+1 X(t) = c d+1,i (1 t) d+1 i t i Q i (5) Q i = for i d + 1 and with the convention that P 1 = and P d+1 =. i= i ( d + 1 P i 1 + 1 i ) P i (6) d + 1 3 Minimizing Bending Energy To illustrate, consider a quadratic Bézier curve X(t) = (1 t) 2 P + 2(1 t)tp 1 + t 2 P 2 where P and P 2 are known but P 1 must be chosen to minimize the bending energy. The first derivative of the curve is X (t) = 2(1 t)p + 2(1 2t)P 1 + 2tP 2 and the second derivative of the curve is The bending energy is The minimum is obtained when E = X (t) = 2 (P 2P 1 + P 2 ) X (t) 2 dt = 4 P 2P 1 + P 2 2 P 2P 1 + P 2 = in which case P 1 = P + P 2 2 Observe that this condition shows that the curve that minimizes the bending energy is a line segment, which is consistent with your intuition; see Equation (4). Now consider a cubic Bézier curve X(t) = (1 t) 3 P + 3(1 t) 2 tp 1 + 3(1 t)t 2 P 2 + t 3 where P and are known but P 1 and P 2 must be chosen to minimize the bending energy. The first derivative of the curve is and the second derivative of the curve is X (t) = 3(1 t) 2 P + 3(1 t)(1 3t)P 1 + 3t(2 3t)P 2 + 3t 2 X (t) = 6 ((1 t)p + (3t 2)P 1 + (1 3t)P 2 + t ) 3

Define P to be the 4 1 column vector whose ith row is formally P i ; then X (t) 2 = 1 t [ ] 3t 2 [ 36 P T P T 1 P T 2 P T 3 1 t 3t 2 1 3t t 1 3t t ] P P 1 P 2 = 36 P T (1 t) 2 (1 t)(3t 2) (1 t)(1 3t) (1 t)t (1 t)(3t 2) (3t 2) 2 (3t 2)(1 3t) (3t 2)t (1 t)(1 3t) (3t 2)(1 3t) (1 3t) 2 (1 3t)t (1 t)t (3t 2)t (1 3t)t t 2 P The bending energy is obtained by integrating the matrix terms, 2 3 1 E = X (t) 2 dt = 6 P T 3 6 3 3 6 3 1 3 2 P = 6 P T MP where the last equality defines the 4 4 symmetric matrix M. The matrix M has eigenvalues 1, 6, and (multiplicity 2). The eigenspace for eigenvalue 1 is 1-dimensional and is spanned by the unit-length eigenvector V = (1, 3, 3, 1)/ 2. The eigenspace for eigenvalue 6 is 1-dimensional and is spanned by the unit-length eigenvector V 1 = (1, 1, 1, 1)/2. The eigenspace for eigenvalue is 2-dimensional and is spanned by the unit-length and orthogonal eigenvectors V 2 = (1,, 1, 2)/ 6 and V 3 = (4, 3, 2, 1)/ 3. The set {V, V 1, V 2, V 3 } is right-handed and orthonormal, so the eigenvectors may be written as the columns of a rotation matrix [ ] R = V V 1 V 2 V 3 The symmetric matrix factors to M = RDR T, where D = Diagonal(1, 6,, ). Define Q Q 1 Q 2 = Q = R T P = R T P P 1 P 2 Q 3 so that the bending energy is E = 6 P T MP = 6 P T RDR T P = 6 Q T DQ = 6 Q 2 + 36 Q 1 2 4

The minimum of E occurs when Q = and Q 1 =. Some algebra will show that P 3P 1 + 3P 2 = P P 1 P 2 + = Notice that the coefficients of the control points in the first equation are the components of V and the coefficient of the control points in the second equation are the components of V 1. In a loose mathematical description, this says that the formal vector P is orthogonal to the eigenvectors of M corresponding to the eigenvalues 1 and 6, and in this sense P formally appears to be in the eigenspace for eigenvalue. The control points P 1 and P 2 are the unknowns, so solving the equations leads to P 1 = 2P +, P 2 = P + 2 3 3 A quick check will show you that for this choice of control points, the cubic Bézier curve is simply the degree-elevated linear Bézier curve. 4 The General Problem In the example of a cubic Bézier curve, we specified the control points P and and showed that in minimizing the bending energy, we had two linear equations in the two unknowns P 1 and P 2. As expected, the minimum bending energy occurs when the control points are collinear. Consider a modified problem where we specify P, P 1, and. The only unknown is P 2. This problem amounts to specifying the positions of the endpoints of the curve and the derivative at the first endpoint. When P 1 is not chosen to be on the line segment connecting the endpoints, the bending energy E cannot be zero (because you have to bend the curve away from a line segment). Setting some Q i = will not work here as it did when specifying only the endpoints. Instead, let s permute the rows of P so that the unknown control points occur first. The matrix M must be adjusted accordingly. Define the permutation matrix J so that P 2 1 P P ˆP = 1 P = 1 = JP P 1 1 P 2 1 Define ˆM = JMJ T. The bending energy is then E 6 = ˆP T ˆM ˆP = T ˆP A B B T C ˆP (7) where A is the 1 1 upper-left entry of ˆM, C is the 3 3 lower-right block of ˆM, and B is the 1 3 upper-right block of ˆM. Define U be the first row of ˆP (the unknown) and define K to be the last three 5

rows of ˆP (the knowns), so U is 1 1 and K is 3 1. Equation (7) becomes E 6 = U T AU + 2K T B T U + K T CK (8) The binding energy is nonnegative, which implies E as a function of U is a paraboloid and has a global minimum that occurs when its gradient is zero, AU + BK = (9) Solve the linear system for U. When A is invertible, it is clear what the solution is. If A is not invertible, there must be infinitely many solutions to the equation the graph of E must be a parabolic cylinder. In the current example, ˆM = 6 3 3 2 3 1 3 3 6 3 1 2 so Equation (9) is = 6P 2 + (P 3P 1 3 ) which has solution P 2 = (P 1 + )/2. Notice that X (1) = 3(P 1 )/2. The intuition is that the choice of P 2 should attempt to straighten out as much as possible the curve near t = 1. In this case, P 2 is on the line segment connecting P 1 and. This approach works even for the previous example with two knowns and two unknowns. The permutation matrix is 1 1 J = 1 1 which leads to ˆP = (P 1, P 2, P, ), U = (P 1, P 2 ), K = (P, P 1 ), and 6 3 3 3 6 3 ˆM = 3 2 1 3 1 2 Equation (9) is = 6 3 3 6 P 1 P 2 + 3 3 P Inverting the 2 2 matrix A leads to the solution P 1 = (2P + )/3 and P 2 = (P + 2 )/3. 6

5 Computing Matrix M The first derivative of the Bézier curve of Equation (1) is X (t) = and the second derivative is d [ c d,i (1 t) d i it i 1 (d i)(1 t) d 1 i t i] P i (1) i= X (t) = d i= c [ d,i (1 t) d i i(i 1)t i 2 2(d i)(1 t) d 1 i it i 1 + (d i)(d 1 i)(1 t) d 2 i t i] P i = d i= fi(t)pi where the last equality defines the functions f i (t). The entry m ij of the matrix M is m ij = f i (t)f j (t) dt The integrand consists of a summation involving 9 polynomial terms of the form t p (1 t) n for nonnegative integer powers p and n. We need to integrate these. The integrals are values of the Beta function, B(p + 1, n + 1) = t p (1 t) n dt = p! n! (p + n + 1)! whose formula is well known in statistics. The coefficients c d,i = d!/[(d i)!i!], so the integration appears to involve symbolic manipulation of a lot of factorials. However, you can set up a two-variable recursion, p (p 1)! n! B(p + 1, n + 1) = p + n + 1 ((p 1) + n + 1)! = p B(p, n + 1) p + n + 1 (11) and n p! (n 1)! B(p + 1, n + 1) = p + n + 1 (p + (n 1) + 1)! = n B(p + 1, n) p + n + 1 7