Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.                                    Upcoming SlideShare
Loading in …5
×

# Curve and surface interpolation and approximation

3,584 views

Published on

An abstract of my final project in bachelor\'s degree in Mathematics: interpolation and approximation of curves and surfaces with B-Spline basis functions

• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here • Be the first to comment

### Curve and surface interpolation and approximation

1. 1. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyCurve and surface interpolation and approximation by piecewise polynomial functions Alejandro Cosin Ayerbe June 2012 Curve and surface interpolation and approximation by piecewise polynomial
2. 2. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyIntroductionThis presentation is an abstract of my ﬁnal project in bachelor’s degree in Mathematics,the goals of the project were the following: Study and develop powerful methods of curve and surface interpolation and approximation. Curve and surface interpolation and approximation by piecewise polynomial
3. 3. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyIntroductionThis presentation is an abstract of my ﬁnal project in bachelor’s degree in Mathematics,the goals of the project were the following: Study and develop powerful methods of curve and surface interpolation and approximation. Cover the two main current approaches: global and local. Curve and surface interpolation and approximation by piecewise polynomial
4. 4. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyIntroductionThis presentation is an abstract of my ﬁnal project in bachelor’s degree in Mathematics,the goals of the project were the following: Study and develop powerful methods of curve and surface interpolation and approximation. Cover the two main current approaches: global and local. Matlab is used as the programming tool, developing methods so that the translation to C++ is straightforward. Curve and surface interpolation and approximation by piecewise polynomial
5. 5. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyIntroductionThis presentation is an abstract of my ﬁnal project in bachelor’s degree in Mathematics,the goals of the project were the following: Study and develop powerful methods of curve and surface interpolation and approximation. Cover the two main current approaches: global and local. Matlab is used as the programming tool, developing methods so that the translation to C++ is straightforward. Automate the approximation process for surfaces and curves in order to generate a solution that meets a preset maximum error. Curve and surface interpolation and approximation by piecewise polynomial
6. 6. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyB-Spline basis functionsB-Spline basis functions can be used to build curves and surfaces, they are highlyversatile and have important mathematical properties.Given the knot vector U = {0, 0, 0, 1, 2, 3, 3, 4, 4, 5, 5, 5}, the B-Spline functions of degree0, 1 and 2 are as follows: Curve and surface interpolation and approximation by piecewise polynomial
7. 7. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfacesApproximation to within a speciﬁed accuracy Curve and surface interpolation and approximation by piecewise polynomial
8. 8. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyB-Spline curves and surfacesB-Spline curves and surfaces they are linear combination of B-Spline basis functions, sothey have also good properties:Strong convex hull: Curve and surface interpolation and approximation by piecewise polynomial
9. 9. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyLocal modiﬁcation scheme: Curve and surface interpolation and approximation by piecewise polynomial
10. 10. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyCoincident control points:A well known example of such curves and surfaces are the NURBS (Non-UniformRational B-Splines). In this case, the curves and surfaces generated will be Non-UniformNon-Rational B-Splines, very similar. Curve and surface interpolation and approximation by piecewise polynomial
11. 11. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyGlobal interpolationOnce functions to obtain the values of the B-Spline basis functions have beenprogrammed, interpolation conditions can be imposed to obtain the control points thatdeﬁne a curve or surface.If the degree is given and the knot and parameter vectors are estimated, a globalapproach to the problem results in a linear system, easy to solve: given the set of pointsQ=[[1,1]’,[3,3]’, [6,0]’,[8,2]’,[11,5]’], a second degree B-Spline curveinterpolating these points is shown below: Curve and surface interpolation and approximation by piecewise polynomial
12. 12. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyIt is possible to add derivative constraints to the interpolation problem, and interpolatethe derivative vector at the beginning and the end of the curve: given a degree, 2, the setof points Q=[[1,1]’,[3,3]’,[6,0]’,[8,2]’,[11,5]’], and the vectorsD=[[-3,-1]’,[0,3]’] and D=[[6,-4]’,[-3,4]’], the B-Spline curves interpolatingthis data are shown below:Derivative constraints can be added to all the points of the curve. Curve and surface interpolation and approximation by piecewise polynomial
13. 13. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyThe process of interpolating a set of points arranged in grid using global techniques ismuch easier than it looks. If the degree (p, q) of the surface is given, and knot vectors Uand V and parameter vectors are estimated, the interpolating surface can be obtainedthrough a small number of curve interpolations, because B-Spline sufaces are tensorproduct surfaces. This avoids to solve large linear systems. Curve and surface interpolation and approximation by piecewise polynomial
14. 14. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfacesApproximation to within a speciﬁed accuracy Curve and surface interpolation and approximation by piecewise polynomial
15. 15. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyExample: given the set of pointsQ=[[4,0,1]’,[3,0,1]’,[2,0,1]’,[1,0,1]’,[0,0,1]’,[4,1,1]’,[3,1,1]’,...[2,1,1]’,[1,1,1]’,[0,1,1]’,[4,2,1]’,[3,2,1]’,[2,2,2]’,[1,2,1]’,...[0,2,1]’,[4,3,1]’,[3,3,1]’,[2,3,1]’,[1,3,1]’,[0,3,1]’,[4,4,1]’,...[3,4,1]’,[2,4,1]’,[1,4,1]’,[0,4,1]’];the B-Spline interpolating surface of degree (2, 2) for this set is shown below: Curve and surface interpolation and approximation by piecewise polynomial
16. 16. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyLocal interpolationA local interpolation scheme consists in generating segments of curve or surface wich joinwith a pre established level of continuity, given by the method of interpolation used.In the case of curves, each segment is known as B´zier segment, and in the case of esurfaces, each segment is known as B´zier patch. eThere is a local interpolation method, due to Renner, which performs local interpolationof a set of points, generating a cubic B-Spline curve. Curve and surface interpolation and approximation by piecewise polynomial
17. 17. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyLocal interpolation example for curves: given the set of pointsQ=[[1,2]’,[2,4]’,[3,1]’,[5,3]’,[6,1]’,[7,4]’], the cubic interpolating curve isshown below (in blue):Note that each control point is in the (estimated) tangent of each point to beinterpolated. Curve and surface interpolation and approximation by piecewise polynomial
18. 18. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyFor the case of surfaces, given a set of points arranged in grid, bicubic (degree (3, 3))B´zier patches are build. The construction of each B´zier patch is the key of this e einterpolation method. The inner control points of each patch are obtained with the helpof estimates of mixed partial derivatives.The next image shows a scheme of the simplest case of local interpolation, when thereare only four points in the grid (in the corners). The outer control points are obtainedwith the local interpolation method for curves seen before, and the inner ones withestimates of mixed partial derivatives (control points are denoted Pi,j ): Curve and surface interpolation and approximation by piecewise polynomial
19. 19. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyOnce the control points of each B´zier patch are obtained, the control points of the einterpolating surface are obtained by eliminating B´zier points along inner rows and ecolumns. An example is shown below (with control points in blue, and interpolatedpoints in red), for the set of points:Q=[[2,0,2]’,[1,0,2]’,[0,0,3]’,[2,1,2]’,[1,1,2]’,[0,1,3]’,[2,2,1]’,[1,2,1]’,[0,2,2]’,[2,3,1]’,[1,3,1]’,[0,3,2]’] Curve and surface interpolation and approximation by piecewise polynomial
20. 20. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyGlobal approximation of curves and surfacesThe approximation of a set of points with a curve can be achieved in various ways. Oneof them is the least squares approximation scheme, a global scheme in which theresulting curve minimizes the error in the least squares sense, i.e., the sum of the squareddistances between each point and the resulting curve is minimum with respect to theunknowns (the control points in this case).For being a global scheme, the degree of the curve must be given, as well as the knot andparameter vectors.Given a set of m + 1 points, the curve can be build with up to m control points, becausethe case of m + 1 control points is the interpolation case. The endpoints of the curve areinterpolated, while the inner points are approximated in the least squares sense. Curve and surface interpolation and approximation by piecewise polynomial
21. 21. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyExample: given the set of points:Q=[[0,0]’,[3,1]’,[2,4]’,[-1,5]’,[-1,6]’,[2,7]’,[5,10]’,...[-3,12]’,[0,14]’,[3,16]’,[-5,17]’,[2,19]’];the next ﬁgure shows two cubic curves (in blue) approximating these points, with six andnine control points respectively (the more control points, the better the approximation): Curve and surface interpolation and approximation by piecewise polynomial
22. 22. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyFor the case of surfaces, the approximation process is analogous to the interpolationprocess: using the preceding method for curves, only a few approximations are requiredto obtain the least squares surface. The next two ﬁgures show this process: Curve and surface interpolation and approximation by piecewise polynomial
23. 23. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfacesApproximation to within a speciﬁed accuracy Curve and surface interpolation and approximation by piecewise polynomial
24. 24. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyThe resulting approximation, and an interpolation of the same set of points are shownbelow (control points in blue color, initial set of point in red): Curve and surface interpolation and approximation by piecewise polynomial
25. 25. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyApproximation to within a speciﬁed accuracyThe preceding techniques of curve and surface approximation can be used in iterativemethods of approximating data to within some speciﬁed error bound.Iterative methods proceed in two ways: adding control points (starting with only a few ofthem), or removing control points (starting with many or enough control points).Given a set of points to be approximated, the degree and an error bound E , a techniquebased in adding control points proceeds as follows: 1 Start with the minimum number of control points. Curve and surface interpolation and approximation by piecewise polynomial
26. 26. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyApproximation to within a speciﬁed accuracyThe preceding techniques of curve and surface approximation can be used in iterativemethods of approximating data to within some speciﬁed error bound.Iterative methods proceed in two ways: adding control points (starting with only a few ofthem), or removing control points (starting with many or enough control points).Given a set of points to be approximated, the degree and an error bound E , a techniquebased in adding control points proceeds as follows: 1 Start with the minimum number of control points. 2 Using a global method, approximate a curve (or surface) to the data. Curve and surface interpolation and approximation by piecewise polynomial
27. 27. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyApproximation to within a speciﬁed accuracyThe preceding techniques of curve and surface approximation can be used in iterativemethods of approximating data to within some speciﬁed error bound.Iterative methods proceed in two ways: adding control points (starting with only a few ofthem), or removing control points (starting with many or enough control points).Given a set of points to be approximated, the degree and an error bound E , a techniquebased in adding control points proceeds as follows: 1 Start with the minimum number of control points. 2 Using a global method, approximate a curve (or surface) to the data. 3 Check the deviation of the curve (or surface) from the data. Curve and surface interpolation and approximation by piecewise polynomial
28. 28. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyApproximation to within a speciﬁed accuracyThe preceding techniques of curve and surface approximation can be used in iterativemethods of approximating data to within some speciﬁed error bound.Iterative methods proceed in two ways: adding control points (starting with only a few ofthem), or removing control points (starting with many or enough control points).Given a set of points to be approximated, the degree and an error bound E , a techniquebased in adding control points proceeds as follows: 1 Start with the minimum number of control points. 2 Using a global method, approximate a curve (or surface) to the data. 3 Check the deviation of the curve (or surface) from the data. 4 If the deviation is greater than E at any point, return to step 2, else end the process. Curve and surface interpolation and approximation by piecewise polynomial
29. 29. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyTo check the error after each approximation, is necessary to obtain the closest point of acurve or surface to a given point. This is an inverse function problem, which can besolved through the Newton method or similar. The following image shows examples forcurves and surfaces. Curve and surface interpolation and approximation by piecewise polynomial
30. 30. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfacesApproximation to within a speciﬁed accuracy Curve and surface interpolation and approximation by piecewise polynomial
31. 31. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyThe following is a curve approximation example with an error bound E = 0.45. Initiallythe the number of control points is three (the degree plus two). Each curve generatedpasses closer to the points to be approximated.E = 0.45;Q=[[0,0]’,[3,1]’,[2,4]’,[-1,5]’,[-1,6]’,[2,7]’,[5,10]’,...[-3,12]’,[0,14]’,[3,16]’,[-5,17]’,[2,19]’]; Curve and surface interpolation and approximation by piecewise polynomial
32. 32. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyFor the case of surfaces, the iterative process beneﬁts from the tensor product surfaceproperties: when checking the error, the isoparametric curves with more error areconsidered and approximated separatedly until an error bound less than E is achieved.This way, new knot vectors (and thus control points) are generated for the next iteration.An example is shown in the next two slides, where the error bound is E = 0.6.The ﬁrst ﬁgure in green color is the set of points to be approximated, and aninterpolation of that set is seen in the right. The next ﬁgures correspond to the iterativeprocess of approximation on the left, and the error in each point of the grid in the right. Curve and surface interpolation and approximation by piecewise polynomial
33. 33. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfacesApproximation to within a speciﬁed accuracy Curve and surface interpolation and approximation by piecewise polynomial
34. 34. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfacesApproximation to within a speciﬁed accuracy Curve and surface interpolation and approximation by piecewise polynomial
35. 35. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracy BibliographyH. Akima.A new method of interpolation and smooth curve ﬁtting based on local procedures.Jour. ACM, 17:589–602, 1970.W. Boehm, W. Farin, and J. KahMann.A survey of cuve and surface methods in cagd.Computer Aided Geometric Design, 1:1–60, 1984.M. G. Cox.The numerical evaluation of b-splines.Journal of the Institute of Mathematics and its Applications, 10:134–149, 1972.C. de Boor.On calculating with b-splines.The Journal of Approximation Theory, 6:50–62, 1972.Carl de Boor.A practical Guide to Splines.Springer-Verlag, ﬁrst edition, 1978. Curve and surface interpolation and approximation by piecewise polynomial
36. 36. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a speciﬁed accuracyG. Farin, J. Hoschek, and M. S. Kim.Handbook of Computer Aided Geometric Design.Elsevier, ﬁrst edition, 2002.H. Prautzsch, W. Boehm, and M. Paluszny.B´zier and B-Spline Techniques. eSpringer, ﬁrst edition, 2002.L. Piegl.Interactive data interpolation by rational b´zier curves. eIEEE Computer Graphics and Applications, 7:45–58, 1987.Les Piegl and Wayne Tiller.The NURBS Book.Springer, second edition, 1997.G. Renner.A method of shape description for mechanical engineering practice.Computers in Industry, 3:137–142, 1982. Curve and surface interpolation and approximation by piecewise polynomial