Geometric Modeling_ martin held.pdf

Embed Size (px)

Citation preview

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    1/302

    Geometric Modeling(SS 2015)

    Martin Held

    FB ComputerwissenschaftenUniversitt Salzburg

    A-5020 Salzburg, [email protected]

    June 12, 2015

    Computational Geometry and Applications Lab

    UNIVERSITAT SALZBURG

    mailto:[email protected]:[email protected]
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    2/302

    Personalia

    Instructor (VO+PS): M. Held.

    Email: [email protected].

    Base-URL: http://www.cosy.sbg.ac.at/held.

    Office: Universitt Salzburg, Computerwissenschaften, Rm. 1.20,Jakob-Haringer Str. 2, 5020 Salzburg-Itzling.

    Phone number (office): (0662) 8044-6304.

    Phone number (secr.): (0662) 8044-6328.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 2

    mailto:[email protected]://www.cosy.sbg.ac.at/~heldhttp://www.cosy.sbg.ac.at/~heldhttp://find/http://www.cosy.sbg.ac.at/~heldmailto:[email protected]
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    3/302

    Formalia

    URL of course (VO+PS): Base-URL/teaching/geom_mod/geom_mod.html.

    Lecture times (VO): Friday 9051100.

    Venue (VO): T02, Computerwissenschaften, Jakob-Haringer Str. 2.

    Lecture times (PS): Friday 800855.

    Venue (PS): T02, Computerwissenschaften, Jakob-Haringer Str. 2.

    Note PS is graded according to continuous-assessment mode!

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 3

    http://www.cosy.sbg.ac.at/~held/teaching/geom_mod/geom_mod.htmlhttp://www.cosy.sbg.ac.at/~held/teaching/geom_mod/geom_mod.htmlhttp://www.cosy.sbg.ac.at/~held/teaching/geom_mod/geom_mod.htmlhttp://find/http://goback/http://www.cosy.sbg.ac.at/~held/teaching/geom_mod/geom_mod.html
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    4/302

    Electronic Slides and Online Material

    In addition to these slides, you are encouraged to consult the WWW home-page ofthis lecture:

    http://www.cosy.sbg.ac.at/held/teaching/geom_mod/geom_mod.html.

    In particular, this WWW page contains links to online manuals, slides, and code.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 4

    http://www.cosy.sbg.ac.at/~held/teaching/geom_mod/geom_mod.htmlhttp://find/http://www.cosy.sbg.ac.at/~held/teaching/geom_mod/geom_mod.html
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    5/302

    A Few Words of Warning

    I hope that these slides will serve as a practice-minded introduction to various aspectsof geometric modeling. I would like to warn you explicitly not to regard these slides asthe sole source of information on the topics of my course. It may and will happen that

    Ill use the lecture for talking about subtle details that need not be covered in theseslides! In particular, the slides wont contain all sample calculations, proofs oftheorems, demonstrations of algorithms, or solutions to problems posed during mylecture. That is, by making these slides available to you I do not intend to encourageyou to attend the lecture on an irregular basis.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 5

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    6/302

    Acknowledgments

    These slides are a revised and extended version of slides originally prepared byDominik Kaaser, Kamran Safdar, and Marko ulejic.This revision and extension was carried out by myself, and I am responsible for all

    errors.

    Salzburg, February 2015 Martin Held

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 6

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    7/302

    Legal Fine Print and Disclaimer

    To the best of our knowledge, these slides do not violate or infringe upon somebodyelses copyrights. If copyrighted material appears in these slides then it wasconsidered to be available in a non-profit manner and as an educational tool for

    teaching at an academic institution, within the limits of the fair use policy. Forcopyrighted material we strive to give references to the copyright holders (if known).Of course, any trademarks mentioned in these slides are properties of their respectiveowners.

    Please note that these slides are copyrighted. The copyright holder(s) grant you the

    right to download and print it for your personal use. Any other use, including non-profitinstructional use and re-distribution in electronic or printed form of significant portionsof it, beyond the limits of fair use, requires the explicit permission of the copyrightholder(s). All rights reserved.

    These slides are made available without warrant of any kind, either express orimplied, including but not limited to the implied warranties of merchantability and

    fitness for a particular purpose. In no event shall the copyright holder(s) and/or theirrespective employers be liable for any special, indirect or consequential damages orany damages whatsoever resulting from loss of use, data or profits, arising out of or inconnection with the use of information provided in these slides.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 7

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    8/302

    Recommended Textbooks I

    N.M. Patrikalakis, T. Maekawa, W. Cho.Shape Interrogation for Computer Aided Design and Manufacturing.

    Springer, 2nd corr. edition, 2010; ISBN 978-3642040733.http://web.mit.edu/hyperbook/Patrikalakis-Maekawa-Cho/

    H. Prautzsch, W. Boehm, M. Paluszny.Bzier and B-spline Techniques.

    Springer, 2002; ISBN 978-3540437611.

    R.H. Bartels, J.C. Beatty, B.A. Barsky.An Introduction to Splines for Use in Computer Graphics and GeometricModeling.Morgan Kaufmann, 1995; ISBN 978-1558604001.

    M. Botsch, L. Kobbelt, M. Pauly, P. Alliez, B. Levy.Polygon Mesh Processing.

    A K Peters/CRC Press, 2010; ISBN 978-1568814261.http://www.pmp-book.org/

    G.E. Farin, J. Hoschek.Handbook of Computer Aided Geometric Design.

    North-Holland, 2002; ISBN 978-0444511041.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 8

    http://web.mit.edu/hyperbook/Patrikalakis-Maekawa-Cho/http://www.pmp-book.org/http://find/http://goback/http://www.pmp-book.org/http://web.mit.edu/hyperbook/Patrikalakis-Maekawa-Cho/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    9/302

    Recommended Textbooks II

    M.E. Mortenson.Mathematics for Computer Graphics Applications.

    Industrial Press, 2nd rev. edition, 1999; ISBN 978-0831131111.

    A. Dickenstein, I.Z. Emiris (eds.).Solving Polynomial Equations: Foundations, Algorithms, and Applications.

    Springer, 2005; ISBN 978-3-540-27357-8.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 9

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    10/302

    Table of Content

    Introduction

    Mathematics for Geometric Modeling

    Bzier Curves and Surfaces

    B-Spline Curves and Surfaces

    Approximation and Interpolation

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 10

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    11/302

    IntroductionMotivationNotation

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 11

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    12/302

    Motivation: Evaluation of a Polynomial

    Assume that we have an intuitive understanding of polynomials and consider apolynomial inxof degreenwith coefficientsa0, a1, . . . , an R, withan=0:

    p(x) :=

    ni=0

    aixi =a0+ a1x+a2x2 +. . .+an1xn1 +anxn.

    A straightforward polynomial evaluation ofpfor a given parameter x0 i.e., thecomputation ofp(x0) results in kmultiplications for a monomial of degreek,plus a total ofnadditions.

    Hence, we would get

    0+1+2+. . .+n= n(n+1)

    2

    multiplications (andnadditions). Can we do better? Yes, we can: Horners Algorithm consumes onlynmultiplications andnadditions

    to evaluate a polynomial of degreen!

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 13

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    13/302

    Motivation: Smoothness of a Curve

    What is a characteristic difference between the three curves shown below?

    Answer: The green curve has tangential discontinuities at the vertices, the bluecurve consists of straight-line segments and circular arcs and istangent-continuous, while the red curve is a cubic B-spline and iscurvature-continuous.

    By the way, when precisely is a geometric object a curve?

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 14

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    14/302

    Motivation: Tangent to a Curve

    What is a parameterization of the tangent line at a point(t0)of a curve?

    (t0)

    Answer: A parameterization of the tangent linethat passes through(t0)isgiven by

    () =(t0) +(t0) with R.

    How can we obtain(t)for: R Rd?

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 15

    M i i B i C

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    15/302

    Motivation: Bzier Curve

    How can we model a smooth polynomial curve in R2 by specifying so-calledcontrol points. (E.g., the pointsp0, p1, . . . , p10in the figure.)

    p0

    1

    p2p3

    p4

    p5

    p6

    p7

    p89

    p10

    One (widely used) option is to generate aBzier curve. (The figure shows aBzier curve of degree 10 with 11 control points.)

    What is the degree of a Bzier curve? Which geometric and mathematicalproperties do Bzier curves exhibit?

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 16

    M ti ti B S li C

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    16/302

    Motivation: B-Spline Curve

    How can we model a polynomial curve in R2 by specifying so-called controlpoints such that a modification of one control point affects only a small portionof the curve?

    Answer: Use B-spline curves. Which geometric and mathematical properties do B-spline curves exhibit?

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 17

    M ti ti NURBS

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    17/302

    Motivation: NURBS

    Is it possible to parameterize a circular arc by means of a polynomial or rationalterm?

    Yes, this is possible:1 t21+t2

    , 2t1+t2

    More generally, NURBS can be used to model all types of conics by means ofrational parameterizations.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 18

    Motivation: Approximation of a Continuous Function

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    18/302

    Motivation: Approximation of a Continuous Function

    How can we approximate a continuous function by a polynomial? Answer: We can use a Bernstein approximation. SampleBernstein approximationsof acontinuous function:

    f: [0, 1] R f(x) :=sin (x) + 15

    sin

    6x+x2

    0.2 0.4 0.6 0.8 1.0

    0.2

    0.4

    0.6

    0.8

    1.0

    0.2 0.4 0.6 0.8 1.0

    0.2

    0.4

    0.6

    0.8

    1.0

    One can prove that the Bernstein approximation Bn,fconverges uniformly tofonthe interval[0, 1]as nincreases, for every continuous functionf.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 19

    Approximation of Polygonal Profiles

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    19/302

    Approximation of Polygonal Profiles

    How can we solve the following approximation problem? For a set of planar(polygonal) profiles, and anapproximation thresholdgiven,

    compute asmooth approximationsuch that the input topology is maintained.

    Approximations can be obtained by biarc or B-spline curves, based on tolerancezones generated by means of Voronoi diagrams.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 20

    Notation

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    20/302

    Notation

    The set {1, 2, 3, . . .} of natural numbers is denoted by N, with N0 := N {0},while Z denotes the integers (positive and negative) and R the reals. Thenon-negative reals are denoted by R+0, and the positive reals by R

    +.

    Open or closed intervalsI R are denoted using square brackets: e.g.,I1 = [a1, b1]or I2 = [a2, b2[, where the right-hand [ indicates that the value b2isnot included inI2.

    We use, , and letters in italics to denote scalar values: s, t, u. Points are also denoted by letters written in italics: p, qor, occasionally,P, Q. We

    do not distinguish between a point and its position vector. The coordinates of a vector are denoted by using indices (or numbers): e.g.,

    v= (vx, vy), or v= (v1, v2, . . . , vn). The dot product of two vectors vandwis denoted by v, w. The vector cross-product (in R3) is denoted by a cross:v w. The length of a vector vis denoted by v. The straight-line segment between the points pand qis denoted bypq. Bold capital letters, such as M, are used for matrices. It goes without saying that we may find it convenient to deviate from these rules

    here and there. . .

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 22

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    21/302

    Mathematics for Geometric ModelingPolynomials

    Definition and BasicsEvaluation of a Polynomial

    Elementary Differential CalculusDifferentiation of Functions of One VariableDifferentiation of Functions of Several Variables

    Elementary Differential Geometry of CurvesDefinition and BasicsDifferentiable Curves

    Equivalence and Reparameterization of CurvesArc LengthTangent and NormalCurvature and TorsionContinuity of a Curve

    Elementary Differential Geometry of Surfaces

    Definition and BasicsCurves on SurfacesTangent Plane and Normal Vector

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 23

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    22/302

    Polynomials

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    23/302

    Polynomials

    A (univariate) polynomial over R with variablexis a term of the form

    anxn +an1x

    n1 + +a1x+a0,

    with coefficientsa0, . . . , an R. Univariate polynomials are usually written according to a decreasing order of

    exponents of their monomials. In that case, the first term is the leading termthatindicates the degree of the polynomial; its coefficient is the leading coefficient.

    It is a convention to drop all monomials whose coefficients are zero.

    We define addition and multiplication of polynomials as follows: ni=0

    aixi

    +

    ni=0

    bixi

    :=

    ni=0

    (ai+bi)xi

    ni=0

    aix

    i m

    j=0bjx

    j :=n

    i=0

    mj=0

    (aibj)xi+j

    Elementary properties of polynomials: One can prove easily that the addition,multiplication and composition of two polynomials as well as their derivative andantiderivative (indefinite integral) again yield a polynomial.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 26

    Polynomials

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    24/302

    Polynomials

    Instead of R any commutative ring(R, +, )and symbolsx1, x2, . . .that are notcontained inRwould do.

    Lemma 4

    The set of all polynomials with coefficients in the commutative ring (R, +, )andvariable xRforms a commutative ring, thering of polynomials over R, commonlydenoted byR[x].

    Multivariate polynomials can also be seen as univariate polynomials with

    coefficients out of a ring of polynomials. E.g.,a2,3x

    2y3 +a1,1xy+a1,0x+a0,0 = (a2,3x2)y3 + (a1,1x)y+ (a1,0x+a0,0).

    Definition 5

    Two polynomials are equal if and only if the sequences of their coefficients

    (arranged in some specific order) are equal.

    For Laurent polynomials the exponents of monomials may be negative. (Wewont deal with Laurent polynomials, though.)

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 27

    Polynomials

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    25/302

    Polynomials

    Definition 6(Polynomial function; Dt.: Polynomfunktion)

    A (univariate real) function f: R R in one argumentx is a polynomial functionifthere existn

    N0and a0, a1, . . . , an

    R such that

    f(x) =anxn +an1x

    n1 + +a1x+a0 for allx R.

    As usual, two (polynomial) functions are identical if their values are identical forall arguments in R.

    Note: Two different polynomials may result in the same polynomial function!(E.g., over finite fields.)

    While some fields of mathematics (e.g., abstract algebra) make a clear distinctionbetween polynomials and polynomial functions, we will freely mix these twoterms. Also, unless noted explicitly, we will only deal with polynomials over R.

    Note: Polynomial functions may come in disguise: f(x) :=cos(2arccos(x))is apolynomial function, since we have f(x) =2x2 1 for all 1x1.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 28

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    26/302

    Polynomials

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    27/302

    y

    Polynomials of degree0. are called constant polynomials,1. are called linear polynomials,

    2. are called quadratic polynomials,3. are called cubic polynomials,4. are called quartic polynomials,5. are called quintic polynomials.

    Abel-Ruffini Theorem [1823]: No algebraic closed-form solution for the roots ofan arbitrary polynomial of degree five or higher exists. (A closed-form solution is

    any formula that can be evaluated in a finite number of standard operations.) Jacobi theta functions can be used for solving general quintic equations, and

    highly unwieldly solutions based on hypergeometric functions are known forpolynomials of higher degree.

    Lemma 10

    The univariate polynomials of R[x]form an infinitevector spaceover R. Theso-called power basis of this vector space is given by the monomials 1, x, x2, x3, . . ..

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 30

    Horners Algorithm for Evaluation of a Polynomial

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    28/302

    g y

    Consider a polynomial of degreenwith coefficientsa0, a1, . . . , an R, withan=0:

    p(x) :=

    ni=0

    aixi

    =a0+ a1x+a2x2

    +. . .+an1xn1

    +anxn

    .

    A straightforward polynomial evaluation ofpfor a given parameter x0results inkmultiplications for a monomial of degreek, plus a total of nadditions.

    Hence, we would get

    0+1+2+. . .+n= n(n+1)

    2

    multiplications (andnadditions). Can we do better?

    Obviously, we can reduce the number of multiplications to O(nlog n)by resortingto exponentiation by squaring:

    xn =

    x(x2)

    n12 ifnis odd,

    (x2)n2 ifnis even.

    Can we do even better?

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 31

    Horners Algorithm for Evaluation of a Polynomial

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    29/302

    Horners Algorithm: The idea is to rewrite the polynomial such that

    p(x) =a0+ x

    a1+ x

    a2+. . .+x(an1+ x an) . . .

    and compute the result h0 =p(x0)as follows:

    hn :=an

    hi :=x hi+1+ ai fori=0, 1, 2, ..., n 1

    Lemma 11

    Horners Algorithm consumesnmultiplications andnadditions to evaluate apolynomial of degreen.

    CaveatSubtractive cancellation could occur at any time, and there is no easy way todetermine a priori whether and for which data it will indeed occur.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 32

    Horners Algorithm for Evaluation of a Polynomial

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    30/302

    1 /** Evaluates a polynomial of degree n at point x2 * @param p: array of n+1 coefficients3 * @param n: the degree of the polynomial4 * @param x: the point of evaluation5 * @return the evaluation result

    6 */7 double evaluate(double *p, int n, double x)8 {9 double h = p[n];

    11 for (int i = n - 1 ; i > = 0 ; - - i )12 h = x * h + p[i];

    14 return h;

    15 }

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 33

    Forward Differencing

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    31/302

    If a polynomial has to be evaluated at k+1 evenly spaced pointsx0, x1, . . . , xk,withxi+1 =xi+for 0i

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    32/302

    For a quadratic polynomial p(x) =a0+ a1x+a2x2 the difference of the functionvalues of neighboring points is

    1(xi) :=p(xi+1)

    p(xi) =p(xi+)

    p(xi)

    =a0+ a1(xi+) +a2(xi+)2 (a0+ a1xi+a2x2i)

    =a1+a22 +2a2xi

    As1(x)is itself a linear polynomial, it can also be evaluated using forward

    differencing:

    2(x) = 1(x+) 1(x) =2a22

    This approach can be extended to polynomials of any degree. One can conclude that for a polynomial of degreeneach successive evaluation

    requiresnadditions.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 35

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    33/302

    Differentiation of Functions of One Variable

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    34/302

    Definition 14(Ck, Dt.:k-mal stetig differenzierbar)

    LetS R be an open set. A functionf: S R that hasksuccessive derivatives iscalledk times differentiable. If, in addition, thek-th derivative is continuous, then

    the function is said to be ofdifferentiability class Ck.

    Definition 15(Smooth, Dt.: glatt)

    LetS R be an open set. A functionf: S R is calledsmoothif it has infinitelymany derivatives, denoted by the classC.

    We haveC Ci Cj, for alli,j N0if i>j. Notation:

    f(0)(x) :=f(x)for convenience purposes. f(x)= f(1)(x) = d

    dxf(x) = df

    dx(x).

    f(x)= f(2)(x) = d2dx2

    f(x) = d2 fdx2

    (x). f(x)= f(3)(x) = d

    3

    dx3f(x) = d

    3 f

    dx3(x).

    f(n)(x)= dn

    dxnf(x) = d

    nfdxn

    (x).

    If thek-th derivative offexists then the continuity of f(0), f(1), . . . , f(k1) is implied.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 38

    Differentiation of Functions of One Variable

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    35/302

    Theorem 16(Chain rule, Dt.: Kettenregel)

    Suppose thatf: S R is differentiable atx0andg: f(S) R is differentiable atf(x0). Then the composite functionh:=g

    f, defined ash(x) :=g(f(x)), is

    differentiable atx0, and we have

    h(x0) =g(f(x0)) f(x0).

    Theorem 17(Rolles Theorem)

    Iff: [a, b] R is continuous on the closed interval[a, b]and differentiable on theopen interval]a, b[, and iff(a) =f(b)then there existsc]a, b[such thatf(c) =0.

    Theorem 18(Mean Value Theorem)

    Iff: [a, b]

    R is continuous on the closed interval[a, b]and differentiable on theopen interval]a, b[, then there existsc]a, b[such that

    f(c) =

    f(b) f(a)b a .

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 39

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    36/302

    Differentiation of Functions of Several Variables

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    37/302

    Definition 20(Partial derivative, Dt.: partielle Ableitung)

    Thepartial derivativeof a (vector-valued) functionf: S Rn, withS Rm beingan open set, at point(a1, a2, . . . , am)

    Swith respect to the i-th coordinatexi is

    defined asf

    xi(a1, a2, . . . , am) := lim

    h0

    f(a1, a2, . . . , ai+h, . . . , an) f(a1, a2, . . . , ai, . . . , an)h

    ,

    if this limit exists.

    Hence, for a partial derivative with respect to xiwe simply differentiate fwithrespect toxiaccording to the rules for ordinary differentiation, while regarding allother variables as constants.

    That is, for the purpose of the partial derivative with respect to xiwe regardfasunivariate function inxiand apply standard differentiation rules.

    Some authors prefer to writefxinstead of fx. We will mix notations as we find it convenient.

    NoteA function ofmvariables may have all first-order partial derivatives at a point(a1, . . . , am)but still need not be continuous at (a1, . . . , am).

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 41

    Differentiation of Functions of Several Variables

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    38/302

    Higher-order partial derivatives offare obtained by repeated computation of apartial derivative of a (higher-order) partial derivative of f.

    Does it matter in which sequence we compute higher-order partial derivatives?

    Theorem 21Suppose that f

    x, fy

    , 2 f

    yxexist on a neighborhood of (x0, y0), and that

    2 fyx

    is

    continuous at(x0, y0). Then 2 f

    xy(x0, y0)exists, and we have

    2f

    xy(x0, y0) =

    2f

    yx(x0, y0).

    Note the difference between the Leibniz notation and the subscript notation forhigher-order mixed partial derivatives!

    2f

    xy(x, y) :=

    x(

    f

    y)(x, y) but fxy(x, y) := (fx)y(x, y) Also, note that Theorem21does not imply that it could not be simpler to

    compute, say, 2f

    yxrather than

    2fxy

    :

    f(x, y) :=xe2y + ey sin(ytan(log y)) + 1+y2 cos2 y

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 42

    Differentiation of Functions of Several Variables

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    39/302

    Definition 22(Differentiable, Dt.: total differenzierbar)

    A functionf: S Rn ofmvariables isdifferentiableat a pointa:= (a1, . . . , am)

    Sif there exists an n

    mmatrixJsuch that

    limxa

    f(x) f(a) J(x a)x a =0.

    Theorem 23

    If a functionf: S Rn ofmvariables is differentiable at a point aSthen thecoefficientsaijof the matrixJof Def.22are given by

    aij= fixj

    (a) fori {1, 2, . . . , n} andj {1, 2, . . . , m}.

    The matrixJis calledJacobi matrixoffata.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 43

    Differentiation of Functions of Several Variables

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    40/302

    Theorem 24

    If a functionf: S Rn ofmvariables is differentiable at a point aSthen it iscontinuous ata.

    Theorem 25

    If fx1

    , fx2

    , . . . , fxm

    exist for a functionf: S Rn ofmvariables on a neighborhoodof a pointaSand are continuous atathenfis differentiable ata.

    Definition 26(Continuously differentiable, Dt.; stetig differenzierbar)

    We say that a function f: S Rn ofmvariables iscontinuously differentiableon anopen subsetSof Rm if f

    x1, fx2

    , . . . , fxm

    exist and are continuous on S.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 44

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    41/302

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    42/302

    Curves in Rn

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    43/302

    Definition 27(Curve, Dt.: Kurve)

    LetI R be an interval of the real line. A continuous (vector-valued) mapping: I

    R

    n is called aparameterizationof (I), and(I)is called the (parametric)curveparameterized by.

    Well-known examples of parameterized curves include a straight-line segment, acircular arc, and a helix.

    E.g.,: [0, 1] R3 with

    (t) :=

    px+t (qx px)py+t (qy py)

    pz+t (qz pz)

    maps[0, 1]to a straight-line segment from pointpto q.

    Sometimes the intervalIis called thedomainof , and(I)is calledimage. In order to statep Rn in vector form we will mix column and row vectors freely

    unless a specific form is required, such as for matrix multiplication. Similarly, we will denote the individual coordinates of pby eitherpx, py, pzfor up

    to three dimensions, or by p1, p2, . . . , pnfor higher dimensions.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 48

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    44/302

    Curves in Rn

    Frequently properties of curves can also be stated independently of a specific

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    45/302

    Frequently properties of curves can also be stated independently of a specificparameterization. E.g., we can regard a curve Cto be simple if there exists oneparameterization of Cthat is simple.

    Similarly, we will frequently speak about a closed curve rather than about aclosed parameterization of a curve. Hence, the distinction between a curve and (one of) its parameterizations is often

    blurred. For the sake of simplicity, we will not distinguish between a curve Cand one of its

    parameterizationsif the meaning is clear. Similarly, we will frequently calla curve.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 50

    Differentiable Curves

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    46/302

    Definition 31(Cr-parameterization)

    If: I Rn isrtimes continuously differentiable thenis called a parametric curveof classCr, or aCr-parameterizationof (I), or simply a Cr-curve.

    IfI= [a, b], thenis called aclosed Cr-parameterizationif (k)(a) =(k)(b)for all0k r.

    One-sided differentiability is meant at the endpoints of IifIis a closed interval.

    Definition 32(Regular, Dt.: regulr)

    ACr-curve: I Rn is calledregular of order kif for alltIthe vectors{(t), (t), . . . , (k)(t)} are linearly independent, for some 0< k r.In particular,is calledregular if(t)=0 for alltI.

    Definition 33(Singular, Dt.: singulr)

    For aC1-curve: I Rn andt0I, the point(t0)is called asingular pointofif(t0) =0.

    Note: Regularity and singularity depend on the parameterization!

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 51

    Differentiable Curves

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    47/302

    Definition 34(Smooth curve, Dt.: glatte Kurve)

    If: I Rn has derivatives of all orders then is (the parameterization of) asmooth curve(or of classC).

    Definition 35(Piecewise smooth curve, Dt.: stckweise glatte Kurve)

    IfIis the union of a finite number of sub-intervals over each of which : I Rn issmooth thenis piecewise smooth.

    Note: Smoothness depends on the parameterization! There do exist curves which are continuous everywhere but differentiable

    nowhere.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 52

    Equivalence of Parameterizations in Rn

    Note that parameterizations of a curve (regarded as a set C Rn) need not be

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    48/302

    Note that parameterizations of a curve (regarded as a set C R ) need not beunique: Two different parameterizations : I Rn and: J Rn may existsuch that C =(I) =(J).

    (t):=

    cos2 tsin2 t

    x

    y

    Figure : (t)fort[0, 0.9]

    (t):=

    cos2 t sin2 t

    x

    y

    Figure : (t)fort [0, 0.9]

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 53

    Equivalence of Parameterizations in Rn

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    49/302

    Definition 36(Reparameterization, Dt.: Umparameterisierung)

    Let: I Rn and: J Rn both beCr-curves, for somer N0. We considerandasequivalentif a function : I

    Jexists, such that

    ((t)) =(t) tI,and

    1. is continuous, strictly monotonously increasing and bijective,

    2. bothand1 arertimes continuously differentiable.

    In this case the parametric curveis called areparameterizationof .

    I J

    (I) =(J)

    t

    CaveatThere is no universally accepted definitionof a reparameterization! Some authorsdrop the monotonicity or thedifferentiability of, while others evenrequireto be smooth.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 54

    Equivalence of Parameterizations in Rn

    Th 37

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    50/302

    Theorem 37

    Let: J Rn be a reparameterization of: I Rn. Ifis regular thenisregular.

    Proof : Letbe regular. Hence,is at least a C1-curve such that(t)=0 for alltI. Let : IJbe the mapping fromItoJthat establishes the equivalence of and. Hence,and1 are continuous, strictly monotonously increasing, bijectiveand at least once continuously differentiable.Since(1(u)) =ufor allu

    J, the chain rule implies

    (1(u)) ddu

    1(u) =1, i.e., d

    du1(u)=0 for alluJ.

    Since(u) =(1(u)), we know that(u)is continuously differentiable, and onceagain by applying the chain rule we get

    (u) =(1(u)) =0

    ddu

    1(u) =0

    =0 for alluJ.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 55

    Arc Length

    D fi iti 38 (D iti Dt U t t il )

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    51/302

    Definition 38(Decomposition, Dt.: Unterteilung)

    Consider: I Rn, withI := [a, b]. Adecomposition,P, of the closed interval Iisa sequence ofm+1 numberst0, t1, t2, . . . , tm, for somem

    N, such that

    a= t0

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    52/302

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    53/302

    Arc Length: Non-Rectifiable Curve

    Curves exist that are non-rectifiable, i.e., for which there is no upper bound on the

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    54/302

    length of their polygonal approximations. Example of a non-rectifiable curve: The graph of the function defined by f(0) :=0

    andf(x) :=xsin 1x for 0

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    55/302

    Arc Length: Non-Rectifiable Curve

    Example of a non-rectifiable closed curve: TheKoch snowflake[Koch 1904].

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    56/302

    Koch snowflake, iteration 2

    The length of the curve after the n-th iteration is(4/3)n of the original triangleperimeter. (Its fractal dimension is log 4/log31.261.)

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 59

    Arc Length

    Lemma 42

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    57/302

    Lemma 42

    If: I Rn is a C1-curve then(I)is rectifiable.

    Proof : Lett0, t1, t2, . . . , tmbe a decompositionPofI := [a, b]. Sincek(t)exists andis continuous on all of[a, b], we know that there existsMkwhich serves as an upperbound for |k| on[a, b], for all 1k n. Hence,

    LP() =m1

    j=0 (tj+1) (tj) m1

    j=0n

    k=1 |k(tj+1) k(tj)|()=

    m1j=0

    nk=1

    |k(xkj)|(tj+1 tj) for suitable xkj

    m1

    j=0n

    k=1 Mk(tj+1 tj) =n

    k=1 Mkm1

    j=0 (tj+1 tj)= (b a)

    nk=1

    Mk.

    where equality at()holds due to Mean Value Theorem18.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 60

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    58/302

    Arc Length

    Theorem 45

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    59/302

    Let: I Rn be a C1 curve, withI := [a, b]. Then the arc length of (I)is given by

    ba

    (u) du.Corollary 46

    Let: I

    Rn be a C1 curve, and[a, b]

    I. Then the arc length of ([a, b])is

    given by ba

    (u) du.

    Definition 47(Arc length function, Dt.: Bogenlngenfunktion)Let: [a, b] Rn be a C1-curve. We define thearc-length function s: [a, b] Ras follows:

    s(t) := t

    a (u) du.c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 62

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    60/302

    Tangent Vector

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    61/302

    (t0) (t1)

    If(t0)is a fixed point on the curve , and(t1), witht1 >t0, is another point,

    then the vector from(t0)to(t1)approaches thetangent vector toat (t0)asthe distance betweent1andt0is decreased.

    The infinite line through(t0)that is parallel to this vector is known as the tangentlineto the curveat point(t0).

    If we disregard the orientation of the tangent vector then we would like to obtain

    the same result for the tangent line by considering a point (t1)witht1

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    62/302

    Frenet Frame for Curves in R3

    Definition 52(Frenet frame, Dt.: begleitendes Dreibein)

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    63/302

    Let: I R3 be a C2 curve that is regular of order two. Then theFrenet frame(akamoving trihedron) at (t)is defined as an orthonormal basis of vectors

    T(t), N(t), B(t)as follows:

    T(t) := (t)

    (t) unit tangent;

    N(t) := T(t)

    T(t) unit (principal) normal;

    B(t) :=T(t) N(t) unit binormal.

    Lemma 53

    Let: I R3 be a C2 curve that is regular of order two, and defineT, N, Bas in

    Def.52.We get for alltI: N(t)is normal toT(t), and B(t)is a unit vector.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 66

    Osculating Plane for a Curve in R3

    Let(t0)be a fixed point on, and two other points(t1)and(t2)that movealong

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    64/302

    along. Obviously, (t0),(t1)and(t2)define a plane.

    As both(t1)and(t2)approach(t0), the plane determined by themapproaches a limiting position. This limiting plane is known as the osculating planeto the curveat point(t0).

    Definition 54(Osculating plane, Dt.: Schmiegeebene)

    Let: I

    R

    3 be a C2 curve that is regular of order two. Theosculating planeat the

    point(t)is the plane spanned by T(t)and N(t), as defined in Def.52.

    Of course, the osculating plane contains the tangent line toat (t0). Thus, the osculating plane at the point(t0)contains both(t0)and(t0). The binormal is the normal vector of the osculating plane.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 67

    Curvature and Torsion of Curves in R3

    The curvature at a given point of a curve is a measure of how quickly the curvechanges direction at that point relative to the speed of the curve.

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    65/302

    changes direction at that point relative to the speed of the curve.

    Definition 55(Curvature, Dt.: Krmmung)

    Let: I R3 be a C2 curve that is regular. The curvature(t)ofat the point (t)is defined as

    (t) :=(t) (t)

    (t)3 .

    Definition 56(Radius of curvature, Dt.: Krmmungsradius)

    Let: I R3 be a C2 curve that is regular. If(t)>0 then theradius of curvature(t)at the point(t)is defined as

    (t) :=

    1(t) .

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 68

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    66/302

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    67/302

    Curvature and Torsion of Curves in R3

    Definition 58(Point of inflection, Dt.: Wendepunkt)

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    68/302

    Let: I R3 be a C2-curve that is regular. If for all tIthe second derivativedoes not vanish, i.e., if(t)=0, then a point(t)for which(t) =0 holds is calledapoint of inflectionof .

    Lemma 59

    Let: I R3 be a C2-curve that is regular such that for all tIthe secondderivative does not vanish. Then(t)is a point of inflection ofif and only if

    (t)and

    (t)are collinear.

    Hence, at a point of inflection the radius of curvature is infinite, the circle ofcurvature degenerates to the tangent, and neither the torsion nor the osculatingplane are defined.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 71

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    69/302

    Curvature and Torsion of Curves in R2

    Lemma 612 2

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    70/302

    Let: I R2 be a C2-curve that is regular, with(t) = (x(t), y(t)). Then(t)of at the point(t)is given as

    (t) =|x(t)y(t) x(t)y(t)|

    ((x(t))2 + (y(t))2)3/2 .

    Sketch of Proof :Recall that, in general,

    (t) =(t) (t)(t)3 .

    Corollary 62

    Let: IR

    2

    be a C2

    -curve that is regular, with(t) = (t, y(t)). Then(t)ofatthe point(t)is given as

    (t) = |y(t)|

    ((1+ (y(t))2)3/2.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 73

    Fundamental Theorem of Curves

    Theorem 63

    L t [0 ] R b t ti f ti Th th i t

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    71/302

    Let, : [0, c] R be two continuous functions. Then there exists a curve: [0, c] R3 parameterized by arc lengthssuch that(s)and(s)describe thecurvature and torsion ofat (s). Furthermore, this curve is unique up to rigidmotions.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 74

    Parametric Continuity of a Curve

    Consider two curves: [a, b] Rn and: [c, d] Rn. Suppose that(b) =(c) =:p.

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    72/302

    pp ( ) ( ) p We are interested in checking how smoothlyandjoint at the pointp.

    p

    Definition 64(Ck-continuous, Dt.:Ck stetig)

    Let: [a, b] Rn and: [c, d] Rn beCk-curves. If

    (i)(b) =(i)(c) for alli {0, . . . , k}thenandare Ck-continuousat pointp:=(b).

    Of course, one-sided derivatives are to be considered in Def.64.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 75

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    73/302

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    74/302

    Geometric Continuity

    G0-continuity equalsC0-continuity: The curvesandshare a commonjoint p.

    Definition 66(G1-continuous, Dt.:G1 stetig)

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    75/302

    e t o 66 (G co t uous, t G stet g)

    Let: [a, b] Rn and: [c, d] Rn beC1-curves, with(b) =(c) =:p. If0=(b) = (c) for some R+

    thenandare G1-continuousat p.

    G1-continuity means thatand share the tangent line atp.

    Higher-order geometric continuities are a bit tricky to define formally fork2. G2-continuity means thatand share the tangent line and also the same

    center of curvature atp. In general,Gk-continuity exists atpif and can be reparameterized such that

    they join withCk-continuity atp.

    Ck-continuity impliesGk-continuity. Note: Reflections on a surface (e.g., a car body) will not appear smooth unless

    G2-continuity is achieved.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 78

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    76/302

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    77/302

    Sample Parametric Surface: Frustum of a Paraboloid

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    78/302

    : [0, 1] [0, 2] R3

    (u, v) := ucos v

    usin v2u2

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 82

    Sample Parametric Surface: Torus

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    79/302

    : [0, 2]2

    R3

    (u, v) :=

    (2+cos v) cos u(2+cos v) sin u

    sin v

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 83

    Basic Definitions for Parametric Surfaces

    Definition 68(Regular parameterization, Dt.: regulre (od. zulssige) Param.)

    Let R2 A continuous mapping : R3 in the variables u and v is called a

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    80/302

    Let R . A continuous mapping : R in the variablesuand vis called aregular parameterizationof ()if

    1. is differentiable on,2.

    u(u0, v0)and v(u0, v0)are linearly independent for all (u0, v0)in.

    Note that u

    (u0, v0)and v(u0, v0)are linearly independent if and only if

    u

    (u0, v0) v

    (u0, v0)=0.

    Definition 69(Singular point, Dt.: singulrer Punkt)

    Let R2. A point(u0, v0)is asingular pointof a differentiableparameterization : R3 if u(u0, v0)and v(u0, v0)are linearly dependent.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 84

    Curves on Surfaces Consider a planar parametric curve with coordinates (u(t), v(t)), fortI R, in

    the parametric domainof a parametric surface : R3. Then : I R3 with (t) : u(t) v (t) is a parametric curve on the surface

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    81/302

    Then: I R3 with(t) :=

    u(t), v(t)

    is a parametric curve on the surface

    (). Differentiating(t)with respect to tyields the tangent vector of the curve on the

    surface:

    (t) =

    u(u(t), v(t)) u(t) +

    v(u(t), v(t)) v(t)

    Hence, the tangent vector at(t)is a linear combination of

    u(u(t), v(t)) and

    v(u(t), v(t)).

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 85

    Curves on Surfaces Suppose that = [umin, umax] [vmin, vmax] If we fixv :=v0[vmin, vmax]and letuvary, then(u, v0)depends on one

    parameter; it is called an isoparametric curve or more specifically the

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    82/302

    parameter; it is called anisoparametric curveor, more specifically, theu-parameter curve.

    Likewise, we can fixu:=u0[umin, umax]and letvvary to obtain thev-parameter curve(u0, v).

    Tangent vectors for theu-parameter andv-parameter curves are computed bypartial derivatives ofwith respect touand v, respectively:

    u(u, v) forv=v0

    v(u, v) foru=u0

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 86

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    83/302

    Tangent Plane and Normal Vector Recall that the tangent vector at a point(t)of a parametric curve on a surface

    ()is given by partial derivatives of. This motivates the following definition.

    Definition 70 (Tangent plane Dt : Tangentialebene)

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    84/302

    Definition 70(Tangent plane, Dt.: Tangentialebene)

    Consider a regular parameterization : R

    3

    of a surface S. For(u, v), thetangent plane(u, v)of Sat(u, v)is the plane through(u, v)that is spanned bythe vectors

    u(u, v) and

    v(u, v).

    Definition 71(Normal vector, Dt.: Normalvektor)

    Consider a regular parameterization : R3 of a surface S. For(u, v), thenormal vector N(u, v)of Sat(u, v)is given by

    N(u, v) :=

    u(u, v)

    v(u, v).

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 88

    Bzier Curves and SurfacesBernstein Basis Polynomials

    Definition and PropertiesBasis Conversions

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    85/302

    Basis ConversionsBzier Curves

    Definition and PropertiesDe Casteljaus AlgorithmBernstein Polynomials and Polar FormsDerivatives of a Bzier CurveSubdivision and Degree Elevation

    Bzier Surfaces

    Definition and PropertiesIsoparametrics on Bzier SurfacesBzier Surface as Tensor-Product Surface

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 89

    Bernstein Basis Polynomials

    Definition 72(Bernstein basis polynomials)

    Then+1Bernstein basis polynomialsof degreen, forn N0, are defined as

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    86/302

    Bk,n(x) := nkxk (1 x)nk fork {0, 1, . . . , n}. For convenience purposes, we defineBk,n(x) :=0 forkn. We use the convention 00 :=1. B0,0(x) =1. B0,1(x) =1 xandB1,1(x) =x. B0,2(x) = (1 x)2 andB1,2(x) =2x(1 x)and B2,2(x) =x2.

    Introduced by Sergei N. Bernstein in 1911 for a constructive proof of WeierstrassApproximation Theorem176.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 91

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    87/302

    Bernstein Basis Polynomials All Bernstein basis polynomials of degreen=1 over the interval[0, 1]:

    1 x x

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    88/302

    0.2 0.4 0.6 0.8 1.0

    0.2

    0.4

    0.6

    0.8

    1.0

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 92

    Bernstein Basis Polynomials All Bernstein basis polynomials of degreen=2 over the interval[0, 1]:

    (1 x)2 2x(1 x) x2

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    89/302

    0.2 0.4 0.6 0.8 1.0

    0.2

    0.4

    0.6

    0.8

    1.0

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 92

    Bernstein Basis Polynomials All Bernstein basis polynomials of degreen=3 over the interval[0, 1]:

    (1 x)3 3x(1 x)2 3x2(1 x) x3

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    90/302

    0.2 0.4 0.6 0.8 1.0

    0.2

    0.4

    0.6

    0.8

    1.0

    c M Held (Univ Salzburg) Geometric Modeling (SS 2015) 92

    Bernstein Basis Polynomials All Bernstein basis polynomials of degreen=4 over the interval[0, 1]:

    (1 x)4 4x(1 x)3 6x2(1 x)2 4x3(1 x) x4

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    91/302

    0.2 0.4 0.6 0.8 1.0

    0.2

    0.4

    0.6

    0.8

    1.0

    c M Held (Univ Salzburg) Geometric Modeling (SS 2015) 92

    Bernstein Basis Polynomials All Bernstein basis polynomials of degreen=5 over the interval[0, 1]:

    (1 x)5 5x(1 x)4 10x2(1 x)3 10x3(1 x)2 5x4(1 x) x5

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    92/302

    0.2 0.4 0.6 0.8 1.0

    0.2

    0.4

    0.6

    0.8

    1.0

    c M Held (Univ Salzburg) Geometric Modeling (SS 2015) 92

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    93/302

    Additional Properties of Bernstein Basis Polynomials

    Lemma 74

    For alln N andk N0withk n, the Bernstein basis polynomialBk,n1can bewritten as linear combination of Bernstein basis polynomials of degree n:

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    94/302

    written as linear combination of Bernstein basis polynomials of degree n:

    Bk,n1(x) = n kn

    Bk,n(x) + k+1n

    Bk+1,n(x).

    Lemma 75

    For alln, k

    N0withk

    n, the Bernstein basis polynomial Bk,nis non-negativeover the unit interval:

    Bk,n(x)0 for allx[0, 1].

    Proof :Recall the definition of the Bernstein basis polynomials:

    Bk,n(x) def=

    n

    k

    (x)0

    k(1 x) 0

    nk 0 for allx[0, 1].

    c M Held (Univ Salzburg) Geometric Modeling (SS 2015) 94

    Additional Properties of Bernstein Basis Polynomials

    Lemma 76(Partition of unity, Dt.: Zerlegung der Eins)

    For alln N0, the Bernstein basis polynomials of degreenform a partition of unity,i.e., they sum up to one:

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    95/302

    i.e., they sum up to one:

    nk=0

    Bk,n(x) =1 for allx[0, 1].

    Proof :Trivial forn=0. Now recall the binomial theorem, for a, b R andn N:

    (a+b)n =n

    k=0

    n

    k

    akbnk

    Then the claim is an immediate consequence by settinga:= xandb:=1 x:

    1= (x+ (1 x))n =n

    k=0

    nkxk(1 x)nk = n

    k=0

    Bk,n(x).

    c M Held (Univ Salzburg) Geometric Modeling (SS 2015) 95

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    96/302

    Derivatives of Bernstein Basis Polynomials

    Lemma 79

    Forn, k N0andi N within, thei-th derivative ofBk,n(x)can be written as alinear combination of Bernstein basis polynomials:

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    97/302

    p y

    B(i)k,n(x) =

    n!

    (n i)!i

    j=0

    (1)iji

    j

    Bkj,ni(x)

    Corollary 80

    Forn, k N0, the first and second derivative ofBk,n(x)are given as follows:Bk,n(x) =n

    Bk1,n1(x) Bk,n1(x)

    Bk,n(x) =n(n 1)

    Bk2,n2(x) 2Bk1,n2(x) +Bk,n2(x)

    c M Held (Univ Salzburg) Geometric Modeling (SS 2015) 97

    Bernstein Basis Polynomials Form a Basis

    Lemma 81

    Then+1 Bernstein basis polynomialsB0,n, B1,n, . . . , Bn,nare linearly independent,for alln N0.

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    98/302

    Proof :We do a proof by induction.I.B.: The claim is obviously true for n=0 andn=1.I.H.: Suppose that the claim is true for n 1 N0, i.e., that

    n1k=0kBk,n1(x) =0

    implies0 =1 =. . .= n1 =0.I.S.: Suppose that

    nk=0kBk,n(x) =0 for some0, 1, . . . , n R. Then we get

    0=n

    k=0

    kBk,n(x)

    Lem. 79=

    nk=0

    k n (Bk1,n1(x) Bk,n1(x))

    =n

    n1k=0

    k+1Bk,n1(x) n1k=0

    kBk,n1(x)

    =nn1k=0

    kBk,n1(x) withk :=k+1 kfor 0k n 1.

    The I.H. implies0 =1 = n1 =0 and, thus,0 =1 = n, which implies0 =1 = n=0. (Recall Partition of Unity, Lem.76.)

    c M Held (Univ Salzburg) Geometric Modeling (SS 2015) 98

    Bernstein Basis Polynomials Form a Basis

    Lemma 82

    For alln, i N0, within, we haven k

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    99/302

    xi

    = k=i iniBk,n(x).Proof : Letn, i N0be arbitrary but fixed, within. We have

    xi =xi

    1= xi

    (x+ (1

    x))ni =xi

    ni

    k=0

    n ik xk(1 x)nik=

    nik=0

    n i

    (k+i) i

    xk+i(1 x)n(k+i) =

    nk=i

    n ik i

    xk(1 x)nk

    =n

    k=i

    nikink

    n

    kxk(1 x)nk =n

    k=i

    nikink Bk,n(x)

    Lem83=

    nk=i

    ki

    ni

    Bk,n(x).c M Held (Univ Salzburg) Geometric Modeling (SS 2015) 99

    Bernstein Basis Polynomials Form a Basis

    Lemma 83

    For alln, k, i N0, withik n,ni k

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    100/302

    n ikink =

    kini .

    Proof : Letn, k, i N0arbitrary but fixed withik n. We have

    nikink

    =(ni)!

    (ki)!(nk)!

    n!k!(nk)!

    =

    (ni)!(ki)!

    n!k!

    =

    k!(ki)!

    n!(ni)!

    =

    k!(ki)!i!

    n!(ni)!i!

    = kini

    .

    Theorem 84

    The Bernstein basis polynomials of degreenform a basis of the vector space ofpolynomials of degree up tonover R, for alln N0.

    Proof :This is an immediate consequence of either Lem.81or Lem.82.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 100

    Basis Conversions Suppose that we are given a polynomial in Bernstein basis, i.e., a Bernstein

    polynomial as a linear combination of Bernstein basis polynomials, and that wewant to find the equivalent in power basis, and vice versa.

    Bernstein basis: Power basis:

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    101/302

    Bernstein basis:

    Bn(x) =n

    k=0

    kBk,n(x)

    Power basis:

    Pn(x) =n

    k=0

    kxk

    Given either the values forkork, we want to find the corresponding values inthe other basis.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 101

    Basis Conversions Using Taylor Series Expansion Basis conversions between power and Bernstein basis can be done using

    Taylor/Maclaurin series expansion:

    Bn(x) = Bn(0) + Bn(0)x +

    Bn(0)x2

    + +B

    (i)n (0)x

    i

    +

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    102/302

    Bn(x) =Bn(0) +Bn(0)x+ 2 +...+

    i! +...

    A polynomial in Bernstein basis is equivalent to a polynomial in power basis ifand only if

    B(i)n (0)x

    i

    i! =ix

    i i=0, 1, . . . , n

    Thus,

    i = B

    (i)n (0)

    i! i=0, 1, . . . , n.

    One can set up a recurrence formula for computingi.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 102

    Basis Conversions Using the Binomial Theorem The appropriate values ofican also be computed directly based on the

    definition of the Bernstein polynomials and the Binomial Theorem:

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    103/302

    Bk,n(x) = nkxk(1 x)nk = nkxk(1)nk(x 1)nk=

    n

    k

    xk(1)nk

    nki=0

    n k

    i

    xi(1)nki

    = nkxknki=0

    n ki (1)ixi =nki=0

    (1)inkn ki xi+k=

    ni=k

    (1)ik

    n

    k

    n ki k

    xi

    Lem83=

    ni=k

    (1)ik

    n

    i

    i

    k

    xi

    Hence, we get the following formula for the coefficient iofxi:

    i =n

    k=0

    k(1)ik

    n

    i

    i

    k

    with

    i

    k

    :=0 ifi

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    104/302

    p y y g p p

    points. The figure shows a Bzier curve of degree 10 with 11 control points.

    p0

    1

    p2p3

    p4

    p5

    p6

    p7

    p8p9

    p10

    Bzier curves formed the foundations of Citrons UNISURF CAD/CAM system. TrueType fonts use font descriptions made of composite quadratic Bzier curves;

    PostScript, Metafont, and SVG use composite Bziers made of cubic Bziercurves.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 105

    Bzier Curves

    Definition 85(Bzier curve)

    Suppose that we are givenn+1 control points with position vectorsp0, p1, . . . , pnin the plane R2, forn N. TheBzier curveB : [0, 1] R2 defined byp0, p1, . . . , pnis given by

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    105/302

    is given by

    B(t) :=n

    i=0

    Bi,n(t)pi fort[0, 1],

    whereBi,n(t) =

    ni

    ti(1 t)ni is thei-th Bernstein basis polynomial of degree n.

    The weighted average of all control points gives a location on the curve relative tothe parametert. The weights are given by the coefficients Bi,n.

    The polygonal chainp0, p1, p3, . . . , pn1, pnis called thecontrol polygon, and itsindividual segments are referred to aslegs.

    Although not explicitly required, it is generally assumed that the control points aredistinct, except for possiblyp0and pnbeing identical. Of course, the same definition and the subsequent stuff can be applied to

    p0, p1, . . . , pn Rd for somed N withd>2.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 106

    Properties of Bzier Curves

    Lemma 86

    A Bzier curve defined by n+1 control points is (coordinate-wise) a polynomial ofdegreen.

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    106/302

    Proof :It is the sum of n+1 Bernstein basis polynomials of degree n.

    Lemma 87(Convex hull property)

    A Bzier curve lies completely inside the convex hull of its control points.

    Proof :This is nothing but a re-formulation of Cor.78.

    Lemma 88

    A Bzier curve starts in the first control point and ends in the last control point.

    Proof :Recall that

    Bi,n(0) =

    1 fori=0,0 fori>0.

    Hence, B(0) =B0,n(0)p0 =p0. Similarly forBi,n(1)and B(1).

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 107

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    107/302

    Modifying a Control Point Suppose that we shift one control pointpjto a new locationpj+v.

    p2 p3 p7

    p8p9

    p10

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    108/302

    p0

    p1

    p4

    v

    p4 + v

    p5

    p6

    The corresponding Bzier curve Bis transformed to B as follows:

    B(t) =

    j1i=0

    Bi,n(t)pi

    +Bj,n(t)(pj+v) +

    n

    i=j+1

    Bi,n(t)pi

    =

    =n

    i=0

    Bi,n(t)pi+Bj,n(t)v=B(t) +Bj,n(t)v

    Now recall thatBj,n(t)=0 for alltwith 0< t

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    109/302

    q= (1 t)p+tr.

    Similarly, we can compute a point on a Bzier curve such that the curve is splitinto portions of relative lengthtand 1 t.

    On every legpj1pjof the control polygon we compute a pointp1jwhichdivides it according to the ratiot :1 t. In total we get nnew points which define a new polygonal chain with n 1

    legs. This new polygonal chain can be used to construct another polygonal chain

    withn 2 legs.

    This process can be repeatedntimes, i.e., until we are left with a singlepoint. It was proved by de Casteljau that this point corresponds to the point B(t)

    sought.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 110

    De Casteljaus Algorithm Sample run of de Casteljaus algorithm for t := 1/4. The points are indexed in the form i,j, whereidenotes the number of the

    iteration andj+1 denotes the leg defined by the control points pi,jandpi,j+1.

    p2 p3

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    110/302

    p0

    p1

    p2 p3

    p4

    p5

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 111

    De Casteljaus Algorithm Sample run of de Casteljaus algorithm for t := 1/4. The points are indexed in the form i,j, whereidenotes the number of the

    iteration andj+1 denotes the leg defined by the control points pi,jandpi,j+1.

    p2 p3

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    111/302

    p0

    p1

    p2 p3

    p4

    p5

    p0 =: p00

    p1 =: p01

    p2 =: p02

    p3 =: p03

    p4 =: p04

    p5=:

    p05

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 111

    De Casteljaus Algorithm Sample run of de Casteljaus algorithm for t := 1/4. The points are indexed in the form i,j, whereidenotes the number of the

    iteration andj+1 denotes the leg defined by the control points pi,jandpi,j+1.

    p2 p3

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    112/302

    p0

    p1

    p2 p3

    p4

    p5

    p14

    p13

    p12

    p11

    p10

    p0 =: p00

    p1 =: p01

    p2 =: p02

    p3 =: p03

    p4 =: p04

    p5=:

    p05

    p10

    p11

    p12

    p13

    p14

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 111

    De Casteljaus Algorithm Sample run of de Casteljaus algorithm for t := 1/4. The points are indexed in the form i,j, whereidenotes the number of the

    iteration andj+1 denotes the leg defined by the control points pi,jandpi,j+1.

    p2 p3p22

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    113/302

    p0

    p1

    p

    p4

    p5

    p14

    p13

    p12

    p11

    p10

    p20

    p21

    p22

    p23

    p0 =: p00

    p1 =: p01

    p2 =: p02

    p3 =: p03

    p4 =: p04

    p5=:

    p05

    p10

    p11

    p12

    p13

    p14

    p20

    p21

    p22

    p23

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 111

    De Casteljaus Algorithm Sample run of de Casteljaus algorithm for t := 1/4. The points are indexed in the form i,j, whereidenotes the number of the

    iteration andj+1 denotes the leg defined by the control points pi,jandpi,j+1.

    p2 p3p22

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    114/302

    p0

    p1

    p4

    p5

    p14

    p13

    p12

    p11

    p10

    p20

    p21

    p22

    p23

    p30

    p31p32

    p0 =: p00

    p1 =: p01

    p2 =: p02

    p3 =: p03

    p4 =: p04

    p5=:

    p05

    p10

    p11

    p12

    p13

    p14

    p20

    p21

    p22

    p23

    p30

    p31

    p32

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 111

    De Casteljaus Algorithm Sample run of de Casteljaus algorithm for t := 1/4. The points are indexed in the form i,j, whereidenotes the number of the

    iteration andj+1 denotes the leg defined by the control points pi,jandpi,j+1.

    p2 p3p22

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    115/302

    p0

    p1

    p4

    p5

    p14

    p13

    p12

    p11

    p10

    p20

    p21

    p22

    p23

    p30

    p31p32

    p40

    p41

    p0 =: p00

    p1 =: p01

    p2 =: p02

    p3 =: p03

    p4 =: p04

    p5=:

    p05

    p10

    p11

    p12

    p13

    p14

    p20

    p21

    p22

    p23

    p30

    p31

    p32

    p40

    p41

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 111

    De Casteljaus Algorithm

    Sample run of de Casteljaus algorithm for t := 1/4. The points are indexed in the form i,j, whereidenotes the number of the

    iteration andj+1 denotes the leg defined by the control points pi,jandpi,j+1.

    p2 p3p22

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    116/302

    p0

    p1

    p4

    p5

    p14

    p13

    p12

    p11

    p10

    p20

    p21

    p22

    p23

    p30

    p31p32

    p40

    p41

    p50

    p0 =: p00

    p1 =: p01

    p2 =: p02

    p3 =: p03

    p4 =: p04

    p5 =:

    p05

    p10

    p11

    p12

    p13

    p14

    p20

    p21

    p22

    p23

    p30

    p31

    p32

    p40

    p41p50

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 111

    De Casteljaus Algorithm

    Numerically very stable, since only convex combinations are used!

    1 /** Evaluates a Bezier curve at parameter t by applying de Casteljaus algorithm2 * @param p: array of n+1 control points3 * @param n: the degree of the Bezier curve4 * @param t: the parameter

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    117/302

    5 * @return the evaluation result6 */7 point DeCasteljau(point *p, int n, double t)8 {9 double h = p[n];

    10 int i, j;

    12 for (int i = 1; i

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    118/302

    Hence, the contribution of p01top10istp01.

    Sincep20is obtained as

    p20 = (1 t)p10+ tp11,the contribution ofp01to p20viap10is

    (1 t)p10 =t(1 t)p01. Similarly, the contribution of

    p01top20via p11is

    t(1 t)p01.

    p3 =: p03

    p4 =: p04

    p5 =: p05

    p12

    p13

    p14

    p22

    p23

    p31

    p32p41

    p50

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 113

    De Casteljaus Algorithm: Correctness

    Each path fromp0i topn0isconstrained to adiamondshapeanchored atp0iandpn0.

    p0 =: p00

    p1 =: p01

    p2 =: p02

    p10

    p11

    p12

    p20

    p21p30

    p31p40

    p50

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    119/302

    An inductive argument showsthateachpath fromp0itopn0consists ofinorth-eastarrows, i.e., multiplications byt, andn isouth-eastarrows, i.e., multiplications by(1 t).

    Thus, the contribution ofp0itopn0is

    ti(1 t)nip0i,

    alongeachpath fromp0i topn0.

    p3 =: p03

    p4 =: p04

    p5 =: p05

    p12

    p13

    p14

    p22

    p23

    p31

    p32p41

    p50

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 114

    De Casteljaus Algorithm: Correctness

    How many different pathsexist fromp0i topn0? This isequivalent to asking howmany different ways exist to

    p0 =: p00

    p1 =: p01

    p2 =: p02

    p10

    p11

    p12

    p20

    p21p30

    p31p40

    p50

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    120/302

    placeinorth-east arrowsona total ofnpossiblepositions?, and the answeris given by

    ni

    .

    Thus, the total contribution ofp0itopn0, along all pathsfromp0itopn0, is

    n

    i

    ti(1 t)nip0i.

    This is, however, preciselythe weight ofp0iin thedefinition of a Bzier curve(Def.85).

    p3 =: p03

    p4 =: p04

    p5 =: p05

    p13

    p14

    p22

    p23p32

    p41

    p

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 115

    Evaluation of a Bzier Curve Using Horners Scheme

    Horners scheme can also be used for evaluating a Bzier curve. After rewriting B(t)as

    B(t) =n

    Bi,n(t)pi=n

    n

    iti(1 t)nipi

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    121/302

    i=0 i=0 = (1 t)n

    ni=0

    n

    i

    t

    1 ti

    pi

    ,

    one evaluates the sum for the value t1t, and then multiplies by (1 t)n. This method becomes unstable if tis close to one. In this case, one can resort toLem.91,which gives the identity

    B(t) =tn

    ni=0

    n

    i

    1 t

    t

    ipni

    In any case, Horners scheme tends to be faster but numerically moreproblematic than de Casteljaus algorithm.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 116

    Bernstein Polynomials and Polar Forms

    Theorem 92

    Letn N0and d N. For every polynomial function F: R Rd there existsexactly one symmetric and multi-affine function f: Rn Rd, which is called thepolar form(aka blossom, Dt.: Polarform) ofF, such that

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    122/302

    1. for alli {1, 2, . . . , n}, allx1, x2, . . . , xn R, allk N, ally1, y2, . . . , yk R andall1, 2, . . . , k R with

    kj=1j=1

    f(x1, x2, . . . , xi1,k

    j=1jyj, xi+1, . . . , xn) =

    k

    j=1jf(x1, x2, . . . , xi1, yj, xi+1, . . . , xn)

    2. for alli,j {1, 2, . . . , n}f(x1, x2, . . . , xi1, xi, xi+1, . . . , xj1, xj, xj+1, . . . , xn) =

    f(x1, x2, . . . , xi1, xj, xi+1, . . . , xj1, xi, xj+1, . . . , xn),

    3. for allx

    R

    F(x) =f(x, x, . . . , x ntimes

    ), i.e.,Fis the diagonal of f.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 117

    Bernstein Polynomials and Polar Forms

    Lemma 93

    Letn N0and a0, a1, . . . , an R, andF(x) :=n

    i=0aixi. Then

    f ( )

    n1

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    123/302

    f(x1, x2, . . . , xn) := i=0

    aini

    I{1,...,n}|I|=i

    jI

    xjis the polar form of F.

    ai F(x) f(x1, . . . , xn)n=1 a0 :=1, a1 :=0 1 1

    a0 :=0, a1 :=1 x x1n=2 a0 :=1, a1 :=0, a2 :=0 1 1

    a0 :=0, a1 :=1, a2 :=0 x 12 (x1+ x2)a0 :=0, a1 :=0, a2 :=1 x2 x1x2

    n=3 a0 :=1, a1 :=0, a2 :=0, a3 :=0 1 1a0 :=0, a1 :=1, a2 :=0, a3 :=0 x 13 (x1+ x2+ x3)a0 :=0, a1 :=0, a2 :=1, a3 :=0 x2 13 (x1x2+ x1x3+ x2x3)a0 :=0, a1 :=0, a2 :=0, a3 :=1 x3 x1x2x3

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 118

    Bernstein Polynomials and Polar Forms

    LetF(x) :=

    x12 x

    2

    . Hencef(x1, x2) =

    1

    2 (x1+ x2)12 x1x2

    , and we get

    f(0, 0) =

    00

    f(0, 1) =

    1

    20

    =f(1, 0) f(1, 1) =

    1

    12

    .

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    124/302

    Furthermore, F(t) =f(t, t), with

    f(t, t) =f((1 t) 0+t 1, t) = (1 t)f(0, t) +tf(1, t)= (1 t)[(1 t) f(0, 0) +t f(0, 1))] +t[(1 t) f(1, 0) +t f(1, 1))]= (1

    t)2f(0, 0) +2t(1

    t)f(0, 1) +t2f(1, 1)

    =B0,2(t)f(0, 0) +B1,2(t)f(0, 1) +B2,2(t)f(1, 1).

    Hence, there is a close connection between the polar form and the Bernsteinpolynomials: f(0, 0), f(0, 1), f(1, 1)form the coefficients (i.e., control points) of Frelative to the Bernstein basis.

    Polar forms are useful because they provide a uniform and simple means forcomputing values of a polynomial using a variety of representations (Bzier,B-spline, NURBS, etc.).

    For this reason, some authors prefer to introduce Bzier curves in their polarform.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 119

    Bernstein Polynomials and Polar Forms

    Lemma 94

    Every polynomial can be expressed in Bezier form. That is, for every polynomialP: R R2 of degreenthere exist control pointsp0, p1, . . . , pnsuch that the Bziercurve defined by them matchesP

    |[0,1].

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    125/302

    |Sketch of Proof : Letfbe the polarform ofP, and let

    pk :=f(0, . . . , 0

    nk

    , 1, . . . , 1

    k

    ) fork=0, 1, . . . , n.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 120

    Geometric Interpretation of Polar Forms

    LetF(x) :=

    x12 x

    2

    , andt :=0.6. Recall thatf(x1, x2) =

    1

    2 (x1+ x2)12 x1x2

    .

    We get:

    f(t, 0) = 1

    2 t f(1, t) = 1

    2 + 12 t

    12 t f(t, t) =

    t

    12 t2

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    126/302

    0

    12 t 12 t

    f(1, 0) =f(0, 1)

    f(1, 1)

    f(t, 0)

    f(1, t)f(t, t)

    f(0, 0)

    f(0, 0) f(0, 1) f(1, 1)

    f(0, t) f(1, t)

    f(t, t)

    1 t 1 t

    1 t

    t t

    t

    This geometric interpretation matches the de Casteljau algorithm!

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 121

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    127/302

    Derivatives of a Bzier Curve

    Lemma 96

    A Bzier curve is tangent to the control polygon at the endpoints.

    Proof :This is readily proved by computing

    B(0)and

    B(1).

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    128/302

    B B Hence, joining two Bzier curves in a G1-continuous way is easy. Letp0, p1, . . . , pnandp0 , p

    1 , . . . , p

    mbe the control points of two Bzier curves B

    and B. In order to achieveC1-continuity, we need (in addition to pn=p0 )B(1) = (B)(0) i.e., n(pn pn1) =m(p1 p0 ).

    This has an interesting consequence for closed Bzier curves withp0 =B(0) =B(1) =pn: We getG1-continuity atp0ifp0, p1, pn1are collinear. We getC1-continuity atp0ifp1

    p0 =pn

    pn1.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 123

    Subdivision of a Bzier Curve

    One can subdivide ann-degree Bzier curve Binto two curves, at a point B(t0)for a given parametert0, such that the newly obtained Bzier curves B1and B2have their own set of control points and are of degree neach: First, we use de Casteljaus algorithm to compute B(t0). The subdivided control polygon can then be used to generate the new

    t l l f B1 d B2

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    129/302

    control polygons for B1and B2. Note that B1and B2join in aG1-continuous way.

    p0

    p1

    p2 p3

    p4

    p5

    p14

    p13

    p12

    p11

    p10

    p20

    p21

    p22

    p23

    p30

    p31

    p32

    p40

    p41

    p50

    p0 =: p00

    p1 =: p01

    p2 =: p02p3 =: p03

    p4 =: p04

    p5 =: p05

    p10

    p11

    p12

    p13

    p14

    p20

    p21p22

    p23

    p30

    p31

    p32

    p40

    p41p50

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 124

    Subdivision of a Bzier Curve

    Lemma 97

    Letp0, p1, . . . , pnbe the control points of the Bzier curve B, and letpi,jdenote thecontrol points obtained by de Casteljaus algorithm for somet0]0, 1[. We definenew control points as follows:

    f i 0 1

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    130/302

    pi :=pi,0 fori=0, 1, . . . , n

    pi :=pni,i fori=0, 1, . . . , n

    Let B (B, resp.) denote the Bzier curve defined by p0 , p1 , . . . , pn(p0 , p

    1 , . . . , p

    n , resp.). Then B and B join in a tangent-continuous way at point

    p

    n =p

    0 , and we haveB =B|[0,t0] and B =B|[t0,1].

    Note: With every subdivision the control polygons get closer to the Bzier curve,

    and approximation is very fast: For ksubdivision steps, the maximum distancebetween the control polygons and the curve is

    < c

    2k for some positive constantc.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 125

    Degree Elevation of a Bzier Curve

    An increase of the number of control points of a Bzier curve increases theflexibility in designing shapes.

    The key goal is to preserve the shape of the curve. (Recall that Bzier curveschange globally if one control point is relocated!)

    Of course adding one control point means increasing the degree of a Bzierb

    http://goforward/http://find/http://goback/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    131/302

    Of course, adding one control point means increasing the degree of a Bziercurve by one. Letp0, p1, . . . , pnbe the old control points, and p0 , p

    1 , . . . , p

    n, p

    n+1be the new

    control points, and denote the Bzier curves defined by them by Band B. How can we guarantee B(t) =B(t)for allt[0, 1]?

    Obviously, we will needp0 =p

    0 and pn=p

    n+1

    in order to ensure that at least the start and end points of Band B match. In the sequel, we will find it convenient to extend the index range of the control

    points ofB

    and introduce (arbitrary) pointsp1and pn+1. (Both points will bemultiplied with factors that equal zero, anyway.)

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 126

    Degree Elevation of a Bzier Curve

    Standard equalities:n+1

    i

    (1 t) Bi,n=

    n+1

    i

    (1 t)

    n

    i

    ti(1 t)ni

    = ni n+1i t i(1 t)n+1i = ni Bi,n+1

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    132/302

    = i i t (1 t) +1 = iB, +1and

    n+1i+1

    t Bi,n=

    n+1i+1

    t

    n

    i

    ti(1 t)ni

    =

    n

    i

    n+1i+1

    ti+1(1 t)ni =

    n

    i

    Bi+1,n+1

    Hence,

    (1 t) Bi,n= n+1

    i

    n+1 Bi,n+1, and t Bi,n= i+1n+1 Bi+1,n+1.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 127

    Degree Elevation of a Bzier Curve

    B(t) =n

    i=0

    Bi,n(t)pi= ((1 t) +t)n

    i=0

    Bi,n(t)pi

    = (1 t)n

    i=0Bi,n(t)pi+t

    n

    i=0Bi,n(t)pi=

    n

    i=0(1 t) Bi,n(t)pi+

    n

    i=0t Bi,n(t)pi

    n n

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    133/302

    0 0 0 0=

    ni=0

    n+1 in+1

    Bi,n+1(t)pi+n

    i=0

    i+1n+1

    Bi+1,n+1(t)pi

    =n+1

    i=0n+1 i

    n+1 Bi,n+1(t)pi+

    n

    i=1i+1n+1

    Bi+1,n+1(t)pi

    =n+1i=0

    n+1 in+1

    Bi,n+1(t)pi+n+1i=0

    i

    n+1Bi,n+1(t)pi1

    =n+1

    i=0Bi,n+1(t)

    i

    n+1pi1+

    n+1 in+1

    pi =n+1

    i=0Bi,n+1(t)p

    i =:B(t)

    with

    pi :=

    i

    n+1pi1+

    n+1 in+1

    pi, i=0, . . . , n+1.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 128

    Degree Elevation of a Bzier Curve

    Lemma 98

    Letp0, p1, . . . , pnbe the control points of the degree-nBzier curve B. If we use

    pi :=

    i

    n + 1 pi1+ 1

    i

    n + 1 pi for i=0, 1, , n+1

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    134/302

    n+1 n+1as control points for the Bzier curve B, then

    B(t) =B(t) for all t[0, 1].

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 129

    Degree Elevation of a Bzier Curve

    Note that all newly created control points lie on the edges of the previous controlpolygon.

    Effectively, the corners of the previous control polygon are cut off. Degree elevation can be used repeatedly, e.g., in order to arrive at the same

    degrees for two Bzier curves that join.

    A th d k i i th t l l h th B i

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    135/302

    As the degree keeps increasing, the control polyon approaches the Bzier curveand has it as a limiting position.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 130

    Bzier Surfaces

    Definition 99(Bzier surface)

    Suppose that we are given a set of(n+1) (m+1)control points in R3, with0i nand 0jm, where the control point on the i-th row andj-th column isdenoted bypi,j. TheBzier surfaceS: [0, 1] [0, 1] R3 defined bypi,jis given by

    n m

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    136/302

    S(u, v) :=i=0

    j=0

    Bi,n(u)Bj,m(v)pi,j for(u, v)[0, 1] [0, 1],

    whereBk,d(x) =

    dk

    xk(1 x)dk is thek-th Bernstein basis polynomial of degree

    d.

    SinceBi,n(u)and Bj,m(v)are polynomials of degree nand m, this is called aBzier surface of degree(n, m).

    The set of control points is called a Bzier netorcontrol net.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 132

    Properties of Bzier Surfaces

    Lemma 100

    For alln, m N0and all 0inand 0jm, and all(u, v)[0, 1] [0, 1], thetermBi,n(u)Bj,m(v)is non-negative.

    Lemma 101 (Partition of unity)

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    137/302

    Lemma 101( y)For allm, n N0, the sum of allBi,n(u)Bj,m(v)is one:

    n

    i=0m

    j=0Bi,n(u)Bj,m(v) =1 for all(u, v)[0, 1] [0, 1].

    Proof :We have for allm, n N0and all(u, v)[0, 1] [0, 1]n

    i=0m

    j=0Bi,n(u)Bj,m(v) =

    n

    i=0Bi,n(u)

    m

    j=0Bj,m(v)

    =

    n

    i=0Bi,n(u) =1

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 133

    Properties of Bzier Surfaces

    Lemma 102(Convex hull property)

    A Bzier surface lies completely inside the convex hull of its control points.

    Proof :Recall that S(u, v)is the linear combination of all its control points withnon-negative coefficients whose sum is one.

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    138/302

    non negative coefficients whose sum is one.Lemma 103

    A Bzier surface passes through the four corners p0,0, pn,0, p0,mandpn,m.

    Proof :Recall that

    Bi,n(0) =

    1 fori=0,

    0 fori>0,and Bj,m(0) =

    1 forj=0,

    0 forj>0.

    Hence, S(0, 0) =B0,n(0)B0,m(0)p0,0 =p0,0. Similarly for the other corners.Lemma 104

    Applying an affine transformation to the control points results in the sametransformation as obtained by transforming the surfaces equation.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 134

    Isoparametric Curves of Bzier Surfaces

    Lemma 105

    Consider a Bzier surface S: [0, 1] [0, 1] R3 defined by(n+1) (m+1)control pointspi,j, with 0i nand 0jm, and letv0[0, 1]be fixed. ThenC : [0, 1] R3 defined as

    n m

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    139/302

    C(u) :=i=0

    j=0

    Bi,n(u)Bj,m(v0)pi,j foru[0, 1]

    is a Bzier curve defined by then+1 control pointsq0, q1, . . . , qn R3, where

    qi :=m

    j=0

    Bj,m(v0)pi,j for 0i n.

    Proof :We have for allu[0, 1]

    C(u) =n

    i=0

    mj=0

    Bi,n(u)Bj,m(v0)pi,j=n

    i=0

    Bi,n(u) m

    j=0

    Bj,m(v0)pi,j = n

    i=0

    Bi,n(u)qi.

    Analogously for fixedu0.c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 135

    Isoparametric Curves of Bzier Surfaces

    Corollary 106

    Theboundary curvesof a Bzier surface are Bzier curves defined by theboundary points of its control net.

    Lemma 107(Tangency in the corner points)

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    140/302

    ( )Consider a Bzier surface S: [0, 1] [0, 1] R3 defined by(n+1) (m+1)control pointspi,j, with 0i nand 0jm. The tangent plane atS(0, 0) =p0,0is spanned by the vectors p1,0 p0,0and p0,1 p0,0.

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 136

    Bzier Surface as Tensor-Product Surface

    A Bzier surface is generated by multiplying two Bzier curves: tensor productsurface.

    Lemma 108

    Consider a Bzier surface S: [0, 1] [0, 1] R3 defined by(n+ 1) (m+ 1)controlpointspi,j, with 0inand 0jm. Then Sis a tensor-product surface:

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    141/302

    p , p

    S(u, v) = (B0,n(u), B1,n(u), . . . , Bn,n(u))

    p0,0 p0,1 p0,mp1,0 p1,1 p1,m

    ... ...

    . . . ...

    pn,0 pn,1

    pn,m

    B0,m(v)B1,m(v)

    ...Bm,m(v)

    Proof :Just do the math!

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 137

    B-Spline Curves and SurfacesShortcomings of Bzier CurvesB-Spline Basis Functions

    DefinitionSample Basis FunctionsProperties

    B-Spline CurvesD fi iti

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    142/302

    pDefinitionClamped and Unclamped B-Spline CurvesPropertiesDe Boors AlgorithmInsertion and Deletion of KnotsClosed B-Spline Curves

    B-Spline SurfacesDefinitionProperties

    Non-Uniform Rational B-Spline Curves and SurfacesDefinition and Basic PropertiesNURBS for Representing ConicsNURBS Surfaces

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 138

    Shortcomings of Bzier Curves

    Modifying the vertexpjof a Bzier curve causes a global change of the entirecurve:

    p2 p3

    p

    p7

    p8p9

    p10

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    143/302

    p0

    p1

    p4

    v

    p4 + v

    p5

    p6

    B(t) =B(t) +Bj,n(t)v

    ButBj,n(t)=0 for alltwith 0< t

  • 7/25/2019 Geometric Modeling_ martin held.pdf

    144/302

    p0

    p1

    p2

    p3 = p

    0

    p

    1

    p

    2

    p

    3

    p2, p3 = p

    o, p

    1 are collinear

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 141

    Shortcomings of Bzier Curves

    While it is easy to join two Bzier curves withG1 continuity, achievingC2 or evenhigher continuity is quite cumbersome.

    Even worse, changing the common end point of two consecutive Bzier curvesdestroys G1 continuity.

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    145/302

    p0

    p1

    p2

    p3 = p

    0

    p

    1

    p

    2

    p

    3

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 141

    Shortcomings of Bzier Curves

    While it is easy to join two Bzier curves withG1 continuity, achievingC2 or evenhigher continuity is quite cumbersome.

    This will be easier for B-spline curves. (Depicted are two cubic B-splines.)

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    146/302

    p0

    p1

    p2

    p3 = p

    0

    p

    1

    p

    2

    p

    3

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 142

    Shortcomings of Bzier Curves

    While it is easy to join two Bzier curves withG1 continuity, achievingC2 or evenhigher continuity is quite cumbersome.

    This will be easier for B-spline curves. (Depicted are two cubic B-splines.)

    http://find/
  • 7/25/2019 Geometric Modeling_ martin held.pdf

    147/302

    p0

    p1

    p2

    p3 = p

    0

    p

    1

    p

    2

    p

    3

    c M. Held (Univ. Salzburg) Geometric Modeling (SS 2015) 142

    Shortcomings of Bzier Curves

    It is fairly difficult to squeeze a Bzier curve close to a sharp corner of the controlpolygon.

    http://find/
  • 7/25/2019 Geometric Modeling_ mar