Download presentation
Presentation is loading. Please wait.
Published byEmma Booth Modified over 5 years ago
1
Type to enter a caption. Computer Graphics Week 10 Lecture 1
2
Splines (Modelling Curves)
3
Question Before the advent of sophisticated Computers how did people draw curves accurately ?
4
Spline : Flexible strip used to draw curves through designated points
5
Splines Originally , the curves drawn with spline were called Spline curves. Splines are now used to model a variety of curves (natural and artificial) We usually mathematically model them them using piecewise cubic functions spline curve now refers to any composite curve formed with polynomial sections satisfying any specified continuity conditions at the boundary of the pieces (1st and 2nd derivatives are continuous)
7
Uses of Splines Use of approximate naturally occurring curves (landscape, leaves, astronomical bodies , electron orbitals) Design curves Digitize drawings Specify animation paths CAD uses splines for design of automobile bodies , surfaces of aircraft and space crafts, ship hulls and home appliances
8
We specify Splines by a set of coordinate points called Control Points , which indicate the general shape of the curve. Based on how control points are used , there are 2 drawing techniques: 1.Interpolation 2.Approximation
9
Interpolation and Approximation
When polynomial sections are fitted such that all control points are connected When a polynomial curve is fitted such that some or all the control points are not on the generated curve The control points specify the general path of the curve
10
Parametric continuity Constraints
To ensure smooth transition from one section of spline to the next we impose various continuity constraints A cubic curve section can be parameterized as follow:
11
Zero Order Parametric Continuity
represented as C0 , it simply means that the two curves meet at a common point. The endpoint of first curve is the starting point of the successive curve First Order Parametric Continuity represented as C1 , Here Additionally , the first parametric derivative (tangent) of the two curves is same at the meeting point Second Order Parametric Continuity represented as C2 , Here Additionally , the second parametric derivative of the two curves is same at the meeting point as well i.e. the rate of change of tangent of the 2 curves is also same
12
There are 3 equivalent methods for specifying a spline:
Stating set of boundary conditions on the spline Stating a matrix that specifies a spline Stating set of blending functions (or basis functions) that determine how specified constraints are combined to calculate curve Spline Specification
13
Cubic interpolation methods
In these methods the piecewise curves are cubic polynomials Benefits of cubic polynomials → Speed and flexibility Given n+1 control points : Our need is to fit cubic curves between adjacent control points. For each curve we can define coordinates that lie on the curve in cubic parametric eq:
14
Contd... We can find equation of each curve by finding the values of coefficients a,b,c,d for each piecewise curve We impose continuity contraints to find these coefficients
15
Interpolation Methods
We will look at 2 interpolation methods: Natural Cubic Interpolation (the simplest one) Hermite Interpolation
16
Natural Cubic Interpolation
Simplest method Suppose we have n+1 control points ⇒ We need to draw n curves For each curve we need to know 4 coefficients (a,b,c,d) → Need 4 equations (or 4 boundary conditions) Conditions on board No “local” control
17
Hermite Method Developed by French Mathematician, Charles Hermite
Allow for more local control Require specified tangent at each control point
18
Hermite Method Here P(u) → eq. of curve section , pk → control point k
Then in Hermite method the boundary conditions that define the curve are:
19
Hermite Method(matrix form)
The curve equation : can be expressed in vector form as : which can be written in matrix form as (eq.1):
20
contd... Taking derivative wrt u:
Now since we know P(u) and P’(u) we can rewrite our boundary conditions as:
21
contd... Putting coefficients value back in eq1 :
22
Hermite Method (blending func. form)
Multiplying the previous matrix equation we get: Here H0,H1,H2,H3 are Hermite blending functions.
23
contd...
24
Hermite Method Issue with Hermite function Variation :
Cardinal splines Kochanek-Bartels
25
The End
26
Splines Originally , the curves drawn with spline were called Spline curves. Splines are now used to model a variety of curves (natural and artificial) We mathematically model them them using
27
Text
29
Text
30
Text –Johnny Appleseed
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.