GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier...

32
Geometric Continuity of Curves and Surfaces

Transcript of GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier...

Page 1: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

Geometric Continuityof Curves and Surfaces

Page 2: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of
Page 3: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

Synthesis Lectures on VisualComputing: ComputerGraphics, Animation,

Computational Photography,and Imaging

EditorBrian A. Barsky,University of California, Berkeley

is series presents lectures on research and development in visual computing for an audience ofprofessional developers, researchers, and advanced students. Topics of interest include computationalphotography, animation, visualization, special effects, game design, image techniques, computationalgeometry, modeling, rendering, and others of interest to the visual computing system developer orresearcher.

Geometric Continuity of Curves and SurfacesPrzemysław Kiciak2016

Heterogeneous Spatial Data: Fusion, Modeling, and Analysis for GIS ApplicationsGiuseppe Patanè and Michela Spagnuolo2016

Geometric and Discrete Path Planning for Interactive Virtual WorldsMarcelo Kallmann and Mubbasir Kapadia2016

An Introduction to Verification of Visualization TechniquesTiago Etiene, Robert M. Kirby, and Cláudio T. Silva2015

Virtual Crowds: Steps Toward Behavioral RealismMubbasir Kapadia, Nuria Pelechano, Jan Allbeck, and Norm Badler2015

Page 4: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

iv

Finite Element Method Simulation of 3D Deformable SolidsEftychios Sifakis and Jernej Barbic2015

Efficient Quadrature Rules for Illumination Integrals: From Quasi Monte Carlo toBayesian Monte CarloRicardo Marques, Christian Bouville, Luís Paulo Santos, and Kadi Bouatouch2015

Numerical Methods for Linear Complementarity Problems in Physics-Based AnimationSarah Niebe and Kenny Erleben2015

Mathematical Basics of Motion and Deformation in Computer GraphicsKen Anjyo and Hiroyuki Ochiai2014

Mathematical Tools for Shape Analysis and DescriptionSilvia Biasotti, Bianca Falcidieno, Daniela Giorgi, and Michela Spagnuolo2014

Information eory Tools for Image ProcessingMiquel Feixas, Anton Bardera, Jaume Rigau, Qing Xu, and Mateu Sbert2014

Gazing at Games: An Introduction to Eye Tracking ControlVeronica Sundstedt2012

Rethinking QuaternionsRon Goldman2010

Information eory Tools for Computer GraphicsMateu Sbert, Miquel Feixas, Jaume Rigau, Miguel Chover, and Ivan Viola2009

Introductory Tiling eory for Computer GraphicsCraig S.Kaplan2009

Practical Global Illumination with Irradiance CachingJaroslav Krivanek and Pascal Gautron2009

Wang Tiles in Computer GraphicsAres Lagae2009

Page 5: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

v

Virtual Crowds: Methods, Simulation, and ControlNuria Pelechano, Jan M. Allbeck, and Norman I. Badler2008

Interactive Shape DesignMarie-Paule Cani, Takeo Igarashi, and Geoff Wyvill2008

Real-Time Massive Model RenderingSung-eui Yoon, Enrico Gobbetti, David Kasik, and Dinesh Manocha2008

High Dynamic Range VideoKarol Myszkowski, Rafal Mantiuk, and Grzegorz Krawczyk2008

GPU-Based Techniques for Global Illumination EffectsLászló Szirmay-Kalos, László Szécsi, and Mateu Sbert2008

High Dynamic Range Image ReconstructionAsla M. Sá, Paulo Cezar Carvalho, and Luiz Velho2008

High Fidelity Haptic RenderingMiguel A. Otaduy and Ming C. Lin2006

A Blossoming Development of SplinesStephen Mann2006

Page 6: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

Copyright © 2017 by Morgan & Claypool

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted inany form or by any means—electronic, mechanical, photocopy, recording, or any other except for brief quotationsin printed reviews, without the prior permission of the publisher.

Geometric Continuity of Curves and Surfaces

Przemysław Kiciak

www.morganclaypool.com

ISBN: 9781627059053 paperbackISBN: 9781627054676 ebook

DOI 10.2200/S00729ED1V01Y201608VCP025

A Publication in the Morgan & Claypool Publishers seriesSYNTHESIS LECTURES ON VISUAL COMPUTING: COMPUTER GRAPHICS, ANIMATION,COMPUTATIONAL PHOTOGRAPHY, AND IMAGING

Lecture #25Series Editor: Brian A. Barsky, University of California, BerkeleySeries ISSNPrint 2469-4215 Electronic 2469-4223

Page 7: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

Geometric Continuityof Curves and Surfaces

Przemysław KiciakUniversity of Warsaw

SYNTHESIS LECTURES ON VISUAL COMPUTING: COMPUTERGRAPHICS, ANIMATION, COMPUTATIONAL PHOTOGRAPHY, ANDIMAGING #25

CM&

cLaypoolMorgan publishers&

Page 8: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

ABSTRACTis book is written for students, CAD system users and software developers who are interestedin geometric continuity—a notion needed in everyday practice of Computer-Aided Design andalso a hot subject of research. It contains a description of the classical geometric spline curvesand a solid theoretical basis for various constructions of smooth surfaces. Textbooks on computergraphics usually cover themost basic and necessary information about spline curves and surfaces inorder to explain simple algorithms. In textbooks on geometric design, one can find more details,more algorithms and more theory. is book teaches how various parts of the theory can begathered together and turned into constructions of smooth curves and smooth surfaces of arbitrarytopology.

e mathematical background needed to understand this book is similar to what is neces-sary to read other textbooks on geometric design; most of it is basic linear algebra and analysis.More advanced mathematical material is introduced using elementary explanations. ReadingGe-ometric Continuity of Curves and Surfaces provides an excellent opportunity to recall and exercisenecessary mathematical notions and it may be your next step towards better practice and higherunderstanding of design principles.

KEYWORDSparametric curves and surfaces, Bézier curves and patches, B-spline curves andpatches, Coons patches, cubic splines of interpolation, trigonometric spline func-tions, geometric splines, �-splines, ˇ-splines, -splines, geometric continuity, tan-gent line continuity, tangent plane continuity, curvature continuity, torsion conti-nuity, Frenet frame continuity, modules, mesh refinement, compatibility conditions,filling polygonal holes, shape badness measures, shape optimisation, shape functions,shape visualisation, Fàa di Bruno’s formula

Page 9: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

ix

ContentsPreface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii

Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Geometric continuity of curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.1 Equations of geometric continuity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2 Interpretation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.3 Geometric spline curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.3.1 �-spline curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.3.2 ˇ-spline curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.3.3 -spline curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

2.4 Tensor product geometric spline patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3 Pairs of surface patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393.1 Geometric continuity at a common boundary . . . . . . . . . . . . . . . . . . . . . . . . . . . 393.2 Interpretation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423.3 A little bit of algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443.4 Polynomial solutions of equations of geometric continuity . . . . . . . . . . . . . . . . . 473.5 Constructing pairs of patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543.6 Approximating smooth junctions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

3.6.1 Joining patches along constant parameter curves . . . . . . . . . . . . . . . . . . . 583.6.2 Joining a spline patch to a trimmed spline patch . . . . . . . . . . . . . . . . . . . 62

4 Compatibility conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694.1 Hahn’s scheme of filling polygonal holes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694.2 Compatibility conditions at a common corner . . . . . . . . . . . . . . . . . . . . . . . . . . 714.3 Compatibility conditions around a point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

4.3.1 G1 compatibility conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754.3.2 Piecewise polynomial functions in R2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 804.3.3 Connection with trigonometric splines . . . . . . . . . . . . . . . . . . . . . . . . . . 88

Page 10: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

x

4.3.4 Trigonometric splines and G1 compatibility conditions . . . . . . . . . . . . . 914.3.5 Trigonometric splines and G2 compatibility conditions . . . . . . . . . . . . . 94

4.4 Beyond the curvature continuity and towards practice . . . . . . . . . . . . . . . . . . . 108

5 Filling polygonal holes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1095.1 eoretical background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1105.2 Constructing function spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1145.3 Minimisation of quadratic forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1295.4 Constructions with shape optimisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1375.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

6 Images of surface shape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1456.1 Characteristic lines and shape functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1466.2 Planar sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1486.3 Isophotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1496.4 Reflection lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1516.5 Highlight lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1546.6 Surface curvatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

A Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159A.1 Lagrange and Hermite interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

A.1.1 e divided differences algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160A.2 Bézier curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

A.2.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163A.2.2 Derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164A.2.3 Algebraic operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

A.3 Bézier patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169A.4 B-spline curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

A.4.1 Normalised B-spline functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172A.4.2 Nonuniform B-spline curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179A.4.3 B-spline curves with uniform knots . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

A.5 Tensor product B-spline patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186A.6 Meshes and generalised B-spline surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

A.6.1 B-spline patches with uniform knots . . . . . . . . . . . . . . . . . . . . . . . . . . . 189A.6.2 Mesh representation of surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189A.6.3 Mesh refinement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

Page 11: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

xi

A.6.4 Extraordinary elements of meshes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192A.6.5 e limiting surface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

A.7 Rational curves and patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197A.8 Spline curves of interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199

A.8.1 Blending polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199A.8.2 Cubic splines of interpolation—Hermite form . . . . . . . . . . . . . . . . . . . 201A.8.3 Cubic B-splines of interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203A.8.4 Approximation properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

A.9 Coons patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208A.9.1 Bilinearly blended Coons patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209A.9.2 Bicubically and biquintically blended Coons patches . . . . . . . . . . . . . . . 209A.9.3 Coons patches in Bézier form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

A.10 Curvatures of curves and surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213A.10.1Curvatures of curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213A.10.2Curvatures of surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216

A.11 Fàa di Bruno’s formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

Author’s Biography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229

Page 12: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of
Page 13: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

xiii

PrefaceBézier and B-spline curves and surfaces developed years ago in the automotive industry as a de-sign tool are now omnipresent in CAD systems and in computer graphics. eir most importantfeature is the ease of designing neatly shaped curve arcs and surface patches. ere are many ex-cellent textbooks from which a reader may find their properties and learn how to use them tomake a design or how to implement an algorithm for processing curves or surfaces that may beembedded in a graphical program.

Usually textbooks on computer graphics cover only the most elementary information aboutcurves and surfaces. For example, a definition of B-spline curves is followed by their basic proper-ties and algorithms of computing points of the curve, computing derivatives and inserting knots.Readers of textbooks about Computer-Aided Design need to invest a little more in mathematics,but in return they get more advanced material, including e.g. algorithms of degree elevation andcomputing the Frenet frame and curvatures, or approximation properties of spline curves. Geo-metric continuity of curves and surfaces is one of the issues described in these books. It is essentialwhen a sophisticated design requires obtaining a smooth surface made of many patches. As it isone of many issues present in the textbooks, geometric continuity is often only touched upon andnot studied in detail. On the other hand, geometric continuity is needed in everyday practice ofComputer-Aided Design and, therefore, it is a rapidly developing subject of research.

is book is addressed to readers who work or intend to work with spline curves and sur-faces. In particular, it is aimed at students who have learned about spline curves and surfaces andwant to know more about them, designers willing to understand the possibilities and limitationsof their CAD software packages in order to enhance their designs, and authors of graphic de-sign software who will find here theoretical bases of constructions to implement or develop; thereare plenty of algorithms, known and yet unknown, whose elements are described in this book.e mathematics needed to understand its contents is elementary linear algebra (vectors, matri-ces, linear vector spaces, bases, linear and affine transformations, systems of linear equations) andanalysis (vector functions, derivatives, Taylor expansions). On the other hand, reading this bookis an opportunity to recall and exercise necessary notions, and the more advanced mathematicalmaterial needed in some places is given with elementary explanations.

What does a reader get in return? Knowledge. Perhaps the most important purpose of thisbook is to show a complete path from mathematical theory to the practical constructions of curvesand surfaces.e book contains a description of the classical geometric spline curves: �-splines, ˇ-splines and -splines, and a solid theoretical basis for various constructions of smooth surfaces. Itconsists of an analysis of smooth junctions of pairs of parametric patches, which uses the theory ofmodules and translates to constructions of such pairs, and an analysis of compatibility conditions

Page 14: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

xiv PREFACE

at a common corner of patches, using as a tool trigonometric splines, which allow one to find alldegrees of freedom for possible constructions of smooth surfaces. An example of an applicationof this theory is a complete construction of surfaces filling polygonal holes in surfaces of arbitrarytopology.is construction contains an optimisation algorithm producing surfaces of high quality.In addition, basic tools for the visualisation of shape of surfaces are discussed.

I would like to thank Prof. Brian Barsky for encouraging me to write this book, for pilotingthe project and for the amount of patience he found for it. I would also like to thank the reviewers,who spent their time reading an early version of this book and whose remarks helped me toimprove it in many places. My special thanks are for my niece Anna Lycett who honed my proseto make it smooth.

Przemysław KiciakSeptember 2016

Page 15: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

xv

NotationR — set (field) of real numbers.

Rm — set (linear vector space) of real column matrices with m rows.Rm�n — set (linear vector space) of real matrices with m rows and n columns.

RŒ�� — set (ring) of real polynomials of one variable.RŒ��n — set (linear vector space) of polynomials of degree not greater than n.RŒ��m — set (module) of real polynomial vector functions in Rm.

RŒ��m�n — set of m � n matrices whose entries are real polynomials.Z — set of integer numbers.

a; v; ˛; ı; f — scalars and functions taking scalar values.a; v; f — points, vectors and functions whose values are points or vectors.

A; B; C — matrices; their rows and columns are numbered from 1.AC — pseudoinverse of a matrix A.

A; B; ˝; � — planar areas and curves.M; p — surfaces and their parametrisations.f ı g — composition of functions, .f ı g/.x/ D f

�g.x/

�.

jaj — absolute value.j˛j — sum of coordinates of a multi-index (integer vector) ˛ D .˛1; : : : ; ˛n/.

�pi , �1pij , �2pij — differences, �pi D piC1 � pi , �1pij D piC1;j � pij , �2pij D pi;j C1 � pij .f Œui ; : : : ; uiCk � — k-th order divided difference.

f 0;dfdt

; f 00; f .n/ — derivatives of a function of one variable.fu;

@f@u

; fuv ;@2f@u@v

,@j˛jf .t1;:::;tn/@˛1 t1:::@˛n tn

— derivatives of a function of two or more variables.rf — gradient of a function f .

rMf — gradient of a function f on a surface M.�f — Laplacian of a function f .Dp — differential of a parametrisation p.

hu; vi — scalar product of vectors. If u; v 2 Rm then hu; vi D vT u.kvk2 — Euclidean norm (or length) of a vector v; kvk2 D

phv; vi.

v1 ^ : : : ^ vm�1 — vector product in Rm.l; h — lines and halflines.

� — partition of the full angle.H .l/ — space of homogeneous bivariate polynomials of degree l .

H.l;n/�

— space of homogeneous bivariate splines of degree l and of class C n.R2/.T

.l;n/�

— space of trigonometric splines of degree l and of class C n.Bn

i , N ni — Bernstein basis polynomials and normalised B-spline functions of degree n.

V ˚ W — direct algebraic sum of linear spaces V and W .f ˝ g — tensor product of functions f and g.

V ˝ W — tensor product of linear spaces V and W .F .c1; : : : ; ck/ — highest common factor of polynomial curves c1; : : : ; ck .M.c1; : : : ; ck/ — module of polynomial curves linearly dependent over RŒ�� with c1; : : : ; ck .L.c1; : : : ; ck/ — module of curves being linear combinations of c1; : : : ; ck over RŒ��.

Page 16: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of
Page 17: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

1

C H A P T E R 1

IntroductionSmoothness of curves and surfaces is one of the most important attributes of their shape; it isoften the first thing noticed and judged by people seeing a new object and taking decisions: to buyor not to buy. But the connection between the smoothness and the aesthetic of an object is not thewhole story. ere are a variety of reasons why objects in technical applications need to be smooth.If a machine part is subject to vibrations, then a notch may initiate cracking caused by fatigue. einfluence of shape on aero- and hydrodynamic properties of objects (airplane fuselages, propellers,ship hulls etc.) is obvious. Shape matters also for nonmaterial objects. In computer animation thesmoothness of a trajectory of a point often helps to imitate natural motion. Moreover, the smoothmotion of a robot part may decrease forces in its mechanism and thus improve its durability.

Shapes of curves and surfaces may be evaluated on two levels. On the macroscopic level onecan notice defects such as self-intersections, undulations or flattenings. Possible blemishes on themicroscopic level are singular points, ridges or curvature discontinuities. In practical design it ishard (if possible at all) to separate the two levels, but their theoretical issues are different. In thisbook we focus on the microscopic level, where the notion of geometric continuity is relevant.However, details of shape noticeable on the macroscopic level are touched upon in Chapter 5,where explicit measures of shape quality are used in constructions of smooth surfaces, and inChapter 6, whose subject is the visualisation of surface shape.

Curves and surfaces may be described mathematically in a number of ways. One possibilityis taking the graph of a scalar function of one or two variables. is method restricts the set ofavailable shapes, in particular not allowing to obtain a closed curve.

Another method uses an implicit definition of a planar curve as the set of points, at whicha given function of two variables is equal to zero, or a surface, defined as the set of zeros ofa function of three variables. is method is popular (perhaps more so in computer graphicsthan in Computer-Aided Design), as it allows one to design complicated shapes relatively easily,whether by adding terms to the function (a popular example of this technique is known underthe name blobs) or by applying Constructive Solid Geometry. On the other hand, the implicitapproach has its restrictions. Apart from special (and simple, like a circle or a sphere) cases,points of the curve or surface must be found numerically, by solving nonlinear equations, which iscomputationally expensive. ese costs, with today’s computers, are not prohibitive, but they arealso not insignificant. To define a curve in space one should specify two scalar functions of threevariables; the curve is the intersection of two surfaces defined implicitly by the two functions, butthis approach is awkward.

Page 18: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

2 1. INTRODUCTION

e third possibility is the one studied in this work: the parametric definition. Here wespecify a vector function of one (to obtain a curve) or two (to obtain a surface) variables. edefinition of the function by an explicit closed formula or by a simple algorithm makes it easy andcheap to find points, and the same formulae may be used both for planar curves and curves locatedin space. Derivatives of the vector function called parametrisation make it possible to find geo-metric attributes of curve or surface, like the tangent line or plane, curvatures, etc. e parametricdefinition also has some drawbacks. e parameters, i.e., arguments of the parametrisation, areoften artificial in applications where only the shape matters; on the other hand, sometimes theyare natural, especially when the parameter of a curve may be identified with time. Surfaces oftenhave to be described piecewise, by a number of patches, and this is the case even for spheres.Making sure that junctions of the patches are smooth is not a trivial task. How to ensure thesmoothness of junctions is the main thread of this work.

Any curve or surface has infinitely many parametrisations; some of them have many deriva-tives, while others are not even continuous. Geometric properties of a curve or surface, which areintuitively interpreted as “smoothness”, occur when parametrisations with certain analytic prop-erties exist. A number of notions related to shapes and their relations with parametrisations weregathered by Veltkamp [1992]. In this book we focus on the notion called geometric continuity,which in practice is the most important of them all.

Definition 1.1 A curve is said to be of class Gn (has geometric continuity of order n, where n � 1) ifthere exists a local regular parametrisation of class C n of this curve in a neighbourhood of each point ofthis curve.

Definition 1.2 A surface is said to be of class Gn (has geometric continuity of order n, where n � 1)if there exists a local regular parametrisation of class C n of this surface in a neighbourhood of each pointof this surface.

ough the continuity of derivatives of a function is essential for the smoothness of itsgraph, the continuity of derivatives of any particular parametrisation (e.g. the one used as a repre-sentation) is neither a necessary nor a sufficient condition for the smoothness of the curve or thesurface. is is why regularity is required by the definitions above. A vector function f of k vari-ables is regular at a point if its partial derivatives at that point are linearly independent vectors;the derivative of a regular function of one variable is a non-zero vector. e role of regularitymay be seen in Figure 1.1, showing two planar curves and their parametrisations. e graph ofa parametrisation p.t/ made of two scalar functions, x.t/ and y.t/, is a three-dimensional curve,whose parametrisation is obtained by attaching the identity function, z.t/ D t , to describe thethird coordinate. e graphs of the functions x.t/ and y.t/ are projections of this spatial curveon the xz and yz planes, while our planar curve is the projection on the xy plane.

Both functions, x.t/ and y.t/, making the parametrisation of the top curve in Figure 1.1,have continuous first- and second-order derivatives. However, the curve has a point of discon-tinuity of the tangent line. is defect corresponds to the parameter t , at which the derivatives

Page 19: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

3(a)

x

y

z D tx

y

x.t/

y.t/

p.t/

p.t/

(b)

x

y

z D tx

y

x.t/

y.t/

p.t/

p.t/

Figure 1.1: (a) A non-smooth curve with a parametrisation of class C 2, (b) A curve of class G2, whoseparametrisation has a discontinuous derivative

of both functions, x.t/ and y.t/, are zero, i.e., the derivative of the parametrisation, p0.t/, isthe zero vector. On the other hand, the curve shown below is represented by a parametrisationwhose derivative is discontinuous at a certain point. is does not prevent the curve from beingsmooth—at each of its points the tangent line is defined; moreover, the curvature of this curve iscontinuous.

Analogous pictures could be drawn for parametric curves and surfaces in the three-dimensional space; however, they would be less obvious, because having never seen any four-or five-dimensional objects (as opposed to three-dimensional curves, like graphs of parametrisa-tions of planar curves, and their projections on planes), one has to rely only on his or her ownimagination to reconstruct the scene from a picture drawn on a planar sheet. Graphs of threescalar functions, x.t/, y.t/ and z.t/, are projections of the graph of a parametrisation on the xt ,

Page 20: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

4 1. INTRODUCTION

yt and zt planes in R4; drawing such graphs for a given (say, spline) curve is a good exercise forone’s imagination—which is left to the reader.

One may ask, why use non-smooth parametrisations to represent smooth curves and sur-faces? e answer is that using smooth parametrisations is not always convenient and, in the caseof surfaces, not always possible. Often objects are represented piecewise by many curves and sur-faces, and while the pieces have smooth parametrisations, constructions guarantee the smoothnessof junctions of these pieces by ensuring the existence of the parametrisations fulfilling the condi-tions given in the definitions of geometric continuity. However, such parametrisations are notexplicit results of these constructions.

is book consists of six chapters and an appendix; most of Chapter 1 you have just read. InChapter 2 a closer look is taken at the notion of geometric continuity of curves, whose theoreticalinterpretation is followed by practical (and classical) constructions of geometric spline curves—�-splines, ˇ-splines and -splines. While it is easy to adapt these constructions to tensor productpatches, smooth surfaces of arbitrary topology are more challenging and the next three chaptersdescribe the theory and its possible practical applications tomethods of constructing such surfaces.

Chapter 3 is dedicated to smooth junctions of pairs of surface patches having a commoncurve. e algebraic study of equations of geometric continuity leads to constructions of pairs ofpatches. ere are situations where algebraic solutions of these equations are impractical and thenapproximation is exercised. We show how to construct surfaces with arbitrarily small defects atjunctions of patches, which from the practical point of view are indistinguishable from surfacesof class G1 or G2. In Chapter 4 compatibility conditions at a common corner of patches are stud-ied. Trigonometric splines offer an analytic tool powerful enough to understand the restrictionsimposed on surface patches and to reveal all degrees of freedom left by compatibility conditionsfor geometric continuity of any order. In Chapter 5 some methods of filling polygonal holes insurfaces are described as an example of applying theory in practice. A word of warning: suchmethods are never simple, and the ones in Chapter 5 are no exception. e surfaces filling thehole are obtained by a numerical algorithm whose goal is to minimise undulations and flattenings.e algorithm is a special case of the finite element method; its major part is the construction ofa function space from which the algorithm chooses functions to describe the coordinates of thesurface parametrisation. e construction of the function space applies most of the theory fromthe preceding chapters.

Chapter 6 describes basic tools used to visualise shapes of surfaces in order to evaluate theirquality. ese tools—shape functions—make it possible to show details at the microscopic level,revealing the actual class of geometric continuity of junctions of patches, as well as undulationsand flattenings present at the macroscopic level.

Appendix A recalls basic information about interpolation problems, Bézier and B-splinecurves and surfaces, surfaces of arbitrary topology represented by meshes, Coons patches, an ab-solutely minimal dose of differential geometry and Fàa di Bruno’s formula, which is omnipresentin theoretical foundations and in practical constructions of smooth curves and surfaces. ough

Page 21: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

5

properties of curves and surfaces are known from textbooks and research papers, they are gatheredhere for the reader’s convenience. A number of proofs for these are given in the appendix, eitherbecause of direct applications in constructions described in this book, or because many theorems(especially in Chapter 4) are proved using the same ideas, which is worth a special emphasis.Welcome to the lecture on geometric continuity.

Page 22: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of
Page 23: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

7

C H A P T E R 2

Geometric continuity of curvese definition of geometric continuity has been given, and its connection with the analyticalclass of curve parametrisation has been explained in the Introduction. In this chapter we studythe conditions which ensure the existence of a parametrisation with sufficiently many continuousderivatives of a curve defined piecewise. e basic idea is to make a substitution of the parameterof one arc; a new parametrisation of this arc is thus obtained. e second arc may be constructedto interpolate the derivatives of this new parametrisation. e reparametrisation of the first arcis a function defined with a number of arbitrary constants; their modifications are a means ofchanging the shape of the second arc.

It is worth recalling that to be successful we need a regular parametrisation of the firstarc, i.e., its derivative must not be the zero vector; also the function used to reparametrise thisarc must have a non-zero derivative. Geometric spline curves, whose practical constructions aredescribed in Section 2.3, do not have to have smooth shapes if some of their control points orpoints to be interpolated coincide. Nevertheless, if these points are not positioned specifically tocause a singularity (i.e., almost always), they determine a smooth curve.

2.1 EQUATIONSOFGEOMETRICCONTINUITYLet p.t/ be a parametrisation of class C n whose domain is an interval Œa; t0�. Suppose that it isregular and it has at least n continuous derivatives. We can substitute t D f .u/, using a monotonefunction f of class C n. If q.u/ D p.f .u//, then by Fàa di Bruno’s formula (A.54) we obtain

dj

dujq.u/ D

jXkD1

ajk.u/dk

dtkp.t/; for j D 1; : : : ; n, (2.1)

where ajk are functions determined by derivatives of the function f :

ajk.u/ DX

m1C���CmkDjm1;:::;mk>0

j Š

kŠm1Š : : : mkŠ

dm1f .u/

dum1: : :

dmk f .u/

dumk: (2.2)

In particular,

q0.u/ D f 0.u/p0.t/;

q00.u/ D f 00.u/p0.t/ C f 02.u/p00.t/;

q000.u/ D f 000.u/p0.t/ C 3f 0.u/f 00.u/p00.t/ C f 03.u/p000.t/ etc.

Page 24: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

8 2. GEOMETRICCONTINUITYOFCURVES

f �1.a/ u0 b u

a

t0 D f .u0/

f .b/

t

t D f .u/

q D p ı f

p

p�.u0/ D q.u0/ D p.f .u0//

p0.t0/p�0.u0/ D q0.u0/

Figure 2.1: A smooth junction of two parametric curves

Suppose that p.t/ is given and the goal is to construct a parametrisation p�.u/ of class C n

defined in an interval Œu0; b� such that the arcs described by the two parametrisations form a curveof class Gn. To achieve this goal we impose some restrictions on the function f . To avoid singu-larities and cusps we need a function f increasing monotonically and regular; hence, the deriva-tive of f ought to be positive. Such a function f has its inverse, f �1. By taking f such thatf .u0/ D t0, the counterimage of the interval Œa; t0� (i.e., the image of this interval under themapping f �1) will adhere to Œu0; b� (see Figure 2.1), thus forming the domain Œf �1.a/; b� of thepiecewise defined parametrisation

s.u/ D

�p�f .u/

�if u 2 Œf �1.a/; u0/,

p�.u/ if u 2 Œu0; b�. (2.3)

en we specify the interpolation conditions for the parametrisation p� at u0: to obtain a con-tinuous curve, we need

p�.u0/ D q.u0/ D p.t0/:

To obtain a curve of class G1, we also need

p�0.u0/ D q0.u0/ D f 0.u0/p0.t0/:

To shorten the notation, below we use underlining and overlining to denote the evaluation of p�

at u0 and p at t0 respectively. e number tk is the k-th order derivative of the function f at u0.With this notation the last two equations take the form

p�D p; (2.4)

p�0D t1p0: (2.5)

If the two equations are satisfied, then the arcs, whose parametrisations are p and p�, form a curveof class G1. To obtain a curve of class G2, we also need

p�00D t2p0

C t21 p00; (2.6)

Page 25: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

2.1. EQUATIONSOFGEOMETRICCONTINUITY 9

and geometric continuity of order 3 occurs if the following equation

p�000D t3p0

C 3t1t2p00C t3

1 p000; (2.7)

is satisfied together with the preceding three. Note that both parametrisations, s defined by (2.3)and the composition s ı f �1 (whose domain is Œa; f .b/�), are regular and have the required num-ber of continuous derivatives.

To construct a parametrisation p� such that the curve described by p and p� is of class Gn

we do not need a function f ; what counts are the values of its derivatives of order 1; : : : ; n at u0.We can, therefore, choose arbitrary numbers t1; : : : ; tn, which become connection parameters,use them to construct the vectors, being the derivatives of q at v0, and then construct a parametri-sation p� satisfying the n C 1 Hermite interpolation conditions at u0. In constructions of curvesmade of a number of arcs, interpolation conditions will also be imposed at the point b, i.e., theother end of the domain of p�. But here we focus on junctions of just two arcs.

It is illustrative to write the relation between derivatives of the arcs p and p� in matrixform. According to (2.4)–(2.6) and (2.4)–(2.7), for junctions of class G2 and G3 there is264 p�

p�0

p�00

375 D

24 1 0 0

0 t1 0

0 t2 t21

3524 p

p0

p00

35 ;

26664p�

p�0

p�00

p�000

37775 D

26641 0 0 0

0 t1 0 0

0 t2 t21 0

0 t3 3t1t2 t31

37752664

p

p0

p00

p000

3775 :

Matrices, which describe the relation between the derivatives of the arcs are called connectionmatrices. For geometric continuity of higher orders theymay be obtained by appendingmore rowsand columns, with the coefficients ajk D ajk.u0/ from Formula (2.2). Such connection matricesare always lower triangular and non-singular, as their diagonal coefficients are consecutive powersof t1, which is non-zero.

Remark. Connection matrices may be used to describe and define classes of continuity of junc-tions of curves other than Gn, e.g. the Frenet frame continuity considered in Section 2.2. Inter-ested readers may find more information on this in the paper by Habib and Goldman [1996].

Now we consider junctions of arcs given in the homogeneous form (see Section A.7), rep-resenting rational curves in the space of dimension d , which is a plane if d D 2, and d D 3 inthe majority of other practical situations. A homogeneous representation is a curve in the spaceof dimension d C 1. e coordinates of a parametrisation p in Rd are obtained by dividing thefirst d coordinates of the homogeneous parametrisation P by its last coordinate, called theweightcoordinate and denoted by W ; this is equivalent to the perspective projection of the homogeneouscurve (with the centre at 0 2 RdC1) on the plane W D 1.

An immediate observation is that by multiplying a homogeneous parametrisation by a non-zero function we obtain another homogeneous representation of the same rational curve. To coverthis possibility by our analysis we consider a homogeneous parametrisation P over the inter-

Page 26: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

10 2. GEOMETRICCONTINUITYOFCURVES

val Œa; t0� and a parametrisation Q.u/ D r.u/P.f .u//, obtained by a substitution of the param-eter and by rescaling, with a non-zero function r of class C n. Using the Leibniz formula for thederivatives of a product of functions, we obtain

dj

dujQ.u/ D

jXiD0

j

i

!dj �i

duj �ir.u/

di

duiP�f .u/

�; for j D 0; : : : ; n.

e i-th order derivative of P.f .u// with respect to u may be obtained with Fàa di Bruno’sformula; after using it and doing some calculation, we obtain

dj

dujQ.u/ D

dj r

dujP C

jXkD1

Ajk

dk

dtkP ;

where

Ajk D

jXiDk

j

i

!dj �ir

duj �i

Xm1C���CmkDim1;:::;mk>0

i Š

kŠm1Š : : : mkŠ

dm1f

dum1: : :

dmk f

dumk:

As before, we can use this formula to construct as many derivative vectors of the homoge-neous parametrisation P� of a rational curve at the parameter u0 corresponding to the junctionpoint as needed. In particular, to ensure geometric continuity of order 1, 2 or 3, we use the first2, 3 or all 4 formulae of the following:

P�D r0P ; (2.8)

P�0D r1P C r0t1P 0; (2.9)

P�00D r2P C .r0t2 C 2r1t1/P 0

C r0t21 P 00; (2.10)

P�000D r3P C .r0t3 C 3r1t2 C 3r2t1/P 0

C .3r0t1t2 C 3r1t21 /P 00

C r0t31 P 000; (2.11)

where r0; : : : ; rn and t1; : : : ; tn may be arbitrary numbers with the constraint that r0 ¤ 0 and t1 >

0. Having obtained the derivative vectors, we can construct the homogeneous parametrisation P�

by solving a Hermite interpolation problem.Junctions of rational arcs in the homogeneous representations may also be described using

connection matrices. For example, the description of a junction of class G2 is264 P�

P�0

P�00

375 D

264 r0 0 0

r1 r0t1 0

r2 r0t2 C 2r1t1 r0t21

375264 P

P 0

P 00

375 :

Exercise. Extend the formula above to describe the case G3.

Page 27: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

2.2. INTERPRETATION 11

2.2 INTERPRETATIONTo better understand the notion of geometric continuity and the equations derived in the previoussection, we introduce the following notion:

Definition 2.1 A curve has the continuity of order n of the Frenet frame (is of class F n) if it hasa parametrisation such that the functions e1; : : : ; en, which describe the vectors of the curve’s Frenetframe, and the curvatures �1; : : : ; �n�1 are continuous.

e Frenet frame in a space of dimension d is made of d vectors (see Section A.10.1),and only d � 1 curvatures may be defined, which means that a curve in such a space may be ofclass at most F d . e notions of geometric continuity and Frenet frame continuity are, therefore,different. But it is illustrative to compare the two properties. So, let p and p� be two regularparametrisations of class C 1 of two arcs in R2 or R3 which form a curve. We consider a neigh-bourhood of the junction point of the two arcs.

Case n D 1. If the curve is of class G1, then the arcs at the junction point have a common tan-gent line determined by the derivative vectors of both parametrisations. To avoid a cuspon the curve, these vectors must have the same orientation. is is the case if t1 > 0 inEquation (2.5) or (2.9).e F 1 continuity condition involves only the vector e1 of the Frenet frame—the tangentvector, which must be the same for both arcs at the junction point. us, the notions of F 1

and G1 continuity are identical; they both mean the continuity of direction of the tangentline of the curve.

Case n D 2. If Equation (2.5) is satisfied with t1 > 0, then the vectors p0 and p�0 have the samedirection and orientation. To satisfy Equation (2.6) the pairs of vectors p0, p00 and p�0, p�00

must span the same plane, and then both pairs of vectors determine the same vectors e1

and e2 of the Frenet frame at the junction point. Also, the first curvature �1 D � dependson the first two derivatives of the parametrisation in a continuous way. erefore, a planarcurve of class G2 is also of class F 2.¹On the other hand, if a curve is of class F 2, then it is easy to prove that its arc lengthparametrisation is regular and of class C 2. us, the classes F 2 and G2 of planar curvesare identical and in a higher dimension the difference between the two classes is negligible.Curvature continuity is a property characteristic for curves of these classes.

Case n D 3. e F 3 continuity may be considered for three- or higher-dimensional curves withnon-zero curvature.e derivatives of order 1 and 2 at the junction point of two arcs forminga curve of class G2 determine the parameters t1 and t2; thus, the only degree of freedomin Equation (2.7) is in the choice of the parameter t3 used to construct the vector p�000.

¹In a space of dimension 3 or higher, if the first curvature is zero, the vector e2 is undefined and the curve does not fulfill thedefinition of F 2 continuity.

Page 28: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

12 2. GEOMETRICCONTINUITYOFCURVES

e difference of vectors corresponding to different values of t3 is parallel to p0, i.e., tothe tangent line at the junction point. Taking into account the construction of the Frenetframe (via the Gram–Schmidt orthonormalisation, see Section A.10.1), we conclude thatif a curve is of class G3 and its curvature is non-zero, then it is also of class F 3.e vectors e1 (tangent), e2 (normal) and e3 (binormal) of the Frenet frame and also thecurvatures �1 D � (curvature) and �2 D � (torsion) will not be changed if any vector in theosculating plane, spanned by e1 and e2, is added to p�000. To construct a curve of class F 3,instead of (2.7) we could use the formula

p�000D t3p0

C s3p00C t3

1 p000;

with arbitrary parameters t3 and s3. As this construction has two degrees of freedom, F 3 isa wider class of curves than G3. In both cases the second curvature, i.e., torsion, is contin-uous.²

All equations of geometric continuity of junctions of two arcs have the form

p�.j /D tj p0

C qj ; j D 1; : : : ; n; (2.12)

where qj is a vector determined by the parameters t1; : : : ; tj �1 and the vectors p00; : : : ; p.j / (inparticular q1 D 0), i.e., derivatives of the parametrisation of the first arc. In the construction of thesecond arc, where Gn continuity of the junction is to be achieved, after constructing the derivativesof p� of order less than n we can arbitrarily choose only one parameter, tn. Equivalently, we canchoose arbitrarily a vector p�.n/, provided that the difference p�.n/ � qn is parallel to the tangentline of the arcs at the junction point.

(a) y

x

p p�

p0

p�0 D t1p0

(b) y

x

p

p�p0

p�0 D t1p0

p00

q2 D t21 p00

p�00

Figure 2.2: Geometric continuity at the junction point of two cubic curves

²e connection matrix, which describes a junction of class F 3 of two arcs, is lower-triangular, with consecutive powers ofa number t1 on the diagonal and, except for the first column, arbitrary coefficients below the diagonal. e matrices, whichcharacterise the Frenet frame continuity in higher-dimensional spaces have the same structure.

Page 29: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

2.2. INTERPRETATION 13

Figure 2.2 shows two examples of junctions of two curves. In both cases we have two cubiccurves with the parameter intervals of length 1. e junction in Figure 2.2a is of class G1, wherethe parameter t1 is equal to 2. e derivative vector of the curve p� is twice longer than that of thecurve p at the junction point. In Figure 2.2b there is a junction of class G2, with the parameterst1 D 2 and t2 D 0:9; there is q2 D t2

1 p00 and the vector q2 � p�00 has the direction of the linetangent to both curves, which at their common point have the same curvature.

Equations for homogeneous arcs have a similar form:

P�.j /D rj P C r0tj P 0

C Qj ; j D 1; : : : ; n; (2.13)

with the vector Qj determined by the parameters r0; : : : ; rj �1 and t1; : : : ; tj �1 and the vectorsP 00; : : : ; P .j /. Choosing P�.n/, we have two degrees of freedom, in the choice of rn and tn. edifference P�.n/ � Qn must be parallel to the plane spanned by the vectors P and P 0. is isillustrated in Figure 2.3, where planar rational curves (in the plane W D 1) are shown togetherwith their homogeneous representations. In Figure 2.3a there is a junction of class G1; it is ob-tained by making sure that the vector P�0 is a linear combination of P and P 0. Dashed lines areused to show a square in the plane W D 1 and a rectangle in the linear subspace spanned by thevectors P and P 0. e intersection of this subspace with the plane W D 1 is the line tangent tothe rational arcs at the junction point.

(a)

X

Y

W

PP�

P

P�

P 0

P�0

(b)

X

Y

W

P

P�

P

P�

P 0

P�0Q2

P�00

Figure 2.3: Geometric continuity at the junction point in homogeneous representation

Page 30: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

14 2. GEOMETRICCONTINUITYOFCURVES

e junction of class G2 in Figure 2.3b is shown together with the vectors Q2 D r0t21 P 00

and P�00. With the first-order derivatives of the homogeneous curves fixed (in the way ensuringthe G1 continuity of the junction of the rational arcs), to obtain the G2 continuity it suffices tochoose the vector P�00 in such a way that the difference Q2 � P�00 be a linear combination of P

and P 0. More information about smooth junctions of rational curves may be found in Geise andJüttler [1993].

Exercise.A circular arc may be represented by a quadratic rational Bézier curve (see Section A.7),as shown in Figure 2.4. In particular, the full circle may be made of four such quarters, and thenit is a quadratic rational spline curve of class G1. Considering a junction of two quarters whosedomains are adjacent intervals of length 1, find the parameters r0; r1; t1; r2; t2; r3; t3, which appearin Equations (2.8)–(2.11).

p0

p1

p2

w0 D w2 D 1, w1 D cos '

'

0

X

Y

W

x

y

Figure 2.4: A circular arc in rational Bézier form and a representation of a circle

2.3 GEOMETRIC SPLINECURVES2.3.1 �-SPLINECURVESLet u0; : : : ; uN be an increasing sequence of numbers, let a0; : : : ; aN be points and let b0; : : : ; bN

be vectors in a d-dimensional space. e formula

s.t/ D aiHi;00.t/ C biHi;01.t/ C aiC1Hi;10.t/ C biC1Hi;11.t/ if t 2 Œui ; uiC1�,

where Hi;00; Hi;01; Hi;10; Hi;11 are cubic polynomials defined by Formulae (A.39) and (A.41),defines a cubic spline parametrisation such that s.ui / D ai , s0.ui / D bi for i D 0; : : : ; N . enumbers u0; : : : ; uN are both knots of the spline and interpolation knots. From the considerations

Page 31: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

2.3. GEOMETRIC SPLINECURVES 15

in Section A.8 it follows that for any choice of the points a0; : : : ; aN and vectors b0; : : : ; bN sucha parametrisation is of class C 1.

e polynomial arcs of the curve s meeting at the knot ui , denoted by pi�1 and pi , aredetermined by the points and vectors ai�1; bi�1; ai ; bi and ai ; bi ; aiC1; biC1. ere is

p00i�1.ui / D

6

h2i�1

.ai�1 � ai / C2

hi�1

.bi�1 C 2bi /;

p00i .ui / D

6

h2i

.aiC1 � ai / �2

hi

.2bi C biC1/;

where hi D uiC1 � ui . Assuming that p00i .ui / D p00

i�1.ui /, we can derive the equation³

hibi�1 C 2.hi�1 C hi /bi C hi�1biC1 D

3

�hi

hi�1

.ai � ai�1/ Chi�1

hi

.aiC1 � ai /

�: (2.14)

By solving the system of equations (2.14) for i D 1; : : : ; N � 1 (with unknown vectorsb0; : : : ; bN ), complemented with suitable end conditions (see Section A.8), we can constructcubic spline curves of interpolation of class C 2.

A modification of this construction, proposed by Nielson [1974], allows us to obtain cubicarcs which make a parametrisation s of class C 1 of a curve of class G2. e modified assumptionis

p00i .ui / D p00

i�1.ui / C �ip0i�1.ui /:

is is in fact Equation (2.6) with the parameters t1 D 1 and t2 D �i . After multiplying the sidesby hi�1hi=2 and gathering the terms with the points ai�1, ai , aiC1 and vectors bi�1, bi , biC1 onthe opposite sides of the equality sign we obtain the following equation:

hibi�1 C�2.hi�1 C hi / C hi�1hi�i=2

�bi C hi�1biC1 D

3

�hi

hi�1

.ai � ai�1/ Chi�1

hi

.aiC1 � ai /

�: (2.15)

e curves obtained by solving Equations (2.15) instead of (2.14) are named �-spline curves.Each junction of polynomial arcs has its parameter �i , which may be chosen individually.

In practice one can begin with �i D 0 for all i and then modify the parameters interactively untila satisfactory result is obtained. Increasing �i increases the curvature of the curve in a vicinity ofthe point ai . Moreover, if all parameters �i tend to infinity, the vectors bi tend to 0 and the curvetends to the polyline whose vertices are the points ai .

Figure 2.5 shows an example: two closed curves with equidistant knots (ui D i for all i).esharpness of the teeth of the “comb” outlined by the ordinary cubic spline curve of interpolation (a)³is is Equation (A.42), rewritten with scalars replaced by points and vectors.

Page 32: GeometricContinuity ofCurvesandSurfaces · 2016. 10. 3. · parametric curves and surfaces, Bézier curves and patches, B-spline curves and patches, Coons patches, cubic splines of

16 2. GEOMETRICCONTINUITYOFCURVES(a)

a0

a1 a7

a8

(b)

�0 D 2

�1 D 8 �7 D 8

�8 D 2

�2 D �3 D �4 D �5 D �6 D �3

Figure 2.5: A cubic spline curve of interpolation of class C 2 (a) and a �-spline curve (b)

varies, which may not be the designer’s intention. ough it is possible to modify the shape bychanging the knots, it is hard, if possible at all, to control the sharpness of the teeth in thisway.⁴ e curve (a) is a special case of a �-spline curve with all parameters �i D 0. e curve (b) isa result of themodification of the parameters. As the parametrisation is regular (i.e., the first-orderderivative at each point is not the zero vector), the curvature of the entire curve is continuous.

2.3.2 ˇ-SPLINECURVESA generalisation of B-spline curves called ˇ-spline curves was invented by Barsky [1981], who(with DeRose in [1984]) coined the name “geometric continuity” for the subject of this book. eparametrisation of a ˇ-spline curve is continuous, made of polynomial arcs of degree n > 0 and(if the arcs are regular) the curve is of class Gn�1. e representation of the curve has parameters,traditionally denoted by ˇl;1; : : : ; ˇl;n�1, associated with each junction of the arcs. In additionto changing knots and control points, modifications of the curve may be done by changing theseparameters.

DefinitionA ˇ-spline curve of degree n in a d-dimensional space is described by the formula

s.t/ D

N �n�1XiD0

diPni .t/; t 2 Œun; uN �n�: (2.16)

⁴Often a cubic spline curve of interpolation with a good shape may be obtained after taking such a knot sequence that hi D

uiC1 � ui is proportional to the square root of the distance between the points ai and aiC1 for all i . In the example discussedhere this idea produces equidistant knots, and the result may be seen.