Numerical algorithms for curve approximation and novel user oriented interactive tools

Size: px
Start display at page:

Download "Numerical algorithms for curve approximation and novel user oriented interactive tools"

Transcription

1 UNIVERSITÀ DEGLI STUDI DI BARI Dottorato di Ricerca in Matematica XXI Ciclo A.A. 2008/2009 Settore Scientifico-Disciplinare: MAT/08 Analisi Numerica Tesi di Dottorato Numerical algorithms for curve approximation and novel user oriented interactive tools Candidato: Loredana Chieppa Supervisori della tesi: Prof. Giovanni Di Lena Prof. Michele Fiorentino Prof. Antonio E. Uva Coordinatore del Dottorato di Ricerca: Prof. Luciano Lopez

2

3 iii To my parents Ai miei genitori

4

5 Contents Acknowledgements Introduction xi xiii 1 Background and literature review Curve representation Bézier curves B-spline curve Wavelets analysis History Mathematical definition Wavelet for Computer Graphics Wavelet as new language Multiresolution analysis Multiresolution curve Part one: B-spline Curve Approximation with Optimal Knots Introduction Preliminaries Extension to the not convex functions Optimal knots for plane curves Optimal knots for cubic B-spline Application to knot removal tool Numerical examples Convex functions approximation Not Convex functions approximation Plane curves approximation Knot removal application

6 vi 4 Part two: 2D sketching using multiresolution approach Introduction Sketch curve style Related work The proposed approach Multiresolution Engine Multi-level Segmentation Smoothing with continuity constraints Implementation and examples 85 Conclusion and future work 89 Bibliography 93 Index 97

7 List of Figures 1.1 Bézier curves of various degree (left) The example of uniform B-spline curve. (right) The basis functions of uniform cubic B-spline A mother wavelet and two daughters The filter bank Convex function Convex function: catenary Not convex function Not convex function Curve plane: spiral function Convex function rotation Not convex function rotation Curve plane rotation Knot removal method: example Knot removal method: example Knot removal method: example Knot removal method: example Style sketches for a car bodies Sketches and character lines of cars model Sketches of car model Graphic tablet device for digital design Original curve with 11 control points Original curve and its coarse version with 7 control points Original curve and its coarse version with 4 control points The original curve C(t) The original curve (11 control points) and its coarse version (4 control points)

8 viii 4.10 The segmentation points Normalized graph of distances and threshold at Segmentation point refinement from seven (top) to four (bottom) User interface for intuitive sketching Synthetic curve segmentation: test A Synthetic curve segmentation: test B Synthetic curve segmentation: test C Synthetic curve segmentation: test D Car body sketch with a graphic tablet Segmentation of the car outline Original car sketch profile (sedan) Seven features points detected on the sketched profile New sketch car profile generated by a CAD designer Feature points detected by system after segmentation Curve extracted by profile of the car in Figure 5.5 after segmentation Example of local simplification of a sketch section: original and smoothed Example of local simplification of a sketch section: original and smoothed with C 1 constraint

9 List of Tables 3.1 Uniform knots Not uniform knots Not convex function Resnorm values Test functions errors Standard and optimal errors

10

11 Acknowledgements Foremost, I would like to extend my deepest gratitude to my supervisor Professor Giovanni Di Lena of University of Study - Bari, for giving me the opportunity to undertake research work in the field of applied mathematics to Computer Graphic. I thank him for providing me with the opportunity to complete my PhD thesis at University of Bari, and for giving me the mathematics basis to work in this not easy research field. I am also grateful to Prof. Nicoletta Del Buono for supporting me during my PhD period at University of Bari and for her assistance during writing out of my thesis. I especially want to thank Professor Giuseppe Monno and my advisors Prof. Michele Fiorentino and Prof. Antonio E. Uva of Department of Mechanical Engineering, Polytechnic of Bari, whose support and guidance made my thesis work possible. They have been actively interested in my work and have always been available to advise me. I am very grateful for their patience, motivation, enthusiasm, and immense knowledge in the Computer graphics applications. I am also grateful to my friend, industrial designer, Tony Azzella, for introducing me to the wonderful world of applied mathematics to computer graphics. Special thanks, also, to my family and to my boyfriend Francesco for their understanding, patience and support during the entire period of my study.

12 xii

13 Introduction The present work is concerned with two particular aspects in the large field of numerical approximation in the area of Computer Graphics (CG). In particular we study the approximation of plane curves with optimal knots and the develop of sketch style curves using multiresolution approach. These two aspects, apparently independent of each other, can be regarded as tools of a single system opportunely designed to tackle problems in field of interactive sketch style curves. In the Computer Graphics area the approximation of curves or surfaces is an important field on which concentrate mathematical studies. The continuous challenge is to find more and more approximation techniques that are competitive both in term of mathematic flexibility and algorithmic performance. Exactly from this point of view, in the previous decades a series of techniques have been developed in order to obtain tools characterized by an increasing computational power and reduced costs. This thesis takes its place in the active research area of Computer Graphics and have two main aims: firstly the mathematical investigation of the problem of the optimal knots curve approximation and secondly the development of proper mechanism to sketch style curves. In order to obtain these aims we divided this work in two main parts. In the first part the plane curves approximation problem is tacked using the concept of optimal knots sequence as suggested in the work of Hamideh in [14]. We started searching first optimal knots sequence for not convex function until arriving to determine a method to approximate curves plane with optimal knots. Furthermore this optimal representation can be useful as a better alternative in some applications as, for example, the knot elimination. The second part of the thesis, instead, is mainly devoted on the study of the sketch style curves. At the present time, the market value of products depends more and more on aesthetic and ergonomic aspects. In spite of this, desktop CAD software does not assist well in the definition and adjustment of free

14 xiv Introduction form curves to improve beauty and the success of products. This explains the extensive use in industry of manual sketches on paper. For these reasons we have developed and evaluated innovative methods and algorithms for the interactive generation of quality 2D freeform curves with graphics tablet input. The proposed system uses multiresolution analysis based on wavelets, as a mathematical support technique in the sketching procedure. This multiresolution approach is the basis of this second part: by using and improving its potentiality with new techniques discussed and implemented in this thesis, we introduce a 2D sketching framework using a novel user oriented algorithm to segment, edit and smooth free-form curves. In the following sections we give firstly an overview on the background and literature review regarding the topics of this thesis and then we analyze and go into details first on the B-spline curve approximation with optimal knots and then on 2D sketching using multiresolution approach. Furthermore, we show some examples and implementation of both procedures.

15 Chapter 1 Background and literature review The goal of Computer Graphics is to produce pictures or images by computer with the help of mathematical computation. It is a rapidly expanding field of computer science, with application in a variety of areas including film and television post production, computer entertainment, engineering and medical data visualization, image processing and virtual reality, architecture and computer aided design. From the earliest text character images of a non-graphic mainframe computers to the latest photographic quality images of a high resolution personal computers, from vector displays to raster displays, from 2D input to 3D input and beyond, computer graphics has gone through its short, rapid changing history. Moreover the power and flexibility of graphics hardware and software is constantly improving, making this an exciting and dynamic area to work in. Computer technology is, also, widely used in daily activities, such as filmmaking, publishing, banking, engineering, and education. Engineers and architects use computers to design images or products and computer-aided design (CAD) and computer-aided manufacture (CAM) are two important areas where computer graphics plays a central role. Both (CAD) and (CAM) are widely used in aerospace, automotive engineering, marine engineering, civil engineering, and electronic engineering, just to mention some areas in which they are important. The application of computer graphics in engineering constitutes the foundation of computer aided geometric design (CAGD), which provides the mathematical basis to describe and process geometric shapes and data.

16 2 Chapter 1. Literature review As we have seen CG is at the center of many important research fields, so it is important to find new methods and applications. In this chapter we give a brief overview on the mathematical functions, used in this thesis, that are at the base of many CG applications. In particular, we present some common methods of spline approximation as Bézier and B- spline curves and then we introduce wavelet approach for Computer Graphics and multiresolution analysis which is intimately connected with the study of wavelets. These curves representation and wavelet approach will be used and showed in the numerical applications presented in this thesis. 1.1 Curve representation Since the birth of Computer Graphics, it has been graphics developers greatest aspiration to develop something that is as close to reality as possible. A special attention in CG has been directed in the search of better curve representation. The need to represents curves and surfaces arose by need to modeling existing objects (a car, a face, a mountain) and in modeling from scratch, where no preexisting physical object is being represented. The two most common methods of representing curves in geometric modeling are implicit equations and parametric functions. The implicit equation of a curve lying in the xy plane has the form f(x, y) = 0. This equation describes an implicit relationship between the x and y coordinates of the points lying on the curve. An example of implicit equation is given by the circle of unit radius centered at the origin, described by the following equation f(x, y) = x 2 + y 2 1 = 0. (1.1.1) The parametric functions, instead, are defined using parameters. In this case each of the coordinates of a point on the curve is represented separately as an explicit function of an independent parameter, that is, C(t) = (x(t), y(t)), t [0, 1]. (1.1.2)

17 3 For example, one set of parametric equations for the unit circle are: { x(t) = cos(t), y(t) = sin(t). (1.1.3) It is important to mention that the parametric representation of a curve is not unique. It is difficult to decide which of the two given representations of the same curve is the best to describe it; they could present both advantages and disadvantages. From a detailed analysis showed that the parametric form is more natural for designing and representing shape in a computer. However, as the coordinates parametric functions are arbitrary, is obvious to ask what is the best representation to choose. The ideal situation, that compensates implementation problems with an efficient representation of the curves, consists in the choose functions that: are capable of precisely representing all the curves the users of the system need; are easily, efficiently and accurately processed in a computer; are simple and mathematically well understood; A widely used class of functions that satisfy the last two criteria is the polynomials. Two common mechanism to express polynomial functions are: power basis, Bézier curves. These two methods are mathematically equivalent, but the Bézier method is far better suited to representing and manipulating shape in a computer. Let see in more details the Bézier representation. Bézier curves This spline approximation method was developed, in the late 1960s, by the French engineer Pierre Bézier for use in the design of automobile bodies while

18 4 Chapter 1. Literature review working for the car manufacturer Renault. Bézier curves have a number of properties that make them highly useful and convenient for curve and surface design. Furthermore they are also easy to implement, so, for these reasons Bézier curves are widely available in various CAD systems and in assorted drawing and painting packages. As we have said previously a Bézier curve is a parametric polynomial curve. We can define an nth-degree Bézier curve as: so that C(t) : [0, 1] R 2, (1.1.4) C(t) = n B k n (t)p k; (1.1.5) k=0 where P 0, P 1,...,P n 1, P n are called control points and the basis functions (also called blending functions) B k n (t) are the classical nth-degree Bernstein polynomials given by: B n k (t) = n! k!(n k)! tk (1 t) n k. (1.1.6) In any curve representation scheme, the choice of basis functions determines the geometric characteristics of the scheme. The Bernstein polynomial functions have the following properties: Positivity: B n k (t) 0 k = 0,...,n; B n 0 (0) = B n n(1) = 1; B k n(0) = B k n (1) = 0, k = 1,...,n 1; B k n (t) attains exactly one maximum on the interval [0, 1]. In particular it can be proven that the maximum occurs at the point t = k n. Partition of unity: n n ( ) n B k n (t) = (1 t) n k t k = (1 t + t) n = 1. k k=0 k

19 5 Symmetry: for any n, the set polynomials { B k n (t)} is symmetric with respect to t = 1 2. Derivatives: d dt B k n d dt B 0 n (0) = n; d dt B 1 n (0) = n; d (t) = n( B n 1 k 1 dt B n(1) n = n; d dt B n 1(1) n = n; n 1 (t) B (t)); d dt B k n (k ) = 0; 0 < k < n (1.1.7) n recursive definition: by using the following formula ( ) ( )( ) n n 1 n 1 =, k k k 1 the Bernstein polynomials can be generated by the recursive formula: B n k n 1 (t) = (1 t) B k (t) + t k n 1 B k 1 (t). (1.1.8) We have enumerated the principal properties of the basis functions, now we are going to describe properties that are satisfied by the Bézier curves: Endpoint interpolation: A very useful property of a Bézier curve of nthdegree is that it always passes through the first and last control points. That is, the boundary conditions at two ends of the curve are: C(0) = P 0 ; C(1) = P n ;

20 6 Chapter 1. Literature review Furthermore, the values of the parametric first derivatives of a Bézier curve at the endpoints can be calculated from control point coordinates as: C (0) = n(p 1 P 0 ); C (1) = n(p n 1 P n ); Thus, the slope at the beginning of the curve is along the line joining the first two control points and the slope at the end of the curve is along the line joining the last two endpoints. Convex hull: The curve is contained in the convex polygon generated by the convex closure of its control points. This property is known as convex hull property and follows from the blending functions properties: positivity and partition of unity. Affine invariance: Bézier curves are invariant under affine parameter transformations. That is, while the curve is usually defined on the parametric interval [0,1], a simple affine transformation on the parameters to the interval [a,b] yields the same curve. Closed curve: If P 0 = P n the curve is closed and presents, in general, a singular point (cusp) in the connection point. If the three points P 1, P 0 = P n, P n 1 are aligned the curve is smooth (that is, the tangent vectors at t = 0 and t = 1 have the same direction). We observe that for: - n = 1, we have B 0 1(t) = 1 t and B 1 1 (t) = t, so the Bézier curve of first-degree has the following expression: C(t) = (1 t)p 0 + tp 1. (1.1.9) This is a straight line segment connecting the control points from P 0 and P 1 ; - n = 2, we have: C(t) = (1 t) 2 P 0 + 2t(1 t)p 1 + t 2 P 2, (1.1.10) This is a parabolic arc connecting the control points from from P 0 to P 2 ;

21 7 - n = 3, we have: C(t) = (1 t) 3 P 0 + 3t(1 t) 2 P 1 + 3t 2 (1 t)p 2 + t 3 P 3. (1.1.11) This is a cubic Bézier curve. Figure 1.1 shows sample curves of degree one through four. A degree n Bezier curve has n + 1 control points. Figure 1.1: Bézier curves of various degree We will use linear and quadratic Bézier curve representation in the section 4.7, as skeleton curve to construct coarse versions of a curve during the smoothing phase, that satisfy continuity constraints at its endpoints. In the next section we recall the definition and some important properties of another curve representation called B-spline curve. B-spline curve B-splines is a different approach to representing piecewise polynomial curves and they are the most widely used class of approximating splines. Now we see how B-spline representation has better geometric properties respect to Bézier curves. As already observed the Bézier curves consist of just one polynomial segment. There are several reasons which can be addressed to demonstrated the inadequacy of Bézier representation in several circumstances: when a large number of constraints must be satisfied a Bézier curve with

22 8 Chapter 1. Literature review a high degree, is required. However these curves are inefficient to be computed and are numerically unstable; the Bézier curves are not well-suited to interactive shape design; the Bézier curves do not possess a sufficiently local control. To overcome these drawbacks we have to consider the B-spline curves. Before to construct B-spline curve and see how they are defined, we have to introduce a new entity, knot vector, and firstly define the B-spline basis (or blending) functions. Let us consider an increasing sequence of m + 1 real numbers: U = {u 0 u 1... u m 1 u m }; where u i are called the knots and U the knot vector, then the B-spline function of p-th degree (or order p+1), with k = 0,...,m (p+1) can be defined as: B p k : [u 0, u m ] R; (1.1.12) and it possesses the following properties, for all t [u 0, u m ]: Positivity: B p k (t) 0, k = 0...,m (p + 1); Partition of unity: m (p+1) B p k k=0 (t) = 1; Linear independence: m (p+1) B p k k=0 (t) are linearly independent; Local support: supp(b p k ) = [u k, u k+(p+1) ], that is its support consists of p+2 consecutive knots. These properties of the B-spline basis functions are very important because their determine the many desirable geometric characteristics in B-spline curve. The shapes of the Bk n basis functions are entirely determined by the relative spacing between the knots (u 0, u 1,...,u m ). Scaling or translating the knot vector has no effect on shapes of the basis functions and the B-spline. There are several ways to define B-spline basis functions, e.g. by divided differences of truncated power functions, by blossoming and by a recurrence

23 9 formula. The last one way is the most useful for computer implementation. The k-th B-spline basis function of p-degree (order p + 1) can be defined by the Cox-deBoor recursion formula as: B 0 k (t) = { 1, uk t < u k+1, 0, otherwise. B p k (t) = t u k B p 1 u k+p u k (t) + u k+p+1 t B p 1 k u k+p+1 u k+1 (t), (1.1.13) k+1 for k = 0,...,m 1. The recursive definition (1.1.13) outlines that the B-spline functions (the space that they generate), belong to a space of piecewise polynomial functions with polynomial of degree p. Furthermore in the recursive formulation (1.1.13) it has been adopted the convention that the indeterminate form 0 0 is equal to zero. The indeterminate form is held to zero to prevent the inconsistent form that arises, for example, when u k = u k+p. With this convention the recursive formula is well suited. Although the B- spline functions are formally defined on the real axes, the B-spline of degree p are considered only on the interval [u p, u m p ]. It is also important give a formula to calculate the derivatives of B-spline basis functions. So, the ith derivative of B p k (t) is given by the general formula: ( (B p (B p 1 k )(i) k ) (i 1) ) = p (Bp 1 k+1 )(i 1) u k+p u k u k+p+1 u k+1 (1.1.14) If some consecutive knots coincide, the number of equal points is called knot multiplicity. This nomenclature can be extended also in the case of a knot subsequence: u k u k+1... u k+p u k+p+1 in which case we will refer to as knot multiplicity with respect to the subsequence. The knots individuate points on the real line; these points are the knots projections on the real line, so, to distinguish these one from the knots they will be called, sometimes, breakpoints. Generally the knot vectors can be uniform, open uniform and non-uniform

24 10 Chapter 1. Literature review distributed. Uniform knot vectors are those vectors for which the distance between two subsequent points, i.e., u i+1 u i is constant, e.g. [0, 1, 2, 3, 4, 5]. In this case the B-splines are called uniform according to to the knot-vector class. Uniform B-splines have periodic basis functions. That is, all basis functions have the same shape, each successive basis function is simply a shifted version of the previous function. Open Uniform knot vectors are uniform knot vectors which have n-equal knot values at each end: u i = u 1, i < n u i+1 u i = const, p i < k + 1 u i = u k+n, i k + 1 e.g. [0, 0, 0, 1, 2, 3, 4, 4, 4], (n=3, k=5). The B-spline curves characterized by this knot-vector, called open uniform B-splines have characteristic that are very similar to Bézier splines. In fact when the p-degree of the polynomial is n, open uniform B-splines reduce to Bézier splines. Furthermore, the polynomial curve for an open B-spline passes through the first and last control points. Finally, non-uniform knot vectors are defined by the only constraint: e.g. [0, 1, 2, 3, 3, 4]. u i u i+1, With unequally spaced intervals in the knot vector, we obtain different shapes for the basis functions in different intervals. Nonuniform B-splines provide increased flexibility in controlling a curve shape. If the knot vector does not have any particular structure, the generated curve will not touch the first and last legs of the control polyline. According to the behavior of a Bézier curve at its end points, we could like to ensure that the curve has tangents to the first and the last legs at the first and last control points, respectively. In order to do so, the first knot and the last knot must be of multiplicity p + 1. This will generate the so-called clamped B-spline curves. By repeating some knots and control points, the generated curve can be a closed one. In this case, the starting and the ending point of the generated curve join together forming a closed loop.

25 11 The B-spline functions of p-degree are polynomial of degree not higher than p in each interval individuated by two consecutive breakpoints, and so they are formally defined on the open set formed by these intervals. Using the derivation rules and a recursive formula, we can prove the following result: d dt Bp Bp 1 k (t) B p 1 k+1 k (t) = p p (t). (1.1.15) u k+p u k u k+p+1 u k+1 In the formula (1.1.15) has been used the convention that the indeterminate form 0 0 is considered equal to zero. Now we can construct a B-spline curves: a pth-degree B-spline curve is defined by C(t) = n B p k (t)p k (1.1.16) k=0 with t [0, 1], where P k are the control points, B p k (t) are the pth-degree B-spline basis functions defined on the nonperiodic knot vector: U = {u 0,...,u p, u p+1,...,u m p 1, u m p,...,u m } with m + 1 knots so defined 0 = u 0 =... = u p < u p+1 <... < u m p 1 < u m p =... = u m = 1 This curve representation is largely used in many CG applications because it has many desirable properties that make it a valid and important toll. Now we see some important properties of B-spline curve as defined in : C(t) is a pth-degree piecewise polynomial curve with n+1 control points and m + 1 knots where m = n + p + 1; Endpoint interpolation: C(0) = P 0 (1.1.17) C(1) = P n. (1.1.18)

26 12 Chapter 1. Literature review The first derivatives at the endpoints of a B-spline curve are given by: C (1) = C (0) = p u p+1 u p (P 1 P 0 ), (1.1.19) p u m p u m p 1 (P n P n 1 ). (1.1.20) Affine invariance: an affine transformation (translation, rotation, scale and shear) is applied to the curve by applying it to the control points. Strong convex hull property: a B-spline curve is contained in the convex hull of its control polyline. More specifically, if t is in knot span [u i, u i+1 [, then C(t) is in the convex hull of control points P i p, P i p+1,...,p i. Local modification: changing the position of control point P i only affects the curve C(t) on interval [u i, u i+p+1 [. Variation diminishing property: if the curve is in a plane this means no straight line intersects a B-spline curve more times than it intersects the curve s control polyline. In this thesis, we use the B-spline curve, in particular the cubic B-spline curve, both in the first part and in the second part. In the second part, in particular, we use uniform B-spline to perform multiresolution curve analysis. In the following figure we show an example of cubic B-spline and its basis functions. Figure 1.2: (left) The example of uniform B-spline curve. (right) The basis functions of uniform cubic B-spline.

27 Wavelets analysis History Wavelets are functions that satisfy certain mathematical requirements and are used in representing data or other functions. This idea is not new. Approximation using superposition of functions has existed since the early 1800 s, when Joseph Fourier discovered that he could superpose sines and cosines to represent other functions. However, in wavelet analysis, the scale that we use to look at data plays a special role. Wavelet algorithms process data at different scales or resolutions. If we look at a signal with a large window, we would notice gross features. Similarly, if we look at a signal with a small window, we would notice small features. The result in wavelet analysis is to see both small and large window. The Wavelets were proposed in the 1980 s as an alternative to the Fourier transforms for signal analysis, and were initially used for representing seismic signal. In fact, the term wavelet was coined by Ricker in 1940 ([28]) to describe the disturbance that proceeds outward from a sharp seismic impulse or explosive charge. However, only in the middle of 1980 s their mathematic theory was formalized in a rigorous manner. The Wavelets are now used as a mathematical tool for hierarchically decomposing functions. They allow any function to be decomposed in terms of a coarse overall shape, plus details that range from broad to narrow. Mathematical definition Definition A wavelet is a function ψ(t) L 2 (R) such that the family of functions ψ j,k (t) =: 2 j/2 ψ(2 j t k) where j and k are arbitrary integers, is an orthonormal basis in the Hilbert space L 2 (R). An orthonormal, compactly supported wavelet basis of L 2 (R) is formed by the dilation and translation of a single function ψ that satisfies the following two-scale difference equation ψ(t) = i p i ψ(2t i) (1.2.1)

28 14 Chapter 1. Literature review where p i is a set of coefficients. The wavelet function has a companion, the scaling function, which also forms a set of orthonormal bases of L 2 (R) φ j,k (t) =: 2 j/2 φ(2 j t k) The scaling function φ also satisfies the two-scale difference equation ψ(t) = i q i ψ(2t i) (1.2.2) where q i is a set of coefficients. Good wavelet are usually constructed starting from a multiresolution analysis. Let us give a definition of this concept. Definition A multiresolution analysis is a sequence {V j } j Z of subspaces of L 2 (R) such that i)... V 1 V 0 V 1... ii) span j Z V j = L 2 (R) iii) f(x) V j if and only if f(2 j x) V 0,i.e. the spaces V j are scaled versions of the central space V 0 iv) f V 0 if and only if f(x m) V 0 for all m Z,that is, V 0 (and hence all the V j ) is invariant under translation. v) there exists a function φ V 0, called scaling function, such that the system {φ(t m)} m Z is an orthonormal basis in V 0 Wavelet for Computer Graphics Several researches in CG have been centered around the use of wavelets. The ideas of multiple levels of resolution, or so called level of detail modeling, have been largely used in CG as in many other disciplines. Thus, when wavelets moved from a mathematical analysis tool to a practical computational tool, they were quickly put to use in CG. The Wavelets can be applied to a wide variety of objects used in graphics, as we point out in the following list:

29 15 Image Processing: some of most powerful compression techniques are based on wavelet transforms; Global Illumination: radiosity and radiance algorithms, that are based on wavelets are asymptotically faster than other finite element methods; Hierarchical Modeling: the use of multiresolution representations for curves and surfaces accelerates and simplifies many applications of editing; Animation: the large constrained optimization tasks which arise in physically based modeling and animation subject to goal constraints can be resolved faster and more robustly with wavelets; Volume Rendering and Processing: the wavelets can simplify the treatment of very large data sets because they can be used as well as feature detection and enhancement; Multiresolution Painting: the use of multiresolution analysis one can build efficient infinite resolution paint systems; Image Query: the use of a small number of the largest wavelet coefficients of an image, gives the opportunity of accelerating searching and retrieval systems. There are several reasons for the enthusiastic welcome wavelet based algorithms have received in CG. Foremost stand the huge computational demands of CG applications. Geometric models, for example, are often built from a large number of primitive elements in order to achieve some desired level of fidelity with respect to a real world object. At the same time, users would desire that all the manipulations and the computations which involve these objects occur interactively, that is, with the screen updates occurring multiple times per second. Similarly, the shading and the motion of these objects should appear realistic. Depending on the number and the complexity of objects appearing in a scene, this can lead to very expensive algorithms. Some examples include the modeling of constrained dynamical systems, the deformation of objects under forces, and the indirect illumination effects. Performing the necessary computations under the constraints of interactivity demands the as efficient algorithms as possible, and the application of some shrewd approximations which permit to preserve a perceived realism. Due to the ability of wavelets to represent compactly functions and data sets within user specified error bounds they are a natural tool to be considered. Their zooming

30 16 Chapter 1. Literature review in ability allows the use of just enough precision in a given region of interest, allowing at the same time coarse representations in regions outside the immediate area of interest. Even more importantly, they facilitate a smooth tradeoff between computation time and resulting simulation quality. Often the algorithms which manipulate these hierarchical objects become asymptotically faster as well, allowing the use of much larger and more complicated scenes with respect to what is possible to treat without this tool. Wavelet as new language The Wavelet take some advantages on the traditional methods like the Fourier analysis especially when the real signal presents some discontinuities. There has been a large interest in studying those functions which approximate discontinuous signals more appropriate with respect to the sin and the cosine functions adopted in the Fourier transform. In fact the deficiencies of Fourier techniques have led researchers in a variety of disciplines to develop various hierarchical representations of functions. This enormous interest, on wavelet theory, in many and different research fields has lead researches to comunicate necessarily between themselves. The mathematician Ingrid Daubechies describes in clear manner what the Wavelets are and how this term became a new communication language among all scientists ([37])....Mathematicians are like the French, the German poet Goethe once remarked. They take whatever you tell them and translate it into their own language - and from then on it is something entirely different. Goethe s observation is as true now as ever. But times may be changing. In the last ten years, mathematicians and researchers in diverse areas of science, engineering and even art have discovered and begun to develop a theoretical language they can all understand. This new common language is sparking new collaborations. Many mathematicians are now crossing over into such applied areas as signal processing, medical imaging, and speech synthesis. At the same time, much deep but abstract - sounding mathematics is becoming accessible to researchers in fields from geophysics to electrical engineering. The new language is wavelet theory. Those who speak it it describe

31 17 wavelets as powerful new tools for analyzing data. Wavelet theory serves as a kind of numerical zoom lens, able to focus tightly on interesting patches of data - but without losing sight of mathematical forest while attending to the trees, twigs, buds, and grains of pollen... Mathematically, wavelets are an offshoot of the theory of Fourier analysis. Introduced by the French mathematician Joseph Fourier in his essay Theorie analytique de la chaleur (analytic theory of heat), published in Fourier analysis seeks, with great success, to understand complicated phenomena by breaking them into mathematically simple components. The fundamental idea is to take a function and express it as a sum of trigonometric sine and cosine waves of various frequencies and amplitudes. The familiar and well- understood trigonometric functions are easy to analyze. By combining information about a function s sine and cosine components, properties of the function itself are easily deduced, at least in principle. Fourier analysis is among mathematics most widely used theories. It is especially suited to analyzing periodic phenomena, periodicity being the most prominent property of sines and cosines. But even so, the theory has its limitations and its pitfalls. The main problem is that finding detailed information about a function requires looking at a huge number of its infinitely many Fourier components. For example, a transient blip obvious in a graph, is impossible to recognize from its effect on a single component. The reason, in essence, is that each sine and cosine wave undulates infinitely in both directions: thus a single wave can t help locate anything. Indeed the sharper the blip, the more Fourier components are needed to describe it. Wavelet theory takes a different approach. Instead of working with the infinitely undulating sine and cosine waves, wavelet analysis relies on translations and dilations of a suitably chosen mother wavelet that is concentrated in a finite interval. Almost any function can serve as the mother wavelet: this makes wavelet theory more flexible than traditional Fourier analysis. Daughter wavelets are formed by translating, or shifting, the mother wavelet by unit steps and by contracting or expanding it by powers of two (see Figure 1.3). One then expresses other functions as combinations of wavelets,

32 18 Chapter 1. Literature review Figure 1.3: A mother wavelet and two daughters just as Fourier analysis represents functions by combining sines and cosines. The fact that the mother wavelet is concentrated in a finite interval gives wavelet theory its zoom-in capability:an interesting blip in a function can be analyzed by looking at increasingly contracted copies of the mother wavelet in the vicinity of the blip. Many of the ideas underlying wavelet theory have been around for decades, but the subject itself got off the ground only recently. The story starts in the early 1980s in France, when wavelets were introduced by geophysicist Jean Morlet and mathematical physicist Alexander Grossmann. In 1985, mathematician Yves Meyer constructed a family of wavelets with two highly desirable mathematical properties called smoothness and orthogonality.(interestingly, J. O. Stromberg at the University of Tromso in Norway had constructed such a family several years earlier, but the connection with the nascent theory of wavelets was not realized until after Meyer s work.) The following year, Meyer and Stephane Mallat gave the subject a solid foundation with a theory of multiresolution analysis. Then in 1987, Daubechies constructed a family of wavelet that, in addition to being smooth and orthogonal, were identically zero outside a finite interval. Daubechies s construction opened up the field. Compactly supported wavelets are now easy to come by, and are

33 among the most commonly used in applications. And applications are abundant. Wavelets are being tested for use in everything from digital image enhancement- making blurry pictures sharp- to new methods in numerical analysis (itself widely used in scientific computing). They re a very versatile tool says Daubechies. Not all the applications will pan out, but many will, and some already have. There are some very nice success stories Daubechies adds. One such story may have far- reaching effects, especially for the next generation of criminals. The Federal Bureau of Investigation has adopted a wavelet-based standard for computerizing its fingerprint files. The FBI has around 200 million fingerprint cards on file, according to Peter Higgins, is to digitize the files, store them electronically, and put [them] in something that would fit in a foot room. It sounds easy: after all, entire encyclopedias now fit on a compact disk with room to spare. But that s words. Images are something else. At a resolution of 500 pixels per inch. a standard fingerprint card contains nearly 10 megabytes of data. Transmitting that much information over a modem-something the police would like to be able to do takes hours at today s transmission rates...what s needed is some way to compress the data on a fingerprint card without distorting the picture. That s where wavelets come in. By treating the fingerprint image as a two- dimensional function, it s possible to represent it with a combination of wavelets. With a suitably chosen family of wavelets, only a relative handful are needed to represent a fingerprint, and the contribution of each wavelet can be rounded off, or quantized, which reduces the amount of data that needs to be stored or transmitted... 19

34 20 Chapter 1. Literature review 1.3 Multiresolution analysis Multiresolution curve The multiresolution techniques and the use of hierarchy have a long history in CG. In particular, the multiresolution plays a fundamental role for CAD curves representation as B-spline. This technique is a certain way of handling cubic B-splines, which allows to do many things, that are not possible or very complicated with spline techniques. Some of the key-features of multiresolution curves are: smoothing through changing the level of resolution editing the overall sweep of the curve without changing its character editing the character of the curve without changing its overall sweep The key idea of multiresolution curves is to take cubic B-spline control points and apply filter bank decomposition from multiresolution analysis. This means defining a filter-bank: a set of matrices presenting averaging scheme for each level of resolution. By applying decomposition matrices to the initial control polygon we get the control polygon on the lowest level and a set of detail coefficients for every successful level. By applying reconstruction matrices on the latter you can get the control points of the curve at any level. In order to understand better the working mechanism underlying this technique, in the following section we provide an overview of the multiresolution analysis applied to curves. A function or a signal can be viewed as composed by a smooth background and some fluctuations or details on top of it. The distinction between the smooth part and the details is determined by the resolution, that is, by the level below which the details of a signal cannot be discerned. At a given resolution, a function is approximated by ignoring all fluctuations below the resolution scale. We can imagine to progressively increase the resolution: at each stage of the increase in the resolution, finer details are added to the coarser description, providing successively better approximations to the original function. In our case, given a B-spline curve f(u) with m control points, a multiresolution framework constructs the approximating curve with the least squared error using m control points with m < m. We consider that these

35 21 are endpoint-interpolating uniform B-spline curves. We summarize the multiresolution framework considering the general case. Let C n be a discrete signal expressed as a column vector of samples c n 1, cn 2,.., cn m C n = [c n 1, c n 2,.., c n m] T, that in our application are the control points of the curve. We want to construct a low-resolution version C n 1 of C n with a number of samples m < m. The process for creating the m samples of C n 1 uses some form of filtering and down-sampling that can be expressed by the following matrix equation: C n 1 = A n C n, (1.3.1) where A n is an m m matrix. The detail D n 1 lost in this filtering process can be captured by the following equation: D n 1 = B n C n, (1.3.2) where B n is a (m m ) m matrix which is related to the matrix A n. This process, that splits C n into a low-resolution version C n 1 and detail D n 1, is called decomposition. If A n and B n are correctly chosen, we can reconstruct the initial signal C n using another pair of matrices P n and Q n called synthesis filters, as follows: C n = P n C n 1 + Q n D n 1. (1.3.3) The process is called reconstruction. If we recursively apply the same splitting procedure to the signal C n 1, we obtain a hierarchy of lower-resolution signals C 0, C 1,...,C n 1 and details D 0, D 1,...,D n 1. This recursive process is known as a filter bank (Figure 1.4). So, C n can be recovered from the sequence C 0, D 0, D 1,...,D n 1. This transformation is known as a wavelet transform. All that is needed for a wavelet transform is an appropriate set of analysis and synthesis filters A j, B j, P j and Q j. To calculate these filters, we associate with each signal C n (for the B-spline curves these are the vectors of control points), a functions f n (u), with u [0, 1] given by: f n (u) = φ n C n,

36 22 Chapter 1. Literature review Figure 1.4: The filter bank where φ n is a row matrix of basis functions called scaling function that are the endpoint-interpolating B-splines basis functions for the curves. These functions posses an important property: they have to be refinable; that is, for all j [0, n] : φ j 1 = φ j P j. (1.3.4) In other words, each scaling function at level j 1 must be expressible as a linear combination of finer scaling functions at level j. Next, let V j be the linear space spanned by the set of scaling functions j. The refinement condition on j implies that these linear spaces are nested. If we choose an proper inner product for the basis functions in V j we are able to define W j as the orthogonal complement of V j in V j+1. The basis functions j of the space W j, called wavelets, are such that φ j and ψ j together form a basis for V j+1. We can now construct the synthesis filter Q j as the matrix that satisfies: ψ j 1 = φ j Q j. (1.3.5) The equations and can be expressed as a single equation by concatenating the matrices together: [Φ j 1 Ψ j 1 ] = Φ j [P j Q j ] The analysis filters A j and B j instead, are formed by the matrices satisfying the inverse relation: [ ] A [Φ j 1 Ψ j 1 j ] = Φ j By this two matrix equations we can write the following relation: [ ] A j = [P j Q j ] 1 B j B j

37 [ ] A where j and [P j Q j ] 1 are both square matrices. B j We have seen an overview on wavelet and multiresolution analysis that we will use in the second part of this thesis when we analyze the smoothing and segmentation phase in the sketch curve phases. To construct multiresolution curve procedure we need that the work space have particular property as for example that the spaces of the basis functions are nested. As we have seen in the section 1.1, the basis functions of the B-spline curve are defined recursively and hence they have this property. Furthermore the fact that the B-spline basis functions are locally supported, influence the sparsity of the refinement matrix P j. These and other property make B-spline curve representation suitable for wavelet and multiresolution analysis. Now, we can see in more detail how, all these mathematical entity, are used in the two research fields presented in this thesis. 23

38 24 Chapter 1. Literature review

39 Chapter 2 Part one: B-spline Curve Approximation with Optimal Knots 2.1 Introduction This chapter concerns with an algorithm for constructing suitable configuration of knot sets for the linear B-splines. The aim is to determine optimal positions for the knots, in order to approximate arbitrary functions in the L 1 norm. Starting from some known results on the approximation of strictly convex functions with linear splines, we construct linear approximations for not convex functions and plane curves. Furthermore, we apply the proposed approach to approximate cubic B-splines with optimal knots and to achieved a better curve approximation after knots removal. Some numerical experiments that illustrating the performance of the presented algorithm are also showed. In particular we extend to a not convex function the L 1 approximation of strictly convex functions by means of second order splines, and then we present some applications of this extension. The section 2.2 gives an overview of the problem, already studied by [18], subsequently, the section 2.3 and 2.4 are devoted to the extension of linear approximations to a not convex functions and plane curves, respectively. The section 2.5 and 2.6 are dedicated to applications of the methods described

40 26 Chapter 2. Approximation with Optimal Knots in the previous sections, to obtain better cubic B-spline approximations after some knots removal. Finally, in the chapter 3 some numerical examples are provided. 2.2 Preliminaries Let [a, b] an interval on the real axis and let S 2 (U) be the space of the second order spline with U = {u 0,...,u n+1 } set of knots in [a, b], with a = u 0 = u 1 < < u n = u n+1 = b and with the B-spline basis functions B 1 0,...,B1 n 1. Let C(t) S 2 (U) be a linear B-spline with knots set U, then we can rewrite it as follows: n 1 C(t) = α i Bi 1 (t) where α i are coefficients. The problem we are going to tackle can we formalize as follows. i=0 Problem 1. Let f be a function, f C[a, b], we want to approximate f by second order spline functions, i.e., we want to find a C (t) with knots set U such that: b a f(x) C (t) dx b a f(x) C(t) dx for all set of knots U in [a, b] and functions C(t) S 2 (U). Firstly, we recall the results obtained in [14] and [18]. In these works a preliminary solution at the Problem 1 is proposed by considering f to be strictly convex function in [a, b]. The optimal L 1 approximation straight line can be determined easily with the following result:

41 27 Lemma For any strictly convex function f C[a, b], the optimal straight line approximation to f in [a, b] interpolates f at points one-quarter and three-quarters between a and b. Proof. If we consider the theorem mentioned in Rice [27], the optimal L 1 approximation straight line can be determined according to that theorem. So, the interpolating points β 1 and β 2 are the roots of the following equations: where β1 a β2 b φ i (x)dx β 1 φ i (x)dx + φ i (x)dx β 2 i = 1, 2 (2.2.1) φ 1 (x) = 1 and φ 2 (x) = x. In 1978 Kioustelidis and Spyropoulos [18] extended the Lemma for strictly convex functions to an arbitrary set of knots. They found the conditions which the set of knots must satisfy in order to obtain the best L 1 linear approximation of a given convex function. As a consequence of this result it can be proved that the approximation is optimal either in the global case, either in the local case, if following system is solved: where f(β i1 ) 3f(β i2 ) + 3f(β i+1,1 ) f(β i+1,2 ) = 0, (2.2.2) β i1 = 3 4 u i u i, β i2 = 1 4 u i u i, (2.2.3) for i = 2,...,n 1. So, the optimal knots are calculated solving (2.2.2), while the vector coefficients α i can be obtained as follows: α i 1 = f(β i2) f(β i1 ) β i2 β i1 (u i β i1 ) + f(β i1 ), i = 2,...,n 1, with α 0 = f(u 0 ) and α n 1 = f(u n+1 ). Since the equations (2.2.2) are equivalent to the continuity conditions at points u i, the following theorem can be stated [18] Theorem Let f C[a, b] be a strictly convex function in [a, b], then the only solution of the Problem 1 verifies the system (2.2.2) and the constraint on the knots i.e a < u 1 < u 2 <... < u n 1 < b.

42 28 Chapter 2. Approximation with Optimal Knots According to equations (2.2.2) and (2.2.3), the system describing the continuity conditions for i = 2,...,n 1, is: ( ) ( ) ( ) ( ) 3ui 1 + u i ui 1 + 3u i 3ui + u i+1 ui + 3u i+1 f 3f + 3f f = 0, (2.2.4) with u 0 = u 1 = a and u n = u n+1 = b. The equations (2.2.4) constitute a tri-diagonal system of non-linear equations for the knots, hence it can be solved by some of standard techniques for nonlinear system or by methods used for the solution of a single non-linear equation in one variable. This is possible because each equation in (2.2.4) allows to determinate u i+2 from u i and u i+1. In alternative at previous method in 2002, Hamideh [14], presented a constructive method for locating the optimal knots without the use of the first derivatives. Given the subintervals [u i, u i+1 ] and [u i+1, u i+2 ], and computed the unique piecewise line approximations l i (x) and l i+1 (x) respectively in each subintervals in order to obtaining: l i (x) = f(β i2) f(β i1 ) β i2 β i1 (x β i1 ) + f(β i1 ), they varied the knots so that the approximation becomes a spline by setting u i = {x l i(x) = l i+1 (x)}, i = n 1, n 2,...,1. So they obtained a new set of partition points and with this new sets they began as before and repeated the process. By this procedure the resulting sequence of errors is decreasing and as it is bounded, it is convergent. We can summarize this method by the following algorithm: Algorithm Given a strictly convex function f[a, b] and a set of arbitrary points U = {u 0, u 1,...,u n } such that a = u 0 < u 1 <... < u n = b,

43 29 the algorithm constructs the optimal L 1 approximation lines in the subintervals as follows: for i = 1 to n do Compute the best interpolating points on the i-th interval [u i 1, u i ] as follows β i1 = 3 4 u i u i, β i2 = 1 4 u i u i. Calculate the approximating straight lines Algorithm Set c := 0 Set U (0) = U (0) Repeat until convergence - for i = 1 up to n l i (x) = f(β i2) f(β i1 ) β i2 β i1 (x β i1 ) + f(β i1 ). Use algorithm to calculate the set of straight lines L (c) - for i = n down to 1 Calculate the set of knots U (c) Set c := c + 1. Now, let see the relationship between the first and second method: let be ϕ i (u) = 1 2 (f(β i1) 3f(β i2 ) + 3f(β i+1,1 ) f(β i+1,2 )), (2.2.5)

44 30 Chapter 2. Approximation with Optimal Knots and let be li k (x) = f(βk i2 ) f(βk i1 ) βi2 k (x βi1) k + f(βi1), k βk i1 the best L 1 linear approximation in the interval [u i 1, u i ] at level k (i.e. after k iteration). We impose the following equality: l k i (u k+1 i ) = l k i+1(u k+1 i ), setting m k i = f(βk i2 ) f(βk i1 ) β k i2 βk i1 we have m k i (u k+1 i u k i )+m k i (u k i βi1)+f(β k i1) k = m k i+1(u k+1 i u k i )+m k i+1(u k i βi+1,1)+f(β k i+1,1), k (m k i m k i+1)(u k+1 i u k i ) = f(βi+1,1)+m k k i+1(u k i βi+1,1) (f(β k i1)+m k k i (u k i βi1)) k and hence Since u k+1 i = u k i lk i (uk i ) lk i+1 (uk i ) m k i+1. (2.2.6) mk i ϕ i (u k+1 ) =f(βi1) k + m k i (u k+1 i βi1) k (f(βi+1,1) k + m k i+1(u k+1 i βi+1,1)) k =li+1(u k k+1 i ) li k (u k+1 i ), we can consider ϕ i (u) like l i (x) l i+1 (x) evaluated in the values reported in (2.2.3) and so we can write: ϕ i (β k i1) = f(β k i1) f(β k i+1,1) m k i+1(β k i1 β k i+1,1), (2.2.7) ϕ i (β k i+1,1) = f(β k i1) f(β k i+1,1) + m k i (β k i+1,1 β k i1). (2.2.8)

45 31 Subtracting from obtain m k i m k i+1 = ϕ i(βi+1,1 k ) ϕ i(βi1 k ) βi+1,1 k, βk i1 and therefore we can rewrite the equation (2.2.6) as follows: u k+1 i = u k i ϕ i (u k ) ϕ i (β k i+1,1 ) ϕ i(β k i1 ) β k i+1,1 βk i1. (2.2.9) The previous equation shows that the Hamideh s constructive geometric method is a variation of Jacobi method. 2.3 Extension to the not convex functions In this section a simple method to approximate not convex function is described. For simplicity of notation we drop subscript k. Let us consider two consecutive subintervals [u i 1, u i ] and [u i, u i+1 ] and let (β i1, f(β i1 )), (β i2, f(β i2 )), (β i+1,1, f(β i+1,1 )) and (β i+1,2, f(β i+1,2 )) be the four points that best approximate the function f, two by two, in the previous subintervals. Let, m i = f(β i2) f(β i1 ) β i2 β i1, m i+1 = f(β i+1,2) f(β i+1,1 ) β i+1,2 β i+1,1, m i+ 1 2 = f(β i+1,1) f(β i2 ) β i+1,1 β i2, be the slopes of the lines passing by the given points respectively.

46 32 Chapter 2. Approximation with Optimal Knots Let l i (x) = f(β i2 ) + m i (x β i2 ), (2.3.1) l i+1 (x) = f(β i+1,1 ) + m i+1 (x β i+1,1 ), (2.3.2) be the lines passing through the points (β i1, f(β i1 )), (β i2, f(β i2 )) the first and (β i+1,1, f(β i+1,1 )), (β i+1,2, f(β i+1,2 )) the second. If we add and subtract the medium point β i+1,1+β i2 2 in the (x ) of the equations and 2.3.2, we obtain the following expression of the lines l i (x) =f(β i2 ) + m i β i+1,1 β i2 2 l i+1 (x) =f(β i+1,1 ) m i+1 β i+1,1 β i2 2 + m i (x β i+1,1 + β i2 ), 2 + m i+1 (x β i+1,1 + β i2 ). 2 Intersecting these lines, we obtain: x β i+1,1+β i2 2 β i+1,1 β i2 2 = m i + m i+1 2m i+ 1 2 m i+1 m i. Then, if it occurs that m i + m i+1 2m i+ 1 < m i+1 m i, 2 we are dealing with a convex function and then the new knot is the intersection of the optimal lines. Instead if m i + m i+1 2m i+ 1 m i+1 m i > 0, 2 we are dealing with a curve part which is neither concave nor convex. In this situation, we cannot apply the previous criterion, therefore we look for a inflection point β f applying a root-finding algorithm, in particular the false

47 33 position method, to a second derivative of the function f, starting with the medium point i.e. β = β i+1,1 + β i2, 2 β f = β f β i+1,1 β i2 (β) f (β i+1,1 ) f (β i2 ), (2.3.3) this point β f will be the new knot. Moreover, if m i is equal to m i+1 or the inflection point β f doesn t belong to the working interval, we choose the medium point of the working interval as a new knot. We can summarize the previous approach with the following algorithm: Algorithm Given a function f[a, b] and U = {u 0, u 1,...,u n } a set of arbitrary point such that a = u 0 < u 1 <... < u n = b, the algorithm constructs the optimal L 1 approximation lines in the subintervals as follows: for i = 1 to n do Compute the best interpolating points β i1 and β i2 on the i-th interval [u i 1, u i ] and β i+1,1 and β i+1,2 on the (i + 1)-th interval [u i, u i+1 ] as calculated in Calculate the approximating straight lines l i (x) and l i+1 (x). Calculate the slopes of the lines passing two by two by the calculated points m i = f(β i2) f(β i1 ) β i2 β i1, m i+1 = f(β i+1,2) f(β i+1,1 ) β i+1,2 β i+1,1, m i+ 1 2 = f(β i+1,1) f(β i2 ) β i+1,1 β i2,

48 34 Chapter 2. Approximation with Optimal Knots for i = 1 up to n if m i = m i+1 The new knot is the medium point of interval [u i 1, u i ] return if m i + m i+1 2m i+ 1 < m i+1 m i 2 Use the algorithm else Calculate the inflection point β f, as in 2.3.3, as new knot. 2.4 Optimal knots for plane curves In the previous section, a procedure to approximate a not convex function with a linear spline has been introduced. However this method represents an empiric solution. A more theoretical approach comes from considering a minimization of a functional that give us a solution of the problem 1. Let C(t) be a plane curve (we can also consider curve in R 3 ) defined as: C(t) = (f(t), g(t)), t [a, b], where f, g C 0 [a, b] are two not necessarily convex functions. How we have seen about the convex function, exists a unique solution of the system (2.2.4) that gives us the optimal knots set in order to find the linear approximation of that function. In the context of the plane curve the previous approach is equivalent to consider the following system: { ϕi (u, f) = 0 i = 1,...,n ψ i (u, g) = 0

49 35 where ϕ i and ψ i, referred to f and g respectively, are defined as in the system (2.2.5). So we have to solve a system of 2n equation into n unknown and so we cannot say to have a unique solution. One way to overcome this problem is to calculate the following minimum value: min u ( n (ϕ i (u, f) 2 + ψ i (u, g) 2 ), (2.4.1) i=1 which means that we have to solve a nonlinear least-square problem. If the function is convex this approach gives us the unique solution of the theorem For a least square fit, the parameters are determined as the minimizer u i of the sum of squared residuals; a similar approach is often used in nonlinear optimization problem. 2.5 Optimal knots for cubic B-spline The B-spline curve is any interesting application of the optimization procedure. Let C(t) be a cubic B-spline with t [a, b], we want to find an approximation with optimal knots. So, we can do this as applying the optimal approach to the second derivative of the B-spline curve C(t), in order to obtain the cubic spline approximation through a double integration. This approximation is suitable because an error on the second derivative of a function doesn t amplify the error on the same function. In fact, it is easy to prove that holds this relation: C S L1 c C S L1 (2.5.1) where c is a constant which depend by the amplitude interval [a, b], C and S are respectively the initial curve and its approximation with optimal knots and C S is a function that is null at the ending points i.e.:

50 36 Chapter 2. Approximation with Optimal Knots C(a) = S(a) and C(b) = S(b). Now, we prove the relation (2.5.1) in general. Theorem Let f C 2 [a, b] such that f(a) = f(b) = 0, then it holds the following relation: f L1 c f L1 where c is a constant that depends only by the amplitude of the interval [a, b]. Proof. Let f C 2 [a, b] with f(a) = f(b) = 0, then given n+1 distinct points τ 0,...,τ n we can approximate this function in the following way: f(x) p n (x) = n f(τ j )L j (x), more explicitly we approximate f with p n,that is the interpolation polynomial in the Lagrange form, where L j are the Lagrange polynomials defined as: L i (x) = In this hypotheses, we can write: b a j=0 n j=0,j i f(x)dx (b a) x τ j τ i τ j. n ω j f(τ j ), j=0 where ω j = 1 b a b a L j (x)dx, j = 0,...,n. The error term for Lagrange formulas is given by Peano s theorem: Theorem If f C N+1 [α, β] E(f) = 1 N! β α K N (t)f (N+1) (t)dt, where K N (t) = E((x t) N +).

51 37 We remember that (x t) N + = { (x t) N, for x t 0, for x < t t [a, b]. So, if we apply the theorem in our case, we have: E(f) = b a K 1 (t)f (t)dt, with K 1 (t) = E((x t) + ). In this hypothesis, we have: b a f(x)dx = (b a) n ω j f(τ j )+E(f) = (b a) j=0 j=0 n ω j f(τ j )+ b a K 1 (t)f (t)dt. So, if n = 1, setting τ 0 = a and τ 1 = b, by hypothesis we have that f(τ j ) = 0, from which we obtain: n ω j f(τ j ) = 0. j=0 Therefore, if we consider the L 1 -norm of f(x), we have the following upper bound: f L1 c f L1, where c is a constant. Now, we calculate the value of the constant c and the parameters it is depending on. Let us compute

52 38 Chapter 2. Approximation with Optimal Knots b a K 1(t)f (t)dt = b a E((x t) +)f (t)dt = b ( b a a (x t) +dt (b a) ω j f(τ j ) ) f (t)dt = b a ( b a (x t) +dt)f (t)dt = b a [xt 1 2 t2 ] b af (t)dt. = b a [xb 1 2 b2 xa a2 ]f (t)dt = b a 1 2 (b2 2ab + a 2 )f (t)dt = 1 2 (b a)2 b a f (t)dt Then, the constant c is 1 2 (b a)2 and hence it is dependent by the amplitude of the interval [a, b]. We have shown that the equation (2.5.1) holds, hence, in the next section, we are going to provide some examples of the application to the cubic B- spline. Moreover we are going to analyze in detail how it is possible to use the optimal method in the knot removal tool. 2.6 Application to knot removal tool The B-splines description has become the standard for curve and surface representation in CAD system due to its many properties that are beneficial to geometric modeling. Therefore, if we consider this curves representation, since they are defined by their control points and knot sequences, any modification of these parameters can produce a change of curve shape. One of these modification is knot removal. Tiller [33] and Lyche [20], developed efficient algorithms for the removal of the B-spline (NURBs) knots, which are able to determine automatically both the number of remaining knots and their position. The knot removal is an important tool in several applications. For instance, the knot removal mechanism can be used as a standard method

53 39 to convert into a B-spline form a spline curve represented in power basis form; when interactively shaping the B-spline curves the knots are sometimes added to increase the number of control points to be modified, hence after modification is completed, the knot removal tool can be invoked in order to obtain a most compact representation of the selected curve. Sometimes it is useful to link together the B-spline curves in order to form composite curve, hence the knot removal method can be invoked in order to remove unnecessary knots. As we have seen, the knot removal tool is quite important in many CG area. In order to increase its powerfulness it should be of interest if the elimination of one or more knots could only slightly effect the original shape of the considered curve. This could produce a better representation of the curve in term of storage memory. Then, we compared the two types knot removal, one called standard (Tiller s knot removal algorithm described in [33] and [23]) and our version called optimal that is, one that leverages the curve cubic B-spline linear approximation. In the following we are going to see the behavior of both kind of settings. Let C(t) = n i=0 B3 i (t)p i a cubic B-spline curve, where P i are the control points, Bi 3 (t) are cubic B-spline basis functions defined on knot sequence U = {u 0,...,u n+3 }. The knot removal step consists of approximating the B-spline C(t) by a B- spline C(t) on a knot vector Ũ, which is a subsequence of U with one knot removed. Standard knot removal Let u r be a removable knot of multiplicity s where 1 s p where p is the degree of the curve. Then the new control points are calculated in the following way: Q i = P i (1 α i )P i 1, r p i 1 (2r p s 1), α i 2 Q j = P j α j P j+1, (1 α j ) 1 (2r p s + 2) j r s, 2 with α k = u u k u k+p+1 u k, k = i, j.

54 40 Chapter 2. Approximation with Optimal Knots Optimal knot removal A novel procedure to obtain the cubic B-spline with optimal knot removal is described in the following. The initial curve is always a cubic B-spline C(t). Let give, first, a list of steps that must be carried out: 1. Calculate the second derivative of C(t). 2. Find the knot to be eliminated. 3. Approximate the linear spline with one knot less, with the optimal linear spline, how described in the sections 2.2 and Integrate twice to obtain the cubic B-spline. We look in more details the previous steps. Let C(t) = n i=1 Bp i (t)p i be a (p + 1)-th order B-spline, then its k-th derivative is given by: with P (k) i = P i if k = 0 n k C (k) (t) = i=1 p k+1 u i+p+1 u i+k (P (k 1) i+1 + P (k 1) i ) if k > 0 B p k i (t)p (k) i, (2.6.1) i=1,...,n-k Once we have calculated the second derivative applying the previous formula, we have a linear B-spline and we look for the knot to be removed from it. We know that for each vertex (control point) of the B-spline curve is associated a knot. For each vertex, we can associate the distance that it has from the straight line passing through its two adjacent vertices. So the knot that has to be eliminated corresponds to the vertex that has the minimum distance. When we have found the eliminable knot u r we apply to the linear B-spline

55 41 the algorithm that find the optimal knots sequence, after to have removed by linear spline the knot u r found. The final step consists in a double integration to regain the cubic B-spline. The advantage of the optimal method is showed in the Table 3.6 where the error values of the two methods are reported, i.e. the approximation errors of the curve with one knot less respects to the original curve. Now we see in more detail the procedure followed to find the linear spline with the optimal method after the knot elimination. Procedure Consider the knot sequence u 0 < u 1 < u 2 < u 3 < u 4, and let B p k (t) be the functions basis so that Bp k (u i) = δ k,i for k = 0,...,4. Then, let 4 C(t) = B p k (t)p k be the initial curve, where P k are its control points. We suppose to eliminate the knot u 2 and to construct the new curve k=0 C(t) = k 2 Q k Bp k (t) where B p k (u i) = δ k,i with i, k = 0, 1, 3, 4 and Q k are its control points. We want find the unknown Q k to construct the new curve with one knot less. We know that and also that we can write B p 0 (t) = Bp 0 (t), Bp 4 (t) = Bp 4 (t), B p 1 (t) = Bp 1 (t) + αbp 2 (t), B p 3 (t) = Bp 3 (t) + βbp 2 (t), where α = u 3 u 2 u 3 u 1, β = 1 α = u 2 u 1 u 3 u 1.

56 42 Chapter 2. Approximation with Optimal Knots So we can write: k 2 B p k (t)q k = B p 0 (t)q 0 + (B p 1 (t) + αbp 2 (t))q 1 + (B p 3 (t) + βbp 2 (t))q 3 + B p 4 (t)q 4 = B p 0 (t)q 0 + B p 1 (t)q 1 + (αq 1 + βq 3 )B p 2 (t) + Bp 3 (t)q 3 + B p 4 (t)q 4. So M(t) = max t 4 k=0 B p k (t)p k k 2 B p k (t)q k = max B p t 0 (t)(q 0 P 0 ) + B p 1 (t)(q 1 P 1 )+ + B p 2 (t)(αq 1 + βq 3 P 2 ) + B p 3 (t)(q 3 P 3 ) + B p 4 (t)(q 4 P 4 ). Let Q 0 = P 0 and Q 4 = P 4 we have that: M(t) max{ Q 1 P 1, Q 3 P 3, αq 1 + βq 3 P 2 }. The solution to this equation it can be found between: Q 1 P 1 = ±(αq 1 + βq 3 P 2 ), (2.6.2) Q 3 P 3 = ±(αq 1 + βq 3 P 2 ). Studying the systems of four equations we found that the optimal solution is given solving these equations: Q 1 = P 1 + γ(p 2 αp 1 βp 3 ), Q 3 = P 3 ± γ(p 2 αp 1 βp 3 ).

57 43 where γ has the following expressions: γ 1 = γ = 1 2 γ 2 = γ = 1 2α γ 3 = γ = 1 2β The values of γ are calculated solving the equations varying the positive and negative signs. The optimal solution is given calculating the maximum value of γ. If the knot set is uniform we have that γ 2 is equal to γ 3. In this way we have calculated the control points Q k to construct the B-spline C(t). We can rewrite the previous procedure with the following algorithm: Algorithm Given a B-spline curve C(t) = n i=0 B3 i (t)p i with a knot sequence U = {u 0,...,u n+3 }, the algorithm constructs the optimal B-spline approximation with one knot less, as follows: Calculate the second derivative of C(t), obtaining the linear spline C (t). Eliminate a knot u r. The knots set of C (t) is: U 2 = {u 0,...,u r 1, u r+1,...,u n 2 }. Use the algorithm to calculate the new knots sequence of C (t), Ū 2. Integrate twice C (t) to obtain the optimal cubic B-spline curve with one knot less. If we apply the the optimal method, described previously for plane curves, to the linear spline with one knot less, as we have just calculated, we have a better approximation as we can see by the numerical examples showed in this thesis. In fact, in the next chapter we can see numerical applications of all algorithm that we have described, starting from the application to convex function to plane curves until to show significant examples to knot removal applications.

58 44 Chapter 2. Approximation with Optimal Knots

59 Chapter 3 Numerical examples In this chapter, some computational experiments are presented employing the algorithm of the foregoing sections. To be more precise, some examples of linear approximations of convex and not convex functions and its applications. The following list of functions are used as the test functions: f(x) = x 3 + x 2 3 x [0, 1] f(x) = a cosh( x a ) = 1 2 (e x a + e x a) a = 1, x [ 3, 3] f(x) = x 4 x 2 1 x [0, 1] f(x) = cos 3 (x) x [0, π] r = ρθ θ [0, 2π] 3.1 Convex functions approximation Firstly we have applied the algorithm described in the section 2.2 to approximate convex functions. The Figure 3.1 shows a convex function f(x) and its linear approximation δ(x) with four interior knots. We can see how the approximation is good also with few knots.

60 46 Chapter 3. Numerical examples f(x) δ(x) Figure 3.1: Convex function The algorithm procedure starts with a uniform knots set in the interval [0, 1], U 0 := [0, 1 3, 2 3, 1], obtaining the following new knot values that converges to the solution, how shown in the Table 3.1: Iter u 1 u 2 toll Table 3.1: Uniform knots Instead, starting with a not uniform knots set U 0 := [0, 0.35, 0.7, 1] we obtain the results shown in the Table 3.2.

61 47 Iter u 1 u 2 toll Table 3.2: Not uniform knots It is clear from the Table 3.1 and Table 3.2 that the choice of the initial knots set is very important to have a fast convergence at the solution. Another example of convex function approximation is shown in Figure 3.2, where the function f(x) = 1 2 (ex + e x ) called catenary is approximated with six interior knots f(x) δ(x) Figure 3.2: Convex function: catenary

62 48 Chapter 3. Numerical examples 3.2 Not Convex functions approximation In this section we give some examples that show the application of the optimal method to the not convex function. In fact, the Figure 3.3 is a linear approximation, of a not convex function, with four interior uniform knots (top) and with ten uniform interior knots (bottom) f(x) δ(x) (a) Four interior knots f(x) δ(x) (b) Ten interior knots Figure 3.3: Not convex function

63 49 In the Table 3.3, we compare the values obtained with a uniform and not uniform knots set. It can see that, for quadratic function, we have a fast convergence at the solution when the initial knots set is uniform. In Table 3.3(a) the initial knots set is U 0 := [0, 1 3, 2 3, 1] and in Table 3.3(b) U 0 := [0, 0.2, 0.5, 1]. The difference of number of iterates between the two table is more evident when the knot number is large. Iter u 1 u 2 toll (a) Uniform knots Iter u 1 u 2 toll (b) Not uniform knots Table 3.3: Not convex function Another example of not convex function, with more inflection points, and its linear approximation is shown in Figure f(x) δ(x) Figure 3.4: Not convex function

64 50 Chapter 3. Numerical examples 3.3 Plane curves approximation In the section 2.4, we have seen how to approximate a plane curve, solving a minimum problem (2.4.1). In the Figure 3.5, we provide a significative example of this method that was applied to a note plane curve: the spiral function (a) Spiral function (b) Twelve interior knots (c) Particular zoom (in) of the figure (b) part Figure 3.5: Curve plane: spiral function Furthermore, in the Table 3.4, we have reported the resnorm values i.e. the values of the squared 2-norm of the residual at the solution U with different knots numbers. As the knots number increases, the value of the squared 2- norm of the residual becomes increasingly small as we expected. So far, we have shown some examples of linear approximation at various function convex and not convex. To get an overview of the methods described in the previous sections, in the Table 3.5 we have compared all test functions previously adopted. We can describe that to obtain an approximation of 1.e 4, the optimal knot sequence size increases when we consider more complex curve of not convex function or plane curve.

65 51 Spiral function r = ρθ n knots resnorm e-005 Table 3.4: Resnorm values f(x) n knots err x 3 + x e-004 x 4 x e-004 cos 3 (x) e-004 r = ρθ e-004 Table 3.5: Test functions errors We would like to highlight an important aspect about the methods presented in this work. The optimal approach, as we have defined, is invariant under affine transformations. In particular we show that this is true to rotation transformation. In fact, if we consider the rotate version of test functions, we can see how the linear approximation of this rotate function is proper the rotation, with the same angle, of the linear approximation of the not rotate function. The Figures 3.6, 3.7 and 3.8 show the invariance property on convex function,

66 52 Chapter 3. Numerical examples not convex function and plane curve, respectively. The rotation angle that we have used is π 2, furthermore the parts (a) of any figure represent the curve and its rotation, while the parts (b) portray the linear approximations of curves. The star-shaped mark (*) indicates the center of rotation (a) Third degree polynomial function (b) Four interior knots Figure 3.6: Convex function rotation

67 (a) Fourth degree polynomial function (b) Five interior knots Figure 3.7: Not convex function rotation

68 54 Chapter 3. Numerical examples (a) Spiral function (b) Eight interior knots Figure 3.8: Curve plane rotation

69 Knot removal application In this part we illustrate the knot removal application as we have seen in detail in the section 2.6. In particular, we have choose some plane curves, represented by the cubic B- splines with six and nine internal knots. The figures show very well as the optimal method is more effective than standard and it preserves almost completely (in some cases) the original shape curve. In any figures the blue curves show the original curve, the red one are the curves obtained with optimal knot removal, while dark one depicts the curve obtained with the standard knot removal. Finally, the Table 3.6 displays the standard and optimal error for any curve, i.e. the error that occurs with the knot removal standard and optimal one, between the original curve and its approximation with one knot less. These errors are calculated in the infinity-norm of the distance between the two curves. f(x) err standard err optimal Figure Figure Figure Figure Table 3.6: Standard and optimal errors

70 56 Chapter 3. Numerical examples (a) Original curve with six interior knots optimal standard f(x) (b) Approximations with one knot less Figure 3.9: Knot removal method: example 1

71 (a) Original curve with six interior knots optimal standard f(x) (b) Approximations with one knot less Figure 3.10: Knot removal method: example 2

72 58 Chapter 3. Numerical examples (a) Original curve with six interior knots optimal standard f(x) (b) Approximations with one knot less Figure 3.11: Knot removal method: example 3

73 (a) Original curve with nine interior knots optimal standard f(x) (b) Approximations with one knot less Figure 3.12: Knot removal method: example 4

74 60 Chapter 3. Numerical examples

75 Chapter 4 Part two: 2D sketching using multiresolution approach 4.1 Introduction Nowadays, the market value of products is increasingly dependent on aesthetic and ergonomic aspects. In spite of this, the CAD software does not adequately support the definition and the adjustment of free form curves, essential required to improve the success of a product. This explains the extensive use in industry of manual paper sketches. For these reasons it is necessary to develop innovative methods and algorithms to evaluate interactively several design alternatives to 2D style curves, so in this chapter we have developed a sketch system that uses a graphics tablet with a wireless pen as tool design and performs a series of procedure using a mathematical framework based on wavelet. The proposed system is able, starting from a sketch curve drawn by user, to apply filters to the curve, to perform segmentation, to obtain feature points and to piecewise smooth the curve preserving continuity constraints, that is maintaining after smoothing operation C 0 and C 1 continuity at the endpoints of the curve. The procedure is performed using one single mathematical support based on multiresolution analysis with wavelets. The research on 2D sketch systems for the curve styling is in continuous evolution and aims to improve the user interface interactivity and usability. Style sketches require an optimized representation in terms of minimal mathematical complexity and a set of smart interaction tools to control the geometry

76 62 Chapter 4. 2D Sketch curve style in an intuitive and predictable way. Although there was been a wide range of research paper on this topic, two aspects of 2D sketch systems are still critical: the digitization process (pen input, approximation, segmentation, etc.) and data usability (human factors, user intentions, curve simplification and editing, etc.). This explains the common practice in industry of firstly sketching on paper and then digitizing curves on CAD models. The main problem in the digitization process is converting analogical hand sketches into a CAD representation and then segmenting the data for precise editing (e.g. for a car body in order to distinguish bonnet from windshield). The usability problem is related to the understanding of the user needs during editing and smoothing of the curves in successive trial and error steps, until the desired design has been obtained. We developed and implemented a set of intuitive and interactive tools for segmentation and interactive smoothing of free form CAD curves (e.g. car body design, as illustrated in Figure 4.1). Figure 4.1: Style sketches for a car bodies Our tools perform segmentation and piecewise simplification using multiresolution techniques and wavelet representation. We applied and improved the approach used by Finkelstein et al. [9] to smooth and edit curves while preserving their details. The main advantages of our tool are the continuous level of smoothing, the intuitive local manipulation of an arbitrary portion of the curve and that it is based on a unique multiresolution engine. After an overview of sketch curve style, this second part of thesis is so subdivided: in the section 4.3 we present a survey of the literature on the topic, in the section 4.4 we underline the phases of our approach and in the chapter 5 we illustrate some implementation details and some examples.

77 Sketch curve style Up to now, the de facto curve style standard for aesthetic design is freehand sketching. It is widely regarded as an efficient and natural way for the interaction between computers and humans. When creating a new product, a stylist gives first the global effect by drawing some essential curves, which can be considered as an abstraction of the product shape. They are not only structural lines, like profiles, but also lines strongly affecting the product visual impact, commonly named character lines. Such lines can be considered as abstract because they may not be present in the model of the product, but simply perceived, such as gaps or light lines. Figure 4.2: Sketches and character lines of cars model The importance of aesthetics, for example in automotive industrial design, is evident. Only very few people buy a car based on technical performance and costs only. Usually appearance, comfort and aesthetic appreciation play a crucial role in the buying process. The design for aesthetics, together with

78 64 Chapter 4. 2D Sketch curve style Figure 4.3: Sketches of car model design for ergonomics, intelligence, user friendliness, adaptability, etc., are the fields which will surely be in the focus of the research and development in the near future due to their role in enhancing product acceptance. The development process of a car will alter when the need grows to tailor cars to more diverse groups of target customers. Aesthetic characteristics that are more diverse will have to be incorporated into the design of cars. Therefore, stylists need a method to define, use and communicate aesthetic intents, supported by computers to assess the aesthetic appreciation of the customers related to the shape of the car. Technological improvements the last decade have made digital drawing a very effective method for artistic expression. Thanks to more widely available and affordable peripheral devices such as pen tablets (Figure 4.2), an increasing number of artists are creating digital works. However, many fundamental interactions of modern day drawing systems have seen little change in over twenty years. The popularity of digital design has increased greatly in the last decade or two. A large factor behind this might be the increased availability and quality of drawing tablets. Previously, most were limited to using a mouse which is far from the ideal painting implement. In contrast, tablets bare a certain resemblance to traditional drawing tools in form and usage. This, combined with the benefits of digital painting have caused a shift in the industrial design community from traditional to digital artwork. In this thesis we have applied our sketching system to cars model. In the early stages of automotive design, designers produce a rich set of concept sketches to develop and communicate their ideas. These sketches convey useful information regarding the desired shape and style. In car industry, designers place huge emphasis on concept development and styling activities as

79 65 Figure 4.4: Graphic tablet device for digital design the decisions made during these stages are key to the products success. Most commonly, designers produce a multitude of rough sketches early in the design process as a way to explore different shapes and styles. Our approach is based on a three-stage modeling framework that facilitates a rapid construction of a coarse 2D free-form curve followed by a progressive, sketch-based refinement. In the first stage, the user draws a curve directly in digital form using a tablet, then our sketching system finds a set of feature points on the sketch as segmentation points. Using the feature points, our method is able to smooth and edit sketch segments obtained by the segmentation without loosing important geometric characteristics as continuity at the endpoints. So, starting by an initial sketch curve we can have a series of different alternatives of sketch interactively without necessarily use paper and pencil. 4.3 Related work In the literature many approaches have been developed to treat polyline based smoothing techniques worked out in the past decades. These applications are used, in particular, to increase the smoothness of a mesh polyline. The most

80 66 Chapter 4. 2D Sketch curve style known methods are Laplacian smoothing, Taubin s approach, Scale Space and Bilateral Smoothing. Laplacian smoothing is done by simply iteratively averaging the neighbour vertices of a polyline or of a mesh and then eliminating high-frequency noise. Unfortunately it requires many iterations for lower frequencies. Laplacian smoothing beside, can cause shrinking. Taubin s approach, [31],[32], is based on the analogy with Fourier analysis for one and two dimensional regularly sampled data. Therefore, it can not be suitable for not periodic signals as for free form curves. Furthermore, this method, although prevents the shrinkage of low frequency components possesses a time complexity which is more than linear. In [30] the authors present a system that support sketch-based interaction. The system is a module that takes freehand strokes consisting of a series of pixel positions that approximate the input stroke by lines, curves and their combination. They apply the scale space based technique to curvature as well as speed data and combine the information from both sources for feature point detection. Many other smoothing procedure are based on curvature criterion detection points as in [17]. A wide variety of techniques have been also proposed in the past for conceptual CAD sketching in various environments ranging from the traditional mouse and keyboard desktop PC (e.g. Teddy [16]) to the most advanced mixed reality setups (e.g. Digital Tape drawing [13]), both for 2D and 3D scene (see [34],[36]). One of the most frequently addressed problems in CAD sketching is the segmentation of a user sketched curve into a combination of CAD primitives such as lines, arcs, and polynomial representations. In [29] Rosin and West proposed an algorithm with some interesting properties including to provide a representation of the given curve that is scale invariant and non parametric. Wana and Ventura [35] proposed an interesting method for segmenting planar curves into straight-line segments and elliptical arcs. The procedure finds two types of break points: corners and smooth joins. The firsts are detected applying adaptive smoothing to the tangent orientation along the curve, then locating the high spikes on its derivative. The smooth joins are first roughly located by a dynamic focusing fitting technique and then refined by an adjustment algorithm. Some authors [17] use curvature as an important criterion during the segmentation procedure, however their approach was intended primarily for closed curves. In [10], a knowledge based algorithm to interpret the user s intention, according to direction, speed and curvature data acquired during user sketch-

81 67 ing is described. Recent approaches to segment implicit curves use radial basis function in a greedy manner [25]. Unfortunately, this approach cannot be used by several CAD systems which instead need to deal with a B-spline representation (see [23]). Another aspect deeply investigated is the intuitive curve editing. Multiresolution is a wide investigated field for representation in CG [12],[26], but not very exploited in CAD modelling. Multiresolution curve analysis has been presented in [9] and [12] for continuous editing of freeform curves. Interesting works in the field of interactive editing curve using wavelet decomposition are presented in [7] and [6]. They achieved multiresolution manipulation of nonuniform B-spline curves in different ways: the first [7] uses a non-orthogonal decomposition of a curve, while the latter [6] adopts linear constraints on the curve. Olsen et al. [22] presented a numerical approach for constructing local multiresolution filters for B-spline based on subdivision schemes. Editing at fractional levels of multiresolution can be achieved using an interesting methods developed by Finkelstein and Salesin [9]. We applied and improved the approach presented in [9] to smooth and edit curves while preserving their details. The strength of the method we propose consists on a single mathematical support which is able to perform both segmentation and interactive multiresolution editing. Following, we describe the phases of the proposed approach presenting the novel method used to perform segmentation and the algorithm to maintain both condition of continuity C 0 and C The proposed approach The main aim of our method is to sketch CAD curves by using a graphic tablet, a digital pen and a set of interactive tools for segmentation and multiresolution editing. To understand the structure of our system we show the following scheme that summarizes the principal phases:

82 68 Chapter 4. 2D Sketch curve style We can summarize this approach in the following steps: the user sketches directly on the tablet; the collected points are converted to a B-spline representation; the system applies a preliminary filter using fractional multiresolution to remove hi-frequency noise; the system proposes to the user a number of segmentation points, according to the sketch complexity; the sketch is split into curve segments and the user can simplify each segment independently with continuous level of details. The system created allows to user to sketch style curves directly with a graphic input device, avoiding the preliminary phase of sketching with pen and sheet.

83 69 This sketch curve is, then, automatically segmented in order to have the possibility to interactively manipulate each curve segment, until obtaining the desired overall curve. The main advantages of our tool are the continuous level of smoothing and the intuitive local manipulation of an arbitrary portion of the curve. This is obtained with a significant reduction of the computational complexity using the same wavelet mathematical framework for all the processing phases. Our method, for this reason, is performed in real time. We have seen in the section 1.3, how multiresolution analysis works for a generic signal. Naturally, we are interested in analysing the effects of this framework on curves. We give a simple example of multiresolution curve application. Let C(t) be a cubic B-spline curve constructed with 11 control points (see Figure 4.5), if we apply multiresolution steps at level j = 2 (as illustrated in Figure 4.6), and j = 0 (see Figure 4.7) we have the smooth curves drawn in red. Figure 4.5: Original curve with 11 control points Figure 4.6: Original curve and its coarse version with 7 control points Figure 4.7: Original curve and its coarse version with 4 control points

84 70 Chapter 4. 2D Sketch curve style As we have already observed, if we use a multiresolution method at coarse levels of resolution the global simplification of the sketch curve leads to a loss of user intention (features, spike, etc). Therefore, our approach is composed of two phases: the recognition of the essential sketch features by segmentation and a local simplification by fractional user driven multiresolution. All these operations are based on a single mathematical support implemented in a module called Multiresolution Engine. It provides the following main functions: Multi-level Segmentation: by a comparison between the original curve with its coarse versions; Simplification of curve segments: by changing the level of details continuously on curve segments maintaining continuity constraints. 4.5 Multiresolution Engine When the user sketches a curve, the system acquires and stores N points P i, which are approximated by a least square approximation with an endpoints interpolating B-spline curve C(t), with t [0, 1]. With this curve representation it is possible to perform a multiresolution analysis by smoothing the curve at a desired level of resolution, applying the procedure, described in the section 1.3 for a generic discrete signal, to the control points vector. If we assume that the number of control points is m = 2 j + 3, with j being on integer, the decomposition algorithm constructs an approximating curve with m = 2 j + 3 control points, so that some nonnegative integers j < j define the resolution levels of the curve. The control points of the approximating C curve are given by C = A j +1 A j +2...A j C. We simply run the decomposition algorithm, as described by equation (1.3.1), to obtain a curve with just m control points. This process can be performed at interactive speeds for hundreds of control points using the linear-time algorithm described in [9]. If we want to construct curves that have continuous

85 71 levels of smoothness, we have to define a fractional level curve. The Multiresolution Engine is also able to provide fractional level of resolution. This is performed by defining a fractional-level curve f j+t (u), with t [0, 1] and u [0, 1], in terms of linear interpolation between its two nearest integer-level curves f j (u) and f j+1 (u) in the following way: f j+t (u) =(1 t)f j (u) + tf j+1 (u) =(1 t)φ j (u)c j + tφ j+1 (u). These fractional level curves allow for continuous levels of smoothing. In all CAD sketch systems, it is important to use a preliminarily filter to eliminate noise due to the user hand vibrations before processing the sketch. Many approaches use directly a filter on collected points (e.g. Gaussian scalespace filtering or the method that consists in the fixing a minimum threshold to eliminate points too close etc.) and then complete the B-spline approximation. Our approach, on the other hand, firstly approximates the sketch points with a B-spline and then uses a multiresolution filter on the curve. This filter applies wavelet decomposition, using fractional level curves. After this preliminary filter, the system uses the multiresolution framework at integer level to segment the curve into simpler parts, finding characteristic points on the curve by a matching algorithm. The previous steps can be performed automatically by the system. After segmentation we obtained an overall curve created by union of simpler cubic B-spline sections joined in the segmentation points. The user can select these sections to perform a local re-editing of the curve using continuous (i.e. fractional level) multiresolution with C 0 and C 1 constraints. The interactive capability of the engine provides a full range of design alternatives to the user. It also important to outline that the multiresolution at fractional level can be used also to smooth the step between two integer level to avoid the abrupt passage between a curve with 2 j +3 control points to one with 2 j 1 +3 control points. The segmentation and simplification phases will be described in detail in the next sections.

86 72 Chapter 4. 2D Sketch curve style 4.6 Multi-level Segmentation The segmentation phase is an important step in order to assist the user in the definition of the characteristic points. These points are essential to obtain the best sketch interpretation and editing because divide the curve in primitive parts. It is necessary, therefore, to perform a valid segmentation of sketch strokes to avoid those errors in the segmentation phase that might propagate during the phases of features extraction and classification. The operations performed during the multi-level segmentation phase are described by the following algorithm summarizes in a four principle steps: Step 1 Start from a filtered cubic B-spline curve approximation C(t) (see example in Figure 4.8); Step 2 Execute multiresolution analysis with C 0 constraint at endpoints of this curve smoothing it at a defined level of resolution to obtain a new curve C j (t) (Figure 4.9); Step 3 Compare the two curves C(t) and C j (t) in order to evaluate the distance function D(t) between them; Step 4 Segmentation points are the points of maximum of D(t) above an opportune threshold value (Figure 4.10). In particular, if we use a uniform cubic B-spline representation, it is necessary that the curve must have a number n of control points equal to 2 j + p, where p represents the degree of the curve and j is an integer. In particular for our system we use cubic B-spline, so the value of degree p is equal to 3. During the multiresolution approach we smooth the curve varying the value j from log 2 n p to 0, and we stop when the curve has the j value desired. This level j, that we can call the optimal level, is chosen in order to smooth the curve without losing its geometric characteristics (i.e. the number of inflection points). To calculate the optimal j value we operate in the following way:

87 73 Figure 4.8: The original curve C(t) Figure 4.9: The original curve (11 control points) and its coarse version (4 control points). Figure 4.10: The segmentation points

88 74 Chapter 4. 2D Sketch curve style Calculate the number of changes c of curvature K(t) at the curve point C(t) using this formula: K(t) = C (t)xc (t) C (t) 3, where C (t) and C (t) are respectively the first and second derivative of the curve. Choose a value j for which the coarse version C j has the same number of change c of curvature of C(t), if it exists, or the number of the change of curvature immediately lower. The resulting curve C j named Baseline can be considered as a skeleton of the original curve. The example shown in the figures gives a vision of the steps achieved by the segmentation procedure. We have in the Figure 3.11 the B-spline curve that have to be segmented. This curve is defined by eleven control points (i.e. 2 j + 3 with j = 3). The system applies to this curve a multiresolution analysis with C 0 constraints (this concept will be explained in detail in the next section), that is the system calculates coarse versions of the curve but maintaining the endpoints fixed. In the Figure 4.9 we can see the original curve and the coarse version (the red one), with four control points, obtained smoothing the curve at level j = 0. By comparison between these two curves, in particular calculating the distance function point to point, the system is able to find the segmentation points. The green points shown in the Figure 4.10 are the segmentation points found performing the following steps: Calculate the euclidian distance between the original curve C(t) and its smoothed version C j (t): d k = C(t k ) C j (t k ) 2 k = 1,...,N t k [0, 1] obviously d 1 and d N are 0 because C(0) = C j (0) and C(1) = C j (1) Define a function D : t k d k Construct the graph of D as a function of t k normalized to the maximum value of distances (Figure 4.11) Find the segmentation points as the maximum of the distance function D using a threshold value to select only necessary points.

89 75 Figure 4.11: Normalized graph of distances and threshold at 0.57 Figure 4.12: Segmentation point refinement from seven (top) to four (bottom)

90 76 Chapter 4. 2D Sketch curve style The value of threshold tr in the distances graph (the horizontal line in graph of Figure 4.11) is calculated as follows: where tr = 1 d m, c = 1; 1 d m c tr 1+dm c, c > 1. d m = min k d k k = 1,...,N is the minimum value found and c is number of changes of curvature. The points detected in the Figure 4.10 are just what we expected, also the first right point is good because it divides a line from an arc curve. In Figure 4.12 (top) we can see that the system initially detects seven segmentation points on the original curve. Three of the selected points are not optimal. The final segmentation (see Figure 4.12 bottom) is achieved using the threshold value, on the normalized graph of distances, represented by a horizontal line in Figure Smoothing with continuity constraints We construct a smoothed curve with endpoints fixed at the original curve endpoints (a common CAD requirement is C 0 continuity at the extremes). Moreover, in the modelling phase, it can be useful to modify a part of the sketch according to some geometric constraints such as C 0 and C 1 continuity (i.e. between parts of segmented curve). We have seen in Figures 4.6 and 4.7, that multiresolution analysis of a curve at the coarse level does not preserve the endpoints of the curve. In many design applications as car industrial design it is important to maintain the C n continuity, (with n = 0, 1) between two curves. So, if we apply the standard multiresolution approach, to have a smoothed version of a curve, this continuity property is not guaranteed. To overcome this problem, we have implemented a method that constructs coarser curves using multiresolution

91 77 analysis, but maintaining C 0 and C 1 constraints. Let n C(t) = Bk 4 (t)p k, t [0, 1]; k=0 with t [0, 1] be a cubic B-spline where Bk 4 are the endpoint-interpolating B-spline functions of fourth order and the P k are the control points. Let C(t) be a Bézier curve that satisfies the following conditions: C(0) = C(0), C(1) = C(1), (4.7.1) C (0) = C (0), C (1) = C (1). (4.7.2) We can consider the curve C(t) as that part of C(t) which does not contain details (we can call it skeleton curve ). So, we can consider our initial curve as: C(t) = C(t) + (C(t) C(t)) = C(t) + K(t). In this way, we can consider our original curve C(t) as the sum of skeleton part C(t) and details K(t). In such a way, we can apply the multiresolution method to detail curve K(t) in order to obtain smoothed version K j (t) and then reconstruct the final smoothed curve adding C(t) at any level j. To sum C(t) we have to transform into a B-spline curve, that is: C(t) = n Bk 4 (t)q k, k=0 where Q 0 = P 0, Q 1 = P 1, Q n 1 = P n 1 and Q n = P n. The remaining control points will be univocally given by boundary conditions. The K(t) curve is instead given by: n 2 K(t) = Bk 4 (t)(p k Q k ). k=2 The space vector on which the multiresolution analysis is performed has dimension n 4. At any level j the final curve is: C j (t) = C(t) + (C(t) C(t)) j = C(t) + K j (t).

92 78 Chapter 4. 2D Sketch curve style This smoothed curve C j (t) preserves both endpoints and tangents at extremities of C(t). If we want to preserve only C 0 continuity, we have to consider C(t) as a straight line that satisfies only condition Now we see how to perform the conversion from Bézier to B-spline curve. Firstly we see how to transform a Bézier curve of first degree, that is a straight line, in B-spline cubic form. We want to find the value of control points α k so that the cubic B-spline C(t) = n k=1 α k Bk 3 (t) (4.7.3) let be a first degree polynomial, that is: n α k Bk 3 (t) = t k=1 We have seen in the paragraph 1.1 that B-spline curve satisfy an important property: endpoint interpolation. Therefore for this property we have that: C(0) = α 1 C(1) = α n Therefore, by the equality C(t) = t we have: C(0) = 0 and C(0) = α 1 α 1 = 0 C(1) = 1 and C(1) = α n α n = 1 We have also that (using the equation to calculate first derivative of B-spline basis function):

93 79 C (t) = n α k (Bk 3 (t)) k=1 n ( B 2 = 3α k (t) k B2 k+1 (t) ) u k+3 u k u k+4 u k+1 k=1 n ( B 2 ) n+1 = 3α k (t) ( B 2 ) k 3α k (t) k 1 u k+3 u k u k+3 u k k=1 k=2 n Bk 2 = 3(α k α k 1 ) (t). u k+3 u k k=2 (4.7.4) Therefore, by the equality C(t) = t we have: C (t) = 1 n Bk 2 3(α k α k 1 ) (t) = 1 u k+3 u k k=2 The last equality is satisfied if all coefficients are equal to one, that is: 3(α k α k 1 ) u k+3 u k = 1. So, for all k = 2,...,n the control points are related by the following recursive formula: α k = α k (u k+3 u k ) Now we see a method that converts a third degree polynomial in a B-spline curve when we want to perform a multiresolution of a curve maintaining fixed the endpoints and tangent direction at the endpoints. Let C(t) = n k=1 α k Bk 3 (t) (4.7.5) be a cubic B-spline curve with uniform knots. We want to find the values of α k so that the points of the cubic B-spline curve let be the points of a third degree

94 80 Chapter 4. 2D Sketch curve style polynomial, in this way we have found a representation in B-spline form of a polynomial curve (Bézier curve). In particular we suppose that Bézier curve of third degree have α 1, α 2, α n 1, α n as control points, so we have to find the value of the α k for k = 3,...,n 2 to convert the the curve in B-spline form. We know that (as we have just seen in the previous case): C(0) = α 1 C(1) = α n. Besides we know, by the equations and , that: C (0) = 3 h (α 2 α 1 ), C (1) = 3 h (α n α n 1 ). where h is the constant step between the knots. The second and third derivative of C(t) for t = 0 and t = 1, calculated by the formula 2.6.1, are given by the following expressions: C (0) = 3 h 2(α 3 3α 2 + 2α 1 ) (4.7.6) C (1) = 3 h 2(2α n 3α n 1 + α n 2 ) (4.7.7) C (0) = 1 2h 3(2α 4 11α α 2 12α 1 ) (4.7.8) C (1) = 1 2h 3(12α n 21α n α n 2 2α n 3 ) (4.7.9) To calculate the α k for k = 3,...,n 2 we need to find the value of C (0), C (1), C (0), C (1). We can find these values constructing the Newton interpolating polynomial. We recall how to construct Newton s divided difference interpolation formula. Let {x 0, x 1,...,x n } be a set of n + 1 points and let f(x i ) be for i = 0,...,n the values which a function f assumes on the points x i. We want to construct a polynomial interpolating p n (x) such that p n (x i ) = f(x i ). Firstly we recall the following definition:

95 81 Definition The (n + 1)-th order divided difference of a function f(x) at the points {x 0, x 1,...,x n } is the function f[x 0, x 1,...,x n, x] defined for x x i, i = 0,...,n, by the following recursive formula: for n = 0 f[x] = f(x) for n = 1 f[x 0, x] = f[x] f[x 0] x x 0 for n 2 f[x 0, x 1,...,x n 1, x n, x] = f[x 1,...,x n 1,x n,x] f[x 0,x 1,...,x n 1,x n] x x 0 Moreover, if the function f(x) is n-time differentiable it holds: f[x,..., x] = f(n) (x). } {{ } n! n+1 Theorem The Newton form of the interpolating polynomial p n (x) of degree almost n such that p n (x i ) = f(x i ) is given by: p n (x) = f[x 0 ] + (x x 0 )f[x 0, x 1 ] + (x x 0 )(x x 1 )f[x 0, x 1, x 2 ] (x x 0 )(x x 1 )...(x x n 1 f[x 0, x 1,...,x n ], where f[x 0,...,x i ] for i = 1,...,n are the divided differences. If we know the values of f and its first derivative in some points, f(x 0 ), f (x 0 ), f(x 1 ), f (x 1 ), the Newton interpolating polynomial has the following expression: p(t) = f[x 0 ]+f[x 0, x 0 ](t x 0 )+f[x 0, x 0, x 1 ](t x 0 ) 2 +f[x 0, x 0, x 1, x 1 ](t x 0 ) 2 (t x 1 ). Now, let be C(t) a B-spline curve defined as in the equation 4.7.5, if we choose t 0 = 0 and t 1 = 1, the Newton polynomial constructed by C(0), C (0), C(1), C (1) is: p(t) = C[0] + C [0]t + C[0, 0, 1]t 2 + C[0, 0, 1, 1]t 2 (t 1). So, the second and third derivatives of p(t) are: p (t) =2C[0, 0, 1] + C[0, 0, 1, 1](6t 2), p (t) =6C[0, 0, 1, 1].

96 82 Chapter 4. 2D Sketch curve style By these equations we can calculate the values of p (0), p (1), p (0) and p (1): p (0) = 2C[0, 0, 1] 2C[0, 0, 1, 1] = 2(C[0, 1] C[0, 0]) 2(C[0, 1, 1] C[0, 0, 1]) = 2(C(1) C(0) C (0)) 2(C[1, 1] 2C[0, 1] + C[0, 0]) = 2(C(1) C(0)) 2C (0) 2C (1) + 4(C(1) C(0)) 2C (0) = 4C (0) + 6(C(1) C(0)) 2C (1). p (1) = 2C[0, 0, 1] + 4C[0, 0, 1, 1] = 2(C[0, 1] C[0, 0]) + 4(C[0, 1, 1] C[0, 0, 1]) = 2(C(1) C(0) C (0)) + 4(C[1, 1] 2C[0, 1] + C[0, 0]) = 2(C(1) C(0)) 2C (0) + 4C (1) 8(C(1) C(0)) + 4C (0) = 2C (0) 6(C(1) C(0)) + 4C (1). As p (t) is a constant function we have that: p (0)(= p (1)) = 6(C[0, 1, 1] C[0, 0, 1] = 6(C[1, 1] 2C[0, 1] + C[0, 0]) = 6(C (1) 2(C(1) C(0)) + C (0)). Since we want that p(t) = C(t) for all t, we can write: C (0) = 4C (0) + 6(C(1) C(0)) 2C (1), C (1) =2C (0) 6(C(1) C(0)) + 4C (1), C (0)(= C (1)) =6(C (1) 2(C(1) C(0)) + C (0)). If we substitute the previous values of C (0), C (1), C (0) and C (1) in the equations , we can calculate the unknown values α k for k = 3, 4, n 3, n 2: α 3 =3α 2 2α 1 + h2 3 C (0), α 4 = 1 2 (11α 3 21α α 1 ) + h 3 C (0), α n 2 = 2α n + 3α n 1 + h2 3 C (1), α n 3 = 1 2 (12α n 21α n α n 2 ) h 3 C (1).

97 The remainder values α k for k = 5,...,n 4 are calculated construing the polynomial p(x) of degree 3 that fits the data to α k for k = 3, 4, n 3, n 2, in a least squares sense. In the next chapter we describe how these algorithms are useful to define an interactive sketching interface. 83

98 84 Chapter 4. 2D Sketch curve style

99 Chapter 5 Implementation and examples An effective use of the multiresolution engine required the design of a specific user interface. Our aim was to build a workspace that could imitate the simplicity and ease of use of the sketching using pen and paper while adding digitalization and some useful interactive functions. Our system uses a graphic tablet with a wireless pen (Figure 5.1). Figure 5.1: User interface for intuitive sketching The active surface of the tablet corresponds to the PC monitor when the user sketches curves. Four Keys and two Touch sliders on the tablet are

100 86 Chapter 5. Implementation and examples mapped to interactive editing commands to avoid the designer having to use the computer keyboard while creating new ideas. The user can change interactively the resolution of the curve, simply by pressing right and left keys, with the possibility of unlimited undo. Furthermore the user can choose if execute the segmentation phase directly by the system with default parameters, or he/she can decide to define other parameters at runtime. The algorithms were implemented using MATLAB (version R2007a) with the Spline toolbox extended to vector-valued splines as described in [5]. We coded the multiresolution engine framework to handle the filter-bank decomposition algorithm for endpoint-interpolating B-spline curves which is performed in linear time using LU decomposition (see [4]) as described in [9]. The framework was tested using a laptop PC with an Intel 1.60 GHz. The test carried out with curves of industrial interest (design objects, outline bodywork, etc), showed that our sketch system is able to provide an interactive feedback (refresh rate always greater than 10Hz). We present some examples of segmentation with our approach both with synthetic curves and with real users sketches. The synthetic test curves showed in the Figures 5.2, 5.3, 5.4 and 5.5 are very different from style sketches and are used to test the theoretical efficacy of our algorithm. The curves (borrowed from signal theory) have sharp corners and singular points separated by straight lines and circular arcs. As we can see the segmentation algorithm is validated by finding the required characteristic points (the green points). Naturally the final curve is not formed by a unique curve but the segmentation points serve to divide curve in more parts, where we can find also discontinuities as appear in the outline of sketch car curves. In this way the designer can modify interactively only a part of the sketch stroke and apply multiresolution at fractional level to smooth the segment curve. Furthermore the possibility to maintain C 0 or C 1 continuity between curve parts, also after multiresolution phase, as demonstrated in the Section 4.7, does not modify the sketch intention. The examples shown in the Figures are taken from real style curves and represent two different profiles of existing cars. The number of sampled points is very high and this requires a simplification\ segmentation method in order to edit the curve. The first profile (Figure 5.6 and 5.7) is approximated with a cubic B-spline curve with control points while the second (Figure 5.8 and 5.9) with control points. In the Figure 5.10, instead, is showed a new sketch car generated by a stylist, the feature points detected are showed in Figure 5.11.

101 87 Figure 5.2: Synthetic curve segmentation: test A Figure 5.3: Synthetic curve segmentation: test B Figure 5.4: Synthetic curve segmentation: test C Figure 5.5: Synthetic curve segmentation: test D

102 88 Chapter 5. Implementation and examples Figure 5.6: Car body sketch with a graphic tablet Figure 5.7: Segmentation of the car outline Figure 5.8: Original car sketch profile (sedan) Figure 5.9: Seven features points detected on the sketched profile

103 89 Figure 5.10: New sketch car profile generated by a CAD designer Figure 5.11: Feature points detected by system after segmentation. After segmentation, the user can decide to accept or eliminate the splitting points suggested by the algorithm. Successively he/she can select a section of the original curve and execute a local simplification using multiresolution. An example that shows how work the local simplification of a selected curve part is shown in Figure In fact we have taken a detail section (Figure 5.12) of the car in Figure 5.6 and we have executed a local multiresolution simplification with C 0 constraint (Figure 5.13). Another example of multiresolution simplification with C 1 constraint is showed in Figure We can observe that the smoothed curve drawn in red conserves at the endpoints tangential continuity. The system clearly demonstrates to be able to provide a rapid evaluation of a continuous range of design alternatives basically controlling the simplification of segments with the slider on the tablet.

104 90 Chapter 5. Implementation and examples Figure 5.12: Curve extracted by profile of the car in Figure 5.5 after segmentation Figure 5.13: Example of local simplification of a sketch section: original and smoothed. Figure 5.14: Example of local simplification of a sketch section: original and smoothed with C 1 constraint.

105 Conclusion and future work We have presented, in this thesis, results obtained from two works that concern the numerical algorithms for curve approximation and novel user oriented interactive tools. The thesis is, in fact, divided in two part: Part one B-spline Curve Approximation with Optimal Knots Part two 2D sketching using multiresolution approach Function approximation by splines is a well known problem in literature, but in recent decades the greatest interest was addressed to spline approximation with free knots that entails to find the better placement of the knots. The Part one, in fact, starting from the results obtained from [18] and [14], presents a novel algorithmic method to approximate arbitrary curves by second order splines with free knots. This work extends the results, up to now obtained for strictly convex functions, to not convex functions, arriving to a mathematical formulation for plane curve. Furthermore, it presents the advantages obtained, respect to classical methods knows in the literature, approximating a curve after the knot elimination. With this new method, it is possible to construct a good approximation of a curve with one knot less, in term of the approximation error. In the Part two we have presented, instead, a new interactive method for 2D curve styling that uses a pen-based computer interface as the main interaction medium. The main novelty of the proposed method is that it is based on a unified multiresolution framework, that allows designers to segment, simplify, and smooth-edit sketch strokes. This system, studied to overcome the complexity of CAD sketching tools, provides intuitive and interactive tools to support the design phase with a full range of rapid sketch alternatives. User tests showed that our system is able to provide an interactive feedback.

106 92 Conclusion The users that used our system have appreciate the easiness of the sketching procedure, the user friendly interface and the command keys on the pen and the tablet. There are, however, some issues still to be addressed in further improvements. In the future we plan to use a multiresolution approach considering not uniform knot sequence to guarantee a more flexibility of the sketch curves and the multiresolution procedure for the segmentation and smoothedit phase. Furthermore we are testing the possibility to edit the sweep of a curve adding details captured of another curve (e.g. choosing from a curve features database). In this way the user will have the possibility to evaluate many more design alternatives. Furthermore, an important step will be to accorpate the two methods, presented in this thesis in the Part one and two, to construct an unique tool that can take advantage from both procedures.

107 Bibliography [1] L. Chieppa, B-spline curve approximation with optimal knots, Rapporto del Dipartimento di Matematica n. 15, Bari 23 Maggio [2] L. Chieppa, A. Liverani, Subdivision Surfaces For Industrial Design, in: 1st Symposium in Multidisciplinary Studies of Design in Mechanical Engineering, BOLOGNA, s.n, 2008, pp (atti di: 1st Symposium in Multidisciplinary Studies of Design in Mechanical Engineering, Bertinoro (Italy), June 2008). [3] L. Chieppa, M. Fiorentino, A. E. Uva, G. Monno, Interactive Wavelet Simplification of 2D Sketches for CAD Curve Styling, Proceedings of the TMCE, Ancona, April, (2010). [4] V. Comincioli, Analisi numerica: metodi modelli applicazioni, McGraw- Hill, (1995). [5] C. De Boor, A Practical Guide to Splines, Springer, (1978). [6] G. Elber, Multiresolution Curve Editing with Linear Constraints, Proceedings of the sixth ACM symposium on Solid modeling and applications, pp , (2001). [7] G. Elber, C. Gotsman, Multiresolution Control for Nonuniform B-spline Curve Editing, The third Pacific Graphics Conference on Computer Graphics and Applications, Seoul, Korea, pp , (1995). [8] G. Farin, Curves and surfaces for CAGD: A Pratical Guide 5th edition Morgan-Kaufmann, (2002). [9] A. Finkelstein, D.H. Salesin, Multiresolution Curves, Proceedings of SIG- GRAPH 94, ACM, New York, pp , (1994).

108 94 Bibliography [10] M. Fiorentino,G. Monno, P.A. Renzulli,A.E. Uva, 3D Sketch Stroke Segmentation and Fitting in Virtual Reality, International Conference on the Computer Graphics and Vision, (2003). [11] Foley, van Dam, Feiner, Hughes, Computer Graphics, Principles and Practice, Addison Wesley. 2nd Ed., (1990). [12] S.J. Gortler, Wavelet Methods for Computer Graphics, Ph.D. dissertation, Princeton University, (1995). [13] T. Grossman, R. Balakrishnan, G. Kurtenbach, G. Fitzmaurice, A. Khan, B. Buxton, Creating Principal 3D Curves with Digital Tape Drawing, ACM, CHI, Vol. 4(1), pp , (2002). [14] H. Hamideh,On the optimal knots of first degree spline, Kuwait J. Sci. Eng, 29(1), pp. 1 13, (2002). [15] D. Hearn, M.P. Baker, Computer Graphics, Prentice Hall, Inc., (1996). [16] T. Igarashi, S. Matsuoka, H. Tanaka, Teddy: A sketching interface for 3D freeform design, Proceedings of SIGGRAPH 99, pp , (1999). [17] D.H. Kim, M.J. Kim, A curvature estimation for pen input segmentation in sketch based modeling, Computer Aided Design, 38(3), pp , (2006). [18] J. B. Kioustelidis, K. J. Spyropoulos, L 1 Approximations of Strictly Convex Functions by Means of First Degree Splines, Computing, 20(1), pp , (1978). [19] B. Kripke, T. J. Rivlin Approximation of the metric of L 1 (X, µ), Transictions of the American Math Society, 119, pp , (1965). [20] T. Lyche, K. Morken, Knot removal for parametric B-spline curves and surfaces, Computer Aided Geometric Design, Elsevier, 4(3), pp , (1987). [21] G. Nürnberger, D. Braess, Nonuniqueness of best L p -approximation for generalized convex functions by splines with free knots, Numerical Functional Analysis and Optimization, 4(2), pp , (1982). [22] L. Olsen, F.F. Samavati, R.H. Bartels, Multiresolution B-Splines Based On Wavelet Constraints, Eurographics Symposium on Geometry Processing, pp. 1 10, (2005).

109 Bibliography 95 [23] L. Piegl, W. Tiller, The NURBS Book 2nd edition, Springer, (1997). [24] A. Pinkus, On L 1 Approximation, Cambridge University Press, Cambridge, UK (1989). [25] J. Pu, D. Gur, Automated freehand sketch segmentation using radial basis functions, Computer-Aided Design, In Press, Accepted Manuscript, (2009). [26] E. Quak, N. Weyrich, Decomposition and reconstruction algorithms for spline wavelets on a bounded interval, CAT Report 294, Center for Approximation Theory, TexasA&Muniversity, (1993). [27] J. R. Rice, The approximation of function, Reading, Mass:Addison- Wesley, 1, p. 106, (1964). [28] N. Ricker,The form and nature of seismic waves and the structure of seismograms, Geophysics, 5(4), pp , (1940). [29] P.L. Rosin, G.A.W. West, Nonparametric segmentation of curves into various representations, Pattern Analysis and Machine Intelligence, 17(12), pp , (1995). [30] T.M. Sezgin, Davis Randall, Scale-space Based Feature Point Detection for Noisy Digital Curves, MIT Arrtificial Intelligence Laboratory, (2001). [31] G. Taubin, A signal processing approach to fair surface design, In Proceeding of SIGGRAPH, (1995). [32] G. Taubin, Geometric signal processing on polygonal meshes, Eurographics 2000 State of the Art Report, (2000). [33] W. Tiller, Knot-removal algorithms for NURBS curves and surfaces, Computer-Aided Design, 24, pp , (1992). [34] O. Tolba, J. Dorsey, L. McMillan, Sketching with Projective 2D Strokes, Proceedings of the 12th Annual ACM Symposium on User Interface Software & Technology, CHI Letters, Vol. 1(1), pp , (1999). [35] W. Wana, J.A. Ventura, Segmentation of Planar Curves into Straight- Line Segments and Elliptical Arcs, Graphical Models and Image Processing, 59, pp , (1997).

110 96 Bibliography [36] R.C. Zeleznik, K.P. Herndon, J.F. Hughes, SKETCH: An interface for sketching 3D scenes, Proceedings of SIGGRAPH 96, pp , (1996). [37] ingrid/parlez-vous

111 Index B-spline curve, 7 Bézier conversion, 79 Bézier curve, 3 property, 5 Bernstein polynomial, 4 property, 4 Wavelet, 13 for CG, 14 Computer Graphics, 1 Continuity Constraints, 76 Divided difference, 81 Knot removal, 38 optimal, 40 standard, 39 Knot vector, 8 Nonuniform, 10 Open Uniform, 10 Uniform, 10 Multiresolution, 20 curve, 20 fractional-level, 71 Newton polynomial, 81 Optimal Knots, 27 cubic B-spline, 35 not convex function, 31 plane curves, 34 Segmentation, 72 Sketch curve, 63

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

Computer Graphics. Geometric Modeling. Page 1. Copyright Gotsman, Elber, Barequet, Karni, Sheffer Computer Science - Technion. An Example. An Example 2 3 4 Outline Objective: Develop methods and algorithms to mathematically model shape of real world objects Categories: Wire-Frame Representation Object is represented as as a set of points

More information

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

We can display an object on a monitor screen in three different computer-model forms: Wireframe model Surface Model Solid model CHAPTER 4 CURVES 4.1 Introduction In order to understand the significance of curves, we should look into the types of model representations that are used in geometric modeling. Curves play a very significant

More information

Figure 2.1: Center of mass of four points.

Figure 2.1: Center of mass of four points. Chapter 2 Bézier curves are named after their inventor, Dr. Pierre Bézier. Bézier was an engineer with the Renault car company and set out in the early 196 s to develop a curve formulation which would

More information

Geometric Modelling & Curves

Geometric Modelling & Curves Geometric Modelling & Curves Geometric Modeling Creating symbolic models of the physical world has long been a goal of mathematicians, scientists, engineers, etc. Recently technology has advanced sufficiently

More information

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

CSE 167: Lecture 13: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011 CSE 167: Introduction to Computer Graphics Lecture 13: Bézier Curves Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011 Announcements Homework project #6 due Friday, Nov 18

More information

(Refer Slide Time: 1:42)

(Refer Slide Time: 1:42) Introduction to Computer Graphics Dr. Prem Kalra Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture - 10 Curves So today we are going to have a new topic. So far

More information

Essential Mathematics for Computer Graphics fast

Essential Mathematics for Computer Graphics fast John Vince Essential Mathematics for Computer Graphics fast Springer Contents 1. MATHEMATICS 1 Is mathematics difficult? 3 Who should read this book? 4 Aims and objectives of this book 4 Assumptions made

More information

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

MA 323 Geometric Modelling Course Notes: Day 02 Model Construction Problem MA 323 Geometric Modelling Course Notes: Day 02 Model Construction Problem David L. Finn November 30th, 2004 In the next few days, we will introduce some of the basic problems in geometric modelling, and

More information

Wavelet analysis. Wavelet requirements. Example signals. Stationary signal 2 Hz + 10 Hz + 20Hz. Zero mean, oscillatory (wave) Fast decay (let)

Wavelet analysis. Wavelet requirements. Example signals. Stationary signal 2 Hz + 10 Hz + 20Hz. Zero mean, oscillatory (wave) Fast decay (let) Wavelet analysis In the case of Fourier series, the orthonormal basis is generated by integral dilation of a single function e jx Every 2π-periodic square-integrable function is generated by a superposition

More information

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

Computer Graphics CS 543 Lecture 12 (Part 1) Curves. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI) Computer Graphics CS 54 Lecture 1 (Part 1) Curves Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) So Far Dealt with straight lines and flat surfaces Real world objects include

More information

CHAPTER 1 Splines and B-splines an Introduction

CHAPTER 1 Splines and B-splines an Introduction CHAPTER 1 Splines and B-splines an Introduction In this first chapter, we consider the following fundamental problem: Given a set of points in the plane, determine a smooth curve that approximates the

More information

the points are called control points approximating curve

the points are called control points approximating curve Chapter 4 Spline Curves A spline curve is a mathematical representation for which it is easy to build an interface that will allow a user to design and control the shape of complex curves and surfaces.

More information

Modeling Curves and Surfaces

Modeling Curves and Surfaces Modeling Curves and Surfaces Graphics I Modeling for Computer Graphics!? 1 How can we generate this kind of objects? Umm!? Mathematical Modeling! S Do not worry too much about your difficulties in mathematics,

More information

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

3. Interpolation. Closing the Gaps of Discretization... Beyond Polynomials 3. Interpolation Closing the Gaps of Discretization... Beyond Polynomials Closing the Gaps of Discretization... Beyond Polynomials, December 19, 2012 1 3.3. Polynomial Splines Idea of Polynomial Splines

More information

Thnkwell s Homeschool Precalculus Course Lesson Plan: 36 weeks

Thnkwell s Homeschool Precalculus Course Lesson Plan: 36 weeks Thnkwell s Homeschool Precalculus Course Lesson Plan: 36 weeks Welcome to Thinkwell s Homeschool Precalculus! We re thrilled that you ve decided to make us part of your homeschool curriculum. This lesson

More information

Content. Chapter 4 Functions 61 4.1 Basic concepts on real functions 62. Credits 11

Content. Chapter 4 Functions 61 4.1 Basic concepts on real functions 62. Credits 11 Content Credits 11 Chapter 1 Arithmetic Refresher 13 1.1 Algebra 14 Real Numbers 14 Real Polynomials 19 1.2 Equations in one variable 21 Linear Equations 21 Quadratic Equations 22 1.3 Exercises 28 Chapter

More information

Copyrighted Material. Chapter 1 DEGREE OF A CURVE

Copyrighted Material. Chapter 1 DEGREE OF A CURVE Chapter 1 DEGREE OF A CURVE Road Map The idea of degree is a fundamental concept, which will take us several chapters to explore in depth. We begin by explaining what an algebraic curve is, and offer two

More information

Degree Reduction of Interval SB Curves

Degree Reduction of Interval SB Curves International Journal of Video&Image Processing and Network Security IJVIPNS-IJENS Vol:13 No:04 1 Degree Reduction of Interval SB Curves O. Ismail, Senior Member, IEEE Abstract Ball basis was introduced

More information

Section 1.1. Introduction to R n

Section 1.1. Introduction to R n The Calculus of Functions of Several Variables Section. Introduction to R n Calculus is the study of functional relationships and how related quantities change with each other. In your first exposure to

More information

NEW YORK STATE TEACHER CERTIFICATION EXAMINATIONS

NEW YORK STATE TEACHER CERTIFICATION EXAMINATIONS NEW YORK STATE TEACHER CERTIFICATION EXAMINATIONS TEST DESIGN AND FRAMEWORK September 2014 Authorized for Distribution by the New York State Education Department This test design and framework document

More information

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

Parametric Curves. (Com S 477/577 Notes) Yan-Bin Jia. Oct 8, 2015 Parametric Curves (Com S 477/577 Notes) Yan-Bin Jia Oct 8, 2015 1 Introduction A curve in R 2 (or R 3 ) is a differentiable function α : [a,b] R 2 (or R 3 ). The initial point is α[a] and the final point

More information

Point Lattices in Computer Graphics and Visualization how signal processing may help computer graphics

Point Lattices in Computer Graphics and Visualization how signal processing may help computer graphics Point Lattices in Computer Graphics and Visualization how signal processing may help computer graphics Dimitri Van De Ville Ecole Polytechnique Fédérale de Lausanne Biomedical Imaging Group [email protected]

More information

TWO-DIMENSIONAL TRANSFORMATION

TWO-DIMENSIONAL TRANSFORMATION CHAPTER 2 TWO-DIMENSIONAL TRANSFORMATION 2.1 Introduction As stated earlier, Computer Aided Design consists of three components, namely, Design (Geometric Modeling), Analysis (FEA, etc), and Visualization

More information

Estimated Pre Calculus Pacing Timeline

Estimated Pre Calculus Pacing Timeline Estimated Pre Calculus Pacing Timeline 2010-2011 School Year The timeframes listed on this calendar are estimates based on a fifty-minute class period. You may need to adjust some of them from time to

More information

Introduction to Computer Graphics

Introduction to Computer Graphics Introduction to Computer Graphics Torsten Möller TASC 8021 778-782-2215 [email protected] www.cs.sfu.ca/~torsten Today What is computer graphics? Contents of this course Syllabus Overview of course topics

More information

THREE DIMENSIONAL GEOMETRY

THREE DIMENSIONAL GEOMETRY Chapter 8 THREE DIMENSIONAL GEOMETRY 8.1 Introduction In this chapter we present a vector algebra approach to three dimensional geometry. The aim is to present standard properties of lines and planes,

More information

3. INNER PRODUCT SPACES

3. INNER PRODUCT SPACES . INNER PRODUCT SPACES.. Definition So far we have studied abstract vector spaces. These are a generalisation of the geometric spaces R and R. But these have more structure than just that of a vector space.

More information

South Carolina College- and Career-Ready (SCCCR) Pre-Calculus

South Carolina College- and Career-Ready (SCCCR) Pre-Calculus South Carolina College- and Career-Ready (SCCCR) Pre-Calculus Key Concepts Arithmetic with Polynomials and Rational Expressions PC.AAPR.2 PC.AAPR.3 PC.AAPR.4 PC.AAPR.5 PC.AAPR.6 PC.AAPR.7 Standards Know

More information

Estimating the Average Value of a Function

Estimating the Average Value of a Function Estimating the Average Value of a Function Problem: Determine the average value of the function f(x) over the interval [a, b]. Strategy: Choose sample points a = x 0 < x 1 < x 2 < < x n 1 < x n = b and

More information

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

Curves and Surfaces. Goals. How do we draw surfaces? How do we specify a surface? How do we approximate a surface? Curves and Surfaces Parametric Representations Cubic Polynomial Forms Hermite Curves Bezier Curves and Surfaces [Angel 10.1-10.6] Goals How do we draw surfaces? Approximate with polygons Draw polygons

More information

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

B2.53-R3: COMPUTER GRAPHICS. NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. B2.53-R3: COMPUTER GRAPHICS NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be answered in the TEAR-OFF ANSWER

More information

The Fourth International DERIVE-TI92/89 Conference Liverpool, U.K., 12-15 July 2000. Derive 5: The Easiest... Just Got Better!

The Fourth International DERIVE-TI92/89 Conference Liverpool, U.K., 12-15 July 2000. Derive 5: The Easiest... Just Got Better! The Fourth International DERIVE-TI9/89 Conference Liverpool, U.K., -5 July 000 Derive 5: The Easiest... Just Got Better! Michel Beaudin École de technologie supérieure 00, rue Notre-Dame Ouest Montréal

More information

CS 4204 Computer Graphics

CS 4204 Computer Graphics CS 4204 Computer Graphics Computer Animation Adapted from notes by Yong Cao Virginia Tech 1 Outline Principles of Animation Keyframe Animation Additional challenges in animation 2 Classic animation Luxo

More information

BEZIER CURVES AND SURFACES

BEZIER CURVES AND SURFACES Department of Applied Mathematics and Computational Sciences University of Cantabria UC-CAGD Group COMPUTER-AIDED GEOMETRIC DESIGN AND COMPUTER GRAPHICS: BEZIER CURVES AND SURFACES Andrés Iglesias e-mail:

More information

Higher Education Math Placement

Higher Education Math Placement Higher Education Math Placement Placement Assessment Problem Types 1. Whole Numbers, Fractions, and Decimals 1.1 Operations with Whole Numbers Addition with carry Subtraction with borrowing Multiplication

More information

Piecewise Cubic Splines

Piecewise Cubic Splines 280 CHAP. 5 CURVE FITTING Piecewise Cubic Splines The fitting of a polynomial curve to a set of data points has applications in CAD (computer-assisted design), CAM (computer-assisted manufacturing), and

More information

PYTHAGOREAN TRIPLES KEITH CONRAD

PYTHAGOREAN TRIPLES KEITH CONRAD PYTHAGOREAN TRIPLES KEITH CONRAD 1. Introduction A Pythagorean triple is a triple of positive integers (a, b, c) where a + b = c. Examples include (3, 4, 5), (5, 1, 13), and (8, 15, 17). Below is an ancient

More information

KEANSBURG SCHOOL DISTRICT KEANSBURG HIGH SCHOOL Mathematics Department. HSPA 10 Curriculum. September 2007

KEANSBURG SCHOOL DISTRICT KEANSBURG HIGH SCHOOL Mathematics Department. HSPA 10 Curriculum. September 2007 KEANSBURG HIGH SCHOOL Mathematics Department HSPA 10 Curriculum September 2007 Written by: Karen Egan Mathematics Supervisor: Ann Gagliardi 7 days Sample and Display Data (Chapter 1 pp. 4-47) Surveys and

More information

Part-Based Recognition

Part-Based Recognition Part-Based Recognition Benedict Brown CS597D, Fall 2003 Princeton University CS 597D, Part-Based Recognition p. 1/32 Introduction Many objects are made up of parts It s presumably easier to identify simple

More information

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B KITCHENS The equation 1 Lines in two-dimensional space (1) 2x y = 3 describes a line in two-dimensional space The coefficients of x and y in the equation

More information

Georgia Department of Education Kathy Cox, State Superintendent of Schools 7/19/2005 All Rights Reserved 1

Georgia Department of Education Kathy Cox, State Superintendent of Schools 7/19/2005 All Rights Reserved 1 Accelerated Mathematics 3 This is a course in precalculus and statistics, designed to prepare students to take AB or BC Advanced Placement Calculus. It includes rational, circular trigonometric, and inverse

More information

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions. Chapter 1 Vocabulary identity - A statement that equates two equivalent expressions. verbal model- A word equation that represents a real-life problem. algebraic expression - An expression with variables.

More information

The Essentials of CAGD

The Essentials of CAGD The Essentials of CAGD Chapter 2: Lines and Planes Gerald Farin & Dianne Hansford CRC Press, Taylor & Francis Group, An A K Peters Book www.farinhansford.com/books/essentials-cagd c 2000 Farin & Hansford

More information

Dhiren Bhatia Carnegie Mellon University

Dhiren Bhatia Carnegie Mellon University Dhiren Bhatia Carnegie Mellon University University Course Evaluations available online Please Fill! December 4 : In-class final exam Held during class time All students expected to give final this date

More information

Polynomial Degree and Finite Differences

Polynomial Degree and Finite Differences CONDENSED LESSON 7.1 Polynomial Degree and Finite Differences In this lesson you will learn the terminology associated with polynomials use the finite differences method to determine the degree of a polynomial

More information

Big Ideas in Mathematics

Big Ideas in Mathematics Big Ideas in Mathematics which are important to all mathematics learning. (Adapted from the NCTM Curriculum Focal Points, 2006) The Mathematics Big Ideas are organized using the PA Mathematics Standards

More information

Classification of Fingerprints. Sarat C. Dass Department of Statistics & Probability

Classification of Fingerprints. Sarat C. Dass Department of Statistics & Probability Classification of Fingerprints Sarat C. Dass Department of Statistics & Probability Fingerprint Classification Fingerprint classification is a coarse level partitioning of a fingerprint database into smaller

More information

A Short Introduction to Computer Graphics

A Short Introduction to Computer Graphics A Short Introduction to Computer Graphics Frédo Durand MIT Laboratory for Computer Science 1 Introduction Chapter I: Basics Although computer graphics is a vast field that encompasses almost any graphical

More information

Nonlinear Iterative Partial Least Squares Method

Nonlinear Iterative Partial Least Squares Method Numerical Methods for Determining Principal Component Analysis Abstract Factors Béchu, S., Richard-Plouet, M., Fernandez, V., Walton, J., and Fairley, N. (2016) Developments in numerical treatments for

More information

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

Corollary. (f є C n+1 [a,b]). Proof: This follows directly from the preceding theorem using the inequality Corollary For equidistant knots, i.e., u i = a + i (b-a)/n, we obtain with (f є C n+1 [a,b]). Proof: This follows directly from the preceding theorem using the inequality 120202: ESM4A - Numerical Methods

More information

Introduction to time series analysis

Introduction to time series analysis Introduction to time series analysis Margherita Gerolimetto November 3, 2010 1 What is a time series? A time series is a collection of observations ordered following a parameter that for us is time. Examples

More information

Solving Simultaneous Equations and Matrices

Solving Simultaneous Equations and Matrices Solving Simultaneous Equations and Matrices The following represents a systematic investigation for the steps used to solve two simultaneous linear equations in two unknowns. The motivation for considering

More information

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

A matrix method for degree-raising of B-spline curves * VOI. 40 NO. 1 SCIENCE IN CHINA (Series E) February 1997 A matrix method for degree-raising of B-spline curves * QIN Kaihuai (%*>/$) (Department of Computer Science and Technology, Tsinghua University,

More information

1 if 1 x 0 1 if 0 x 1

1 if 1 x 0 1 if 0 x 1 Chapter 3 Continuity In this chapter we begin by defining the fundamental notion of continuity for real valued functions of a single real variable. When trying to decide whether a given function is or

More information

2.2 Creaseness operator

2.2 Creaseness operator 2.2. Creaseness operator 31 2.2 Creaseness operator Antonio López, a member of our group, has studied for his PhD dissertation the differential operators described in this section [72]. He has compared

More information

Mathematics Course 111: Algebra I Part IV: Vector Spaces

Mathematics Course 111: Algebra I Part IV: Vector Spaces Mathematics Course 111: Algebra I Part IV: Vector Spaces D. R. Wilkins Academic Year 1996-7 9 Vector Spaces A vector space over some field K is an algebraic structure consisting of a set V on which are

More information

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

EECS 556 Image Processing W 09. Interpolation. Interpolation techniques B splines EECS 556 Image Processing W 09 Interpolation Interpolation techniques B splines What is image processing? Image processing is the application of 2D signal processing methods to images Image representation

More information

SIGNAL PROCESSING & SIMULATION NEWSLETTER

SIGNAL PROCESSING & SIMULATION NEWSLETTER 1 of 10 1/25/2008 3:38 AM SIGNAL PROCESSING & SIMULATION NEWSLETTER Note: This is not a particularly interesting topic for anyone other than those who ar e involved in simulation. So if you have difficulty

More information

An Overview of the Finite Element Analysis

An Overview of the Finite Element Analysis CHAPTER 1 An Overview of the Finite Element Analysis 1.1 Introduction Finite element analysis (FEA) involves solution of engineering problems using computers. Engineering structures that have complex geometry

More information

Introduction to Quadratic Functions

Introduction to Quadratic Functions Introduction to Quadratic Functions The St. Louis Gateway Arch was constructed from 1963 to 1965. It cost 13 million dollars to build..1 Up and Down or Down and Up Exploring Quadratic Functions...617.2

More information

Derive 5: The Easiest... Just Got Better!

Derive 5: The Easiest... Just Got Better! Liverpool John Moores University, 1-15 July 000 Derive 5: The Easiest... Just Got Better! Michel Beaudin École de Technologie Supérieure, Canada Email; [email protected] 1. Introduction Engineering

More information

Problem Set 5 Due: In class Thursday, Oct. 18 Late papers will be accepted until 1:00 PM Friday.

Problem Set 5 Due: In class Thursday, Oct. 18 Late papers will be accepted until 1:00 PM Friday. Math 312, Fall 2012 Jerry L. Kazdan Problem Set 5 Due: In class Thursday, Oct. 18 Late papers will be accepted until 1:00 PM Friday. In addition to the problems below, you should also know how to solve

More information

Algebra Unpacked Content For the new Common Core standards that will be effective in all North Carolina schools in the 2012-13 school year.

Algebra Unpacked Content For the new Common Core standards that will be effective in all North Carolina schools in the 2012-13 school year. This document is designed to help North Carolina educators teach the Common Core (Standard Course of Study). NCDPI staff are continually updating and improving these tools to better serve teachers. Algebra

More information

Prentice Hall Algebra 2 2011 Correlated to: Colorado P-12 Academic Standards for High School Mathematics, Adopted 12/2009

Prentice Hall Algebra 2 2011 Correlated to: Colorado P-12 Academic Standards for High School Mathematics, Adopted 12/2009 Content Area: Mathematics Grade Level Expectations: High School Standard: Number Sense, Properties, and Operations Understand the structure and properties of our number system. At their most basic level

More information

Algebra 1 2008. Academic Content Standards Grade Eight and Grade Nine Ohio. Grade Eight. Number, Number Sense and Operations Standard

Algebra 1 2008. Academic Content Standards Grade Eight and Grade Nine Ohio. Grade Eight. Number, Number Sense and Operations Standard Academic Content Standards Grade Eight and Grade Nine Ohio Algebra 1 2008 Grade Eight STANDARDS Number, Number Sense and Operations Standard Number and Number Systems 1. Use scientific notation to express

More information

South Carolina College- and Career-Ready (SCCCR) Algebra 1

South Carolina College- and Career-Ready (SCCCR) Algebra 1 South Carolina College- and Career-Ready (SCCCR) Algebra 1 South Carolina College- and Career-Ready Mathematical Process Standards The South Carolina College- and Career-Ready (SCCCR) Mathematical Process

More information

Computer Animation: Art, Science and Criticism

Computer Animation: Art, Science and Criticism Computer Animation: Art, Science and Criticism Tom Ellman Harry Roseman Lecture 4 Parametric Curve A procedure for distorting a straight line into a (possibly) curved line. The procedure lives in a black

More information

Review of Fundamental Mathematics

Review of Fundamental Mathematics Review of Fundamental Mathematics As explained in the Preface and in Chapter 1 of your textbook, managerial economics applies microeconomic theory to business decision making. The decision-making tools

More information

Seminar. Path planning using Voronoi diagrams and B-Splines. Stefano Martina [email protected]

Seminar. Path planning using Voronoi diagrams and B-Splines. Stefano Martina stefano.martina@stud.unifi.it Seminar Path planning using Voronoi diagrams and B-Splines Stefano Martina [email protected] 23 may 2016 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International

More information

Inner Product Spaces

Inner Product Spaces Math 571 Inner Product Spaces 1. Preliminaries An inner product space is a vector space V along with a function, called an inner product which associates each pair of vectors u, v with a scalar u, v, and

More information

CORRELATED TO THE SOUTH CAROLINA COLLEGE AND CAREER-READY FOUNDATIONS IN ALGEBRA

CORRELATED TO THE SOUTH CAROLINA COLLEGE AND CAREER-READY FOUNDATIONS IN ALGEBRA We Can Early Learning Curriculum PreK Grades 8 12 INSIDE ALGEBRA, GRADES 8 12 CORRELATED TO THE SOUTH CAROLINA COLLEGE AND CAREER-READY FOUNDATIONS IN ALGEBRA April 2016 www.voyagersopris.com Mathematical

More information

Common Core Unit Summary Grades 6 to 8

Common Core Unit Summary Grades 6 to 8 Common Core Unit Summary Grades 6 to 8 Grade 8: Unit 1: Congruence and Similarity- 8G1-8G5 rotations reflections and translations,( RRT=congruence) understand congruence of 2 d figures after RRT Dilations

More information

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Lecture - 17 Shannon-Fano-Elias Coding and Introduction to Arithmetic Coding

More information

DIEF, Department of Engineering Enzo Ferrari University of Modena e Reggio Emilia Italy Online Trajectory Planning for robotic systems

DIEF, Department of Engineering Enzo Ferrari University of Modena e Reggio Emilia Italy Online Trajectory Planning for robotic systems DIEF, Department of Engineering Enzo Ferrari University of Modena e Reggio Emilia Italy Online Trajectory Planning for robotic systems Luigi Biagiotti Luigi Biagiotti [email protected] Introduction

More information

CONTROLLABILITY. Chapter 2. 2.1 Reachable Set and Controllability. Suppose we have a linear system described by the state equation

CONTROLLABILITY. Chapter 2. 2.1 Reachable Set and Controllability. Suppose we have a linear system described by the state equation Chapter 2 CONTROLLABILITY 2 Reachable Set and Controllability Suppose we have a linear system described by the state equation ẋ Ax + Bu (2) x() x Consider the following problem For a given vector x in

More information

Math 241, Exam 1 Information.

Math 241, Exam 1 Information. Math 241, Exam 1 Information. 9/24/12, LC 310, 11:15-12:05. Exam 1 will be based on: Sections 12.1-12.5, 14.1-14.3. The corresponding assigned homework problems (see http://www.math.sc.edu/ boylan/sccourses/241fa12/241.html)

More information

Introduction to Computer Graphics Marie-Paule Cani & Estelle Duveau

Introduction to Computer Graphics Marie-Paule Cani & Estelle Duveau Introduction to Computer Graphics Marie-Paule Cani & Estelle Duveau 04/02 Introduction & projective rendering 11/02 Prodedural modeling, Interactive modeling with parametric surfaces 25/02 Introduction

More information

Numerical Analysis Lecture Notes

Numerical Analysis Lecture Notes Numerical Analysis Lecture Notes Peter J. Olver 5. Inner Products and Norms The norm of a vector is a measure of its size. Besides the familiar Euclidean norm based on the dot product, there are a number

More information

The degree of a polynomial function is equal to the highest exponent found on the independent variables.

The degree of a polynomial function is equal to the highest exponent found on the independent variables. DETAILED SOLUTIONS AND CONCEPTS - POLYNOMIAL FUNCTIONS Prepared by Ingrid Stewart, Ph.D., College of Southern Nevada Please Send Questions and Comments to [email protected]. Thank you! PLEASE NOTE

More information

Offline sorting buffers on Line

Offline sorting buffers on Line Offline sorting buffers on Line Rohit Khandekar 1 and Vinayaka Pandit 2 1 University of Waterloo, ON, Canada. email: [email protected] 2 IBM India Research Lab, New Delhi. email: [email protected]

More information

Solution of Linear Systems

Solution of Linear Systems Chapter 3 Solution of Linear Systems In this chapter we study algorithms for possibly the most commonly occurring problem in scientific computing, the solution of linear systems of equations. We start

More information

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

Prentice Hall Mathematics: Algebra 2 2007 Correlated to: Utah Core Curriculum for Math, Intermediate Algebra (Secondary) Core Standards of the Course Standard 1 Students will acquire number sense and perform operations with real and complex numbers. Objective 1.1 Compute fluently and make reasonable estimates. 1. Simplify

More information

11.1. Objectives. Component Form of a Vector. Component Form of a Vector. Component Form of a Vector. Vectors and the Geometry of Space

11.1. Objectives. Component Form of a Vector. Component Form of a Vector. Component Form of a Vector. Vectors and the Geometry of Space 11 Vectors and the Geometry of Space 11.1 Vectors in the Plane Copyright Cengage Learning. All rights reserved. Copyright Cengage Learning. All rights reserved. 2 Objectives! Write the component form of

More information

Linear algebra and the geometry of quadratic equations. Similarity transformations and orthogonal matrices

Linear algebra and the geometry of quadratic equations. Similarity transformations and orthogonal matrices MATH 30 Differential Equations Spring 006 Linear algebra and the geometry of quadratic equations Similarity transformations and orthogonal matrices First, some things to recall from linear algebra Two

More information

ISOMETRIES OF R n KEITH CONRAD

ISOMETRIES OF R n KEITH CONRAD ISOMETRIES OF R n KEITH CONRAD 1. Introduction An isometry of R n is a function h: R n R n that preserves the distance between vectors: h(v) h(w) = v w for all v and w in R n, where (x 1,..., x n ) = x

More information

http://www.aleks.com Access Code: RVAE4-EGKVN Financial Aid Code: 6A9DB-DEE3B-74F51-57304

http://www.aleks.com Access Code: RVAE4-EGKVN Financial Aid Code: 6A9DB-DEE3B-74F51-57304 MATH 1340.04 College Algebra Location: MAGC 2.202 Meeting day(s): TR 7:45a 9:00a, Instructor Information Name: Virgil Pierce Email: [email protected] Phone: 665.3535 Teaching Assistant Name: Indalecio

More information

A Learning Based Method for Super-Resolution of Low Resolution Images

A Learning Based Method for Super-Resolution of Low Resolution Images A Learning Based Method for Super-Resolution of Low Resolution Images Emre Ugur June 1, 2004 [email protected] Abstract The main objective of this project is the study of a learning based method

More information

An Iterative Image Registration Technique with an Application to Stereo Vision

An Iterative Image Registration Technique with an Application to Stereo Vision An Iterative Image Registration Technique with an Application to Stereo Vision Bruce D. Lucas Takeo Kanade Computer Science Department Carnegie-Mellon University Pittsburgh, Pennsylvania 15213 Abstract

More information

Orthogonal Projections

Orthogonal Projections Orthogonal Projections and Reflections (with exercises) by D. Klain Version.. Corrections and comments are welcome! Orthogonal Projections Let X,..., X k be a family of linearly independent (column) vectors

More information

Finite Element Formulation for Plates - Handout 3 -

Finite Element Formulation for Plates - Handout 3 - Finite Element Formulation for Plates - Handout 3 - Dr Fehmi Cirak (fc286@) Completed Version Definitions A plate is a three dimensional solid body with one of the plate dimensions much smaller than the

More information

BX in ( u, v) basis in two ways. On the one hand, AN = u+

BX in ( u, v) basis in two ways. On the one hand, AN = u+ 1. Let f(x) = 1 x +1. Find f (6) () (the value of the sixth derivative of the function f(x) at zero). Answer: 7. We expand the given function into a Taylor series at the point x = : f(x) = 1 x + x 4 x

More information

Tracking Moving Objects In Video Sequences Yiwei Wang, Robert E. Van Dyck, and John F. Doherty Department of Electrical Engineering The Pennsylvania State University University Park, PA16802 Abstract{Object

More information

North Carolina Math 2

North Carolina Math 2 Standards for Mathematical Practice 1. Make sense of problems and persevere in solving them. 2. Reason abstractly and quantitatively 3. Construct viable arguments and critique the reasoning of others 4.

More information

Understanding Basic Calculus

Understanding Basic Calculus Understanding Basic Calculus S.K. Chung Dedicated to all the people who have helped me in my life. i Preface This book is a revised and expanded version of the lecture notes for Basic Calculus and other

More information

Module1. x 1000. y 800.

Module1. x 1000. y 800. Module1 1 Welcome to the first module of the course. It is indeed an exciting event to share with you the subject that has lot to offer both from theoretical side and practical aspects. To begin with,

More information

THEORETICAL MECHANICS

THEORETICAL MECHANICS PROF. DR. ING. VASILE SZOLGA THEORETICAL MECHANICS LECTURE NOTES AND SAMPLE PROBLEMS PART ONE STATICS OF THE PARTICLE, OF THE RIGID BODY AND OF THE SYSTEMS OF BODIES KINEMATICS OF THE PARTICLE 2010 0 Contents

More information

OPRE 6201 : 2. Simplex Method

OPRE 6201 : 2. Simplex Method OPRE 6201 : 2. Simplex Method 1 The Graphical Method: An Example Consider the following linear program: Max 4x 1 +3x 2 Subject to: 2x 1 +3x 2 6 (1) 3x 1 +2x 2 3 (2) 2x 2 5 (3) 2x 1 +x 2 4 (4) x 1, x 2

More information

2.2. Instantaneous Velocity

2.2. Instantaneous Velocity 2.2. Instantaneous Velocity toc Assuming that your are not familiar with the technical aspects of this section, when you think about it, your knowledge of velocity is limited. In terms of your own mathematical

More information

CS 4620 Practicum Programming Assignment 6 Animation

CS 4620 Practicum Programming Assignment 6 Animation CS 4620 Practicum Programming Assignment 6 Animation out: Friday 14th November 2014 due: : Monday 24th November 2014 1 Introduction In this assignment, we will explore a common topic in animation: key

More information

A QUICK GUIDE TO THE FORMULAS OF MULTIVARIABLE CALCULUS

A QUICK GUIDE TO THE FORMULAS OF MULTIVARIABLE CALCULUS A QUIK GUIDE TO THE FOMULAS OF MULTIVAIABLE ALULUS ontents 1. Analytic Geometry 2 1.1. Definition of a Vector 2 1.2. Scalar Product 2 1.3. Properties of the Scalar Product 2 1.4. Length and Unit Vectors

More information