SlideShare une entreprise Scribd logo
1  sur  36
Télécharger pour lire hors ligne
Introduction
                              B-Spline basis functions
                          B-Spline curves and surfaces
                                  Global interpolation
                                   Local interpolation
           Global approximation of curves and surfaces
          Approximation to within a specified accuracy




Curve and surface interpolation and approximation by piecewise
                     polynomial functions




                                            Alejandro Cosin Ayerbe



                                                 June 2012


                                                          Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy

Introduction



This presentation is an abstract of my final 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
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy

Introduction



This presentation is an abstract of my final 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
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy

Introduction



This presentation is an abstract of my final 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
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy

Introduction



This presentation is an abstract of my final 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
Introduction
                                     B-Spline basis functions
                                 B-Spline curves and surfaces
                                         Global interpolation
                                          Local interpolation
                  Global approximation of curves and surfaces
                 Approximation to within a specified accuracy

B-Spline basis functions
B-Spline basis functions can be used to build curves and surfaces, they are highly
versatile 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 degree
0, 1 and 2 are as follows:




                                                                Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                    B-Spline basis functions
                B-Spline curves and surfaces
                        Global interpolation
                         Local interpolation
 Global approximation of curves and surfaces
Approximation to within a specified accuracy




                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy

B-Spline curves and surfaces
B-Spline curves and surfaces they are linear combination of B-Spline basis functions, so
they have also good properties:

Strong convex hull:




                                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                                  B-Spline basis functions
                              B-Spline curves and surfaces
                                      Global interpolation
                                       Local interpolation
               Global approximation of curves and surfaces
              Approximation to within a specified accuracy




Local modification scheme:




                                                             Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy


Coincident control points:




A well known example of such curves and surfaces are the NURBS (Non-Uniform
Rational B-Splines). In this case, the curves and surfaces generated will be Non-Uniform
Non-Rational B-Splines, very similar.
                                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy

Global interpolation
Once functions to obtain the values of the B-Spline basis functions have been
programmed, interpolation conditions can be imposed to obtain the control points that
define a curve or surface.

If the degree is given and the knot and parameter vectors are estimated, a global
approach to the problem results in a linear system, easy to solve: given the set of points
Q=[[1,1]’,[3,3]’, [6,0]’,[8,2]’,[11,5]’], a second degree B-Spline curve
interpolating these points is shown below:




                                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy




It is possible to add derivative constraints to the interpolation problem, and interpolate
the derivative vector at the beginning and the end of the curve: given a degree, 2, the set
of points Q=[[1,1]’,[3,3]’,[6,0]’,[8,2]’,[11,5]’], and the vectors
D=[[-3,-1]’,[0,3]’] and D=[[6,-4]’,[-3,4]’], the B-Spline curves interpolating
this 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
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy


The process of interpolating a set of points arranged in grid using global techniques is
much easier than it looks. If the degree (p, q) of the surface is given, and knot vectors U
and V and parameter vectors are estimated, the interpolating surface can be obtained
through a small number of curve interpolations, because B-Spline sufaces are tensor
product surfaces. This avoids to solve large linear systems.




                                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                    B-Spline basis functions
                B-Spline curves and surfaces
                        Global interpolation
                         Local interpolation
 Global approximation of curves and surfaces
Approximation to within a specified accuracy




                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                                     B-Spline basis functions
                                 B-Spline curves and surfaces
                                         Global interpolation
                                          Local interpolation
                  Global approximation of curves and surfaces
                 Approximation to within a specified accuracy


Example: given the set of points
Q=[[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
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy

Local interpolation




A local interpolation scheme consists in generating segments of curve or surface wich join
with 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
                                                 e
surfaces, each segment is known as B´zier patch.
                                      e

There is a local interpolation method, due to Renner, which performs local interpolation
of a set of points, generating a cubic B-Spline curve.




                                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy



Local interpolation example for curves: given the set of points
Q=[[1,2]’,[2,4]’,[3,1]’,[5,3]’,[6,1]’,[7,4]’], the cubic interpolating curve is
shown below (in blue):




Note that each control point is in the (estimated) tangent of each point to be
interpolated.

                                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy


For 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                                                    e
interpolation method. The inner control points of each patch are obtained with the help
of estimates of mixed partial derivatives.
The next image shows a scheme of the simplest case of local interpolation, when there
are only four points in the grid (in the corners). The outer control points are obtained
with the local interpolation method for curves seen before, and the inner ones with
estimates of mixed partial derivatives (control points are denoted Pi,j ):




                                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy


Once the control points of each B´zier patch are obtained, the control points of the
                                    e
interpolating surface are obtained by eliminating B´zier points along inner rows and
                                                   e
columns. An example is shown below (with control points in blue, and interpolated
points 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
Introduction
                                     B-Spline basis functions
                                 B-Spline curves and surfaces
                                         Global interpolation
                                          Local interpolation
                  Global approximation of curves and surfaces
                 Approximation to within a specified accuracy

Global approximation of curves and surfaces


The approximation of a set of points with a curve can be achieved in various ways. One
of them is the least squares approximation scheme, a global scheme in which the
resulting curve minimizes the error in the least squares sense, i.e., the sum of the squared
distances between each point and the resulting curve is minimum with respect to the
unknowns (the control points in this case).

For being a global scheme, the degree of the curve must be given, as well as the knot and
parameter vectors.

Given a set of m + 1 points, the curve can be build with up to m control points, because
the case of m + 1 control points is the interpolation case. The endpoints of the curve are
interpolated, while the inner points are approximated in the least squares sense.




                                                                Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy


Example: 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 figure shows two cubic curves (in blue) approximating these points, with six and
nine control points respectively (the more control points, the better the approximation):




                                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy


For the case of surfaces, the approximation process is analogous to the interpolation
process: using the preceding method for curves, only a few approximations are required
to obtain the least squares surface. The next two figures show this process:




                                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                    B-Spline basis functions
                B-Spline curves and surfaces
                        Global interpolation
                         Local interpolation
 Global approximation of curves and surfaces
Approximation to within a specified accuracy




                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy


The resulting approximation, and an interpolation of the same set of points are shown
below (control points in blue color, initial set of point in red):




                                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                                     B-Spline basis functions
                                 B-Spline curves and surfaces
                                         Global interpolation
                                          Local interpolation
                  Global approximation of curves and surfaces
                 Approximation to within a specified accuracy

Approximation to within a specified accuracy


The preceding techniques of curve and surface approximation can be used in iterative
methods of approximating data to within some specified error bound.

Iterative methods proceed in two ways: adding control points (starting with only a few of
them), 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 technique
based 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
Introduction
                                     B-Spline basis functions
                                 B-Spline curves and surfaces
                                         Global interpolation
                                          Local interpolation
                  Global approximation of curves and surfaces
                 Approximation to within a specified accuracy

Approximation to within a specified accuracy


The preceding techniques of curve and surface approximation can be used in iterative
methods of approximating data to within some specified error bound.

Iterative methods proceed in two ways: adding control points (starting with only a few of
them), 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 technique
based 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
Introduction
                                     B-Spline basis functions
                                 B-Spline curves and surfaces
                                         Global interpolation
                                          Local interpolation
                  Global approximation of curves and surfaces
                 Approximation to within a specified accuracy

Approximation to within a specified accuracy


The preceding techniques of curve and surface approximation can be used in iterative
methods of approximating data to within some specified error bound.

Iterative methods proceed in two ways: adding control points (starting with only a few of
them), 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 technique
based 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
Introduction
                                      B-Spline basis functions
                                  B-Spline curves and surfaces
                                          Global interpolation
                                           Local interpolation
                   Global approximation of curves and surfaces
                  Approximation to within a specified accuracy

Approximation to within a specified accuracy


The preceding techniques of curve and surface approximation can be used in iterative
methods of approximating data to within some specified error bound.

Iterative methods proceed in two ways: adding control points (starting with only a few of
them), 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 technique
based 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
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy




To check the error after each approximation, is necessary to obtain the closest point of a
curve or surface to a given point. This is an inverse function problem, which can be
solved through the Newton method or similar. The following image shows examples for
curves and surfaces.




                                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                    B-Spline basis functions
                B-Spline curves and surfaces
                        Global interpolation
                         Local interpolation
 Global approximation of curves and surfaces
Approximation to within a specified accuracy




                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy


The following is a curve approximation example with an error bound E = 0.45. Initially
the the number of control points is three (the degree plus two). Each curve generated
passes 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
Introduction
                                     B-Spline basis functions
                                 B-Spline curves and surfaces
                                         Global interpolation
                                          Local interpolation
                  Global approximation of curves and surfaces
                 Approximation to within a specified accuracy




For the case of surfaces, the iterative process benefits from the tensor product surface
properties: when checking the error, the isoparametric curves with more error are
considered 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 first figure in green color is the set of points to be approximated, and an
interpolation of that set is seen in the right. The next figures correspond to the iterative
process 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
Introduction
                    B-Spline basis functions
                B-Spline curves and surfaces
                        Global interpolation
                         Local interpolation
 Global approximation of curves and surfaces
Approximation to within a specified accuracy




                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                    B-Spline basis functions
                B-Spline curves and surfaces
                        Global interpolation
                         Local interpolation
 Global approximation of curves and surfaces
Approximation to within a specified accuracy




                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                                    B-Spline basis functions
                                B-Spline curves and surfaces
                                        Global interpolation
                                         Local interpolation
                 Global approximation of curves and surfaces
                Approximation to within a specified accuracy




                                                    Bibliography

H. Akima.
A new method of interpolation and smooth curve fitting 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, first edition, 1978.

                                                               Curve and surface interpolation and approximation by piecewise polynomial
Introduction
                                  B-Spline basis functions
                              B-Spline curves and surfaces
                                      Global interpolation
                                       Local interpolation
               Global approximation of curves and surfaces
              Approximation to within a specified accuracy




G. Farin, J. Hoschek, and M. S. Kim.
Handbook of Computer Aided Geometric Design.
Elsevier, first edition, 2002.

H. Prautzsch, W. Boehm, and M. Paluszny.
B´zier and B-Spline Techniques.
 e
Springer, first edition, 2002.

L. Piegl.
Interactive data interpolation by rational b´zier curves.
                                            e
IEEE 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

Contenu connexe

Tendances

Hermit curves & beizer curves
Hermit curves & beizer curvesHermit curves & beizer curves
Hermit curves & beizer curvesKKARUNKARTHIK
 
Solid modeling-Sweep Representation and B-representation
Solid modeling-Sweep Representation and B-representationSolid modeling-Sweep Representation and B-representation
Solid modeling-Sweep Representation and B-representationDestro Destro
 
Reverse engineering for mechanical
Reverse engineering for mechanicalReverse engineering for mechanical
Reverse engineering for mechanicalPunugunta Vishnu
 
Geometric modeling111431635 geometric-modeling-glad (1)
Geometric modeling111431635 geometric-modeling-glad (1)Geometric modeling111431635 geometric-modeling-glad (1)
Geometric modeling111431635 geometric-modeling-glad (1)manojg1990
 
CAD - UNIT 2 (Geometric Modelling)
CAD - UNIT 2 (Geometric Modelling)CAD - UNIT 2 (Geometric Modelling)
CAD - UNIT 2 (Geometric Modelling)Priscilla CPG
 
CAD Topology and Geometry Basics
CAD Topology and Geometry BasicsCAD Topology and Geometry Basics
CAD Topology and Geometry BasicsAndrey Dankevich
 
Unit 3-ME8691 & COMPUTER AIDED DESIGN AND MANUFACTURING
Unit 3-ME8691 & COMPUTER AIDED DESIGN AND    MANUFACTURINGUnit 3-ME8691 & COMPUTER AIDED DESIGN AND    MANUFACTURING
Unit 3-ME8691 & COMPUTER AIDED DESIGN AND MANUFACTURINGMohanumar S
 
CAD data exchange
CAD data exchangeCAD data exchange
CAD data exchangeerikbohemia
 
Unit 5-cad standards
Unit 5-cad standardsUnit 5-cad standards
Unit 5-cad standardsJavith Saleem
 
Hidden line removal algorithm
Hidden line removal algorithmHidden line removal algorithm
Hidden line removal algorithmKKARUNKARTHIK
 
Wireframe models
Wireframe modelsWireframe models
Wireframe modelsMohd Arif
 
Unit 2 curves & surfaces
Unit 2  curves & surfacesUnit 2  curves & surfaces
Unit 2 curves & surfacesS.DHARANI KUMAR
 
Solid modelling cg
Solid modelling cgSolid modelling cg
Solid modelling cgNareek
 
Unit 1 INTRODUCTION (COMPUTER AIDED DESIGN AND MANUFACTURING )
Unit 1 INTRODUCTION (COMPUTER AIDED DESIGN AND MANUFACTURING )Unit 1 INTRODUCTION (COMPUTER AIDED DESIGN AND MANUFACTURING )
Unit 1 INTRODUCTION (COMPUTER AIDED DESIGN AND MANUFACTURING )ravis205084
 
SURFACE MODELLING .pptx
SURFACE MODELLING .pptxSURFACE MODELLING .pptx
SURFACE MODELLING .pptxjntuhcej
 
CAD - Unit-1 (Fundamentals of Computer Graphics)
CAD - Unit-1 (Fundamentals of Computer Graphics)CAD - Unit-1 (Fundamentals of Computer Graphics)
CAD - Unit-1 (Fundamentals of Computer Graphics)Priscilla CPG
 
visual realism in geometric modeling
visual realism in geometric modelingvisual realism in geometric modeling
visual realism in geometric modelingsabiha khathun
 
Additive manufacturing ppt2
Additive manufacturing ppt2Additive manufacturing ppt2
Additive manufacturing ppt2maa924gourav
 

Tendances (20)

Hermit curves & beizer curves
Hermit curves & beizer curvesHermit curves & beizer curves
Hermit curves & beizer curves
 
Solid modeling-Sweep Representation and B-representation
Solid modeling-Sweep Representation and B-representationSolid modeling-Sweep Representation and B-representation
Solid modeling-Sweep Representation and B-representation
 
Reverse engineering for mechanical
Reverse engineering for mechanicalReverse engineering for mechanical
Reverse engineering for mechanical
 
Geometric modeling111431635 geometric-modeling-glad (1)
Geometric modeling111431635 geometric-modeling-glad (1)Geometric modeling111431635 geometric-modeling-glad (1)
Geometric modeling111431635 geometric-modeling-glad (1)
 
CAD - UNIT 2 (Geometric Modelling)
CAD - UNIT 2 (Geometric Modelling)CAD - UNIT 2 (Geometric Modelling)
CAD - UNIT 2 (Geometric Modelling)
 
CAD Topology and Geometry Basics
CAD Topology and Geometry BasicsCAD Topology and Geometry Basics
CAD Topology and Geometry Basics
 
Unit 3-ME8691 & COMPUTER AIDED DESIGN AND MANUFACTURING
Unit 3-ME8691 & COMPUTER AIDED DESIGN AND    MANUFACTURINGUnit 3-ME8691 & COMPUTER AIDED DESIGN AND    MANUFACTURING
Unit 3-ME8691 & COMPUTER AIDED DESIGN AND MANUFACTURING
 
CAD data exchange
CAD data exchangeCAD data exchange
CAD data exchange
 
Unit 5-cad standards
Unit 5-cad standardsUnit 5-cad standards
Unit 5-cad standards
 
Hidden line removal algorithm
Hidden line removal algorithmHidden line removal algorithm
Hidden line removal algorithm
 
coordinates system
coordinates systemcoordinates system
coordinates system
 
Wireframe models
Wireframe modelsWireframe models
Wireframe models
 
Unit 2 curves & surfaces
Unit 2  curves & surfacesUnit 2  curves & surfaces
Unit 2 curves & surfaces
 
Curves
CurvesCurves
Curves
 
Solid modelling cg
Solid modelling cgSolid modelling cg
Solid modelling cg
 
Unit 1 INTRODUCTION (COMPUTER AIDED DESIGN AND MANUFACTURING )
Unit 1 INTRODUCTION (COMPUTER AIDED DESIGN AND MANUFACTURING )Unit 1 INTRODUCTION (COMPUTER AIDED DESIGN AND MANUFACTURING )
Unit 1 INTRODUCTION (COMPUTER AIDED DESIGN AND MANUFACTURING )
 
SURFACE MODELLING .pptx
SURFACE MODELLING .pptxSURFACE MODELLING .pptx
SURFACE MODELLING .pptx
 
CAD - Unit-1 (Fundamentals of Computer Graphics)
CAD - Unit-1 (Fundamentals of Computer Graphics)CAD - Unit-1 (Fundamentals of Computer Graphics)
CAD - Unit-1 (Fundamentals of Computer Graphics)
 
visual realism in geometric modeling
visual realism in geometric modelingvisual realism in geometric modeling
visual realism in geometric modeling
 
Additive manufacturing ppt2
Additive manufacturing ppt2Additive manufacturing ppt2
Additive manufacturing ppt2
 

En vedette

Curves from beginning to end
Curves from beginning to endCurves from beginning to end
Curves from beginning to endAhmetMikailYazici
 
An introduction to isogeometric analysis
An introduction to isogeometric analysisAn introduction to isogeometric analysis
An introduction to isogeometric analysisNguyen Vinh Phu
 
Spline Interpolation
Spline InterpolationSpline Interpolation
Spline InterpolationaiQUANT
 
Interpolation
InterpolationInterpolation
Interpolationmbhuiya6
 
A seminar report on mechanical designing software/tools
A seminar report on    mechanical designing software/toolsA seminar report on    mechanical designing software/tools
A seminar report on mechanical designing software/toolsmdnawab1995
 
interpolation
interpolationinterpolation
interpolation8laddu8
 

En vedette (7)

Curves from beginning to end
Curves from beginning to endCurves from beginning to end
Curves from beginning to end
 
An introduction to isogeometric analysis
An introduction to isogeometric analysisAn introduction to isogeometric analysis
An introduction to isogeometric analysis
 
Spline Interpolation
Spline InterpolationSpline Interpolation
Spline Interpolation
 
Interpolation
InterpolationInterpolation
Interpolation
 
A seminar report on mechanical designing software/tools
A seminar report on    mechanical designing software/toolsA seminar report on    mechanical designing software/tools
A seminar report on mechanical designing software/tools
 
interpolation
interpolationinterpolation
interpolation
 
Interpolation Methods
Interpolation MethodsInterpolation Methods
Interpolation Methods
 

Curve and surface interpolation and approximation

  • 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 specified accuracy Curve and surface interpolation and approximation by piecewise polynomial functions Alejandro Cosin Ayerbe June 2012 Curve and surface interpolation and approximation by piecewise polynomial
  • 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 specified accuracy Introduction This presentation is an abstract of my final 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. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy Introduction This presentation is an abstract of my final 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. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy Introduction This presentation is an abstract of my final 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. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy Introduction This presentation is an abstract of my final 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. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy B-Spline basis functions B-Spline basis functions can be used to build curves and surfaces, they are highly versatile 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 degree 0, 1 and 2 are as follows: Curve and surface interpolation and approximation by piecewise polynomial
  • 7. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy Curve and surface interpolation and approximation by piecewise polynomial
  • 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 specified accuracy B-Spline curves and surfaces B-Spline curves and surfaces they are linear combination of B-Spline basis functions, so they have also good properties: Strong convex hull: Curve and surface interpolation and approximation by piecewise polynomial
  • 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 specified accuracy Local modification scheme: Curve and surface interpolation and approximation by piecewise polynomial
  • 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 specified accuracy Coincident control points: A well known example of such curves and surfaces are the NURBS (Non-Uniform Rational B-Splines). In this case, the curves and surfaces generated will be Non-Uniform Non-Rational B-Splines, very similar. Curve and surface interpolation and approximation by piecewise polynomial
  • 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 specified accuracy Global interpolation Once functions to obtain the values of the B-Spline basis functions have been programmed, interpolation conditions can be imposed to obtain the control points that define a curve or surface. If the degree is given and the knot and parameter vectors are estimated, a global approach to the problem results in a linear system, easy to solve: given the set of points Q=[[1,1]’,[3,3]’, [6,0]’,[8,2]’,[11,5]’], a second degree B-Spline curve interpolating these points is shown below: Curve and surface interpolation and approximation by piecewise polynomial
  • 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 specified accuracy It is possible to add derivative constraints to the interpolation problem, and interpolate the derivative vector at the beginning and the end of the curve: given a degree, 2, the set of points Q=[[1,1]’,[3,3]’,[6,0]’,[8,2]’,[11,5]’], and the vectors D=[[-3,-1]’,[0,3]’] and D=[[6,-4]’,[-3,4]’], the B-Spline curves interpolating this 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. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy The process of interpolating a set of points arranged in grid using global techniques is much easier than it looks. If the degree (p, q) of the surface is given, and knot vectors U and V and parameter vectors are estimated, the interpolating surface can be obtained through a small number of curve interpolations, because B-Spline sufaces are tensor product surfaces. This avoids to solve large linear systems. Curve and surface interpolation and approximation by piecewise polynomial
  • 14. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy Curve and surface interpolation and approximation by piecewise polynomial
  • 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 specified accuracy Example: given the set of points Q=[[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. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy Local interpolation A local interpolation scheme consists in generating segments of curve or surface wich join with 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 e surfaces, each segment is known as B´zier patch. e There is a local interpolation method, due to Renner, which performs local interpolation of a set of points, generating a cubic B-Spline curve. Curve and surface interpolation and approximation by piecewise polynomial
  • 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 specified accuracy Local interpolation example for curves: given the set of points Q=[[1,2]’,[2,4]’,[3,1]’,[5,3]’,[6,1]’,[7,4]’], the cubic interpolating curve is shown below (in blue): Note that each control point is in the (estimated) tangent of each point to be interpolated. Curve and surface interpolation and approximation by piecewise polynomial
  • 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 specified accuracy For 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 e interpolation method. The inner control points of each patch are obtained with the help of estimates of mixed partial derivatives. The next image shows a scheme of the simplest case of local interpolation, when there are only four points in the grid (in the corners). The outer control points are obtained with the local interpolation method for curves seen before, and the inner ones with estimates of mixed partial derivatives (control points are denoted Pi,j ): Curve and surface interpolation and approximation by piecewise polynomial
  • 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 specified accuracy Once the control points of each B´zier patch are obtained, the control points of the e interpolating surface are obtained by eliminating B´zier points along inner rows and e columns. An example is shown below (with control points in blue, and interpolated points 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. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy Global approximation of curves and surfaces The approximation of a set of points with a curve can be achieved in various ways. One of them is the least squares approximation scheme, a global scheme in which the resulting curve minimizes the error in the least squares sense, i.e., the sum of the squared distances between each point and the resulting curve is minimum with respect to the unknowns (the control points in this case). For being a global scheme, the degree of the curve must be given, as well as the knot and parameter vectors. Given a set of m + 1 points, the curve can be build with up to m control points, because the case of m + 1 control points is the interpolation case. The endpoints of the curve are interpolated, while the inner points are approximated in the least squares sense. Curve and surface interpolation and approximation by piecewise polynomial
  • 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 specified accuracy Example: 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 figure shows two cubic curves (in blue) approximating these points, with six and nine control points respectively (the more control points, the better the approximation): Curve and surface interpolation and approximation by piecewise polynomial
  • 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 specified accuracy For the case of surfaces, the approximation process is analogous to the interpolation process: using the preceding method for curves, only a few approximations are required to obtain the least squares surface. The next two figures show this process: Curve and surface interpolation and approximation by piecewise polynomial
  • 23. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy Curve and surface interpolation and approximation by piecewise polynomial
  • 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 specified accuracy The resulting approximation, and an interpolation of the same set of points are shown below (control points in blue color, initial set of point in red): Curve and surface interpolation and approximation by piecewise polynomial
  • 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 specified accuracy Approximation to within a specified accuracy The preceding techniques of curve and surface approximation can be used in iterative methods of approximating data to within some specified error bound. Iterative methods proceed in two ways: adding control points (starting with only a few of them), 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 technique based 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. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy Approximation to within a specified accuracy The preceding techniques of curve and surface approximation can be used in iterative methods of approximating data to within some specified error bound. Iterative methods proceed in two ways: adding control points (starting with only a few of them), 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 technique based 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. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy Approximation to within a specified accuracy The preceding techniques of curve and surface approximation can be used in iterative methods of approximating data to within some specified error bound. Iterative methods proceed in two ways: adding control points (starting with only a few of them), 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 technique based 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. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy Approximation to within a specified accuracy The preceding techniques of curve and surface approximation can be used in iterative methods of approximating data to within some specified error bound. Iterative methods proceed in two ways: adding control points (starting with only a few of them), 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 technique based 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. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy To check the error after each approximation, is necessary to obtain the closest point of a curve or surface to a given point. This is an inverse function problem, which can be solved through the Newton method or similar. The following image shows examples for curves and surfaces. Curve and surface interpolation and approximation by piecewise polynomial
  • 30. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy Curve and surface interpolation and approximation by piecewise polynomial
  • 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 specified accuracy The following is a curve approximation example with an error bound E = 0.45. Initially the the number of control points is three (the degree plus two). Each curve generated passes 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. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy For the case of surfaces, the iterative process benefits from the tensor product surface properties: when checking the error, the isoparametric curves with more error are considered 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 first figure in green color is the set of points to be approximated, and an interpolation of that set is seen in the right. The next figures correspond to the iterative process 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. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy Curve and surface interpolation and approximation by piecewise polynomial
  • 34. Introduction B-Spline basis functions B-Spline curves and surfaces Global interpolation Local interpolation Global approximation of curves and surfaces Approximation to within a specified accuracy Curve and surface interpolation and approximation by piecewise polynomial
  • 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 specified accuracy Bibliography H. Akima. A new method of interpolation and smooth curve fitting 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, first edition, 1978. Curve and surface interpolation and approximation by piecewise polynomial
  • 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 specified accuracy G. Farin, J. Hoschek, and M. S. Kim. Handbook of Computer Aided Geometric Design. Elsevier, first edition, 2002. H. Prautzsch, W. Boehm, and M. Paluszny. B´zier and B-Spline Techniques. e Springer, first edition, 2002. L. Piegl. Interactive data interpolation by rational b´zier curves. e IEEE 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