Spline, lecture

© All Rights Reserved

14 views

Spline, lecture

© All Rights Reserved

- Transportation + Assignment Models (1)
- Course Outline
- Cuve and Surface Mod Eel Ing 2003
- Channel Estimation for UMTS LTE
- Cardinal Interpolation and Spline Functions
- Iga
- Linear Equations in 2 Variables 9
- Solids Notes 1
- Image Resolution Enhancement by Using Wavelet Transform-2
- CHAPTER6.PDF
- 05763735
- Introduction to Arcgis Spatial Analyst en Us
- Colorimetric calibration
- Tutorial 2 A
- C1 Coordinate Geometry - Straight Lines
- Cad
- DSP 8
- CASD 2017. It cannot be denied that robust model predictive control with input constraint have been playing an important role in nonlinear model analysis. A group of nonlinear model system under state – dependent disturbances and input constraint is approached by robust nonlinear model predictive control method. The investigated state space model is separated into linear part, mismatch model and state – dependent disturbances belonging L∞. Solving optimization problem of upper quadratic function of infinite horizon objective function with input constraint via LMIs [4] provide state – feedback control law to help state converge to origin. In this paper, in order to obtain robust stability condition, the proposed method must generates stability regions lying in feasibility regions which ensure the existence of solution. Additionally, these regions are able to contract after each sampling time to proof the robust stability of the system. Finally, the simulation results of the three dimen
- Detailed TOC
- Maxsurf 11.pdf

You are on page 1of 50

Outline

Hermite Splines

Catmull-Rom Splines

Bezier Curves

Higher Continuity: Natural and B-Splines

Drawing Splines

We want to build models of very complicated objects

An equation for a sphere is possible, but how about an

equation for a telephone, or a face?

Complexity is achieved

using simple pieces

and surfaces, or implicit

curves and surfaces

This lecture: parametric

curves

in Computer Graphics?

Local control of shape (so that easy to build and

modify)

Stability

Smoothness and continuity

Ability to evaluate derivatives

Demo

Ease of rendering

Curve Representations

Explicit: y = f(x)

y

y = mx + b

Easy to generate points

Must be a function: big limitationvertical lines?

Curve Representations

Explicit: y = f(x)

y

y = mx + b

Easy to generate points

Must be a function: big limitationvertical lines?

x

y

Implicit: f(x,y) = 0

x2 + y 2 ! r 2 = 0

+Easy to test if on the curve

Hard to generate points

Curve Representations

Explicit: y = f(x)

y

y = mx + b

+ Easy to generate points

Must be a function: big limitationvertical lines?

x

y

Implicit: f(x,y) = 0

2

u="/2

x + y !r = 0

u= "

Hard to generate points

u=0

x

( x, y ) = (cos u , sin u )

+Easy to generate points

Parameterization of a Curve

Parameterization of a curve: how a change in u moves

you along a given curve in xyz space.

There are an infinite number of parameterizations of a

given curve. Slow, fast, speed continuous or

discontinuous, clockwise (CW) or CCW

Polynomial Interpolation

An n-th degree polynomial fits a curve to n+1 points

called Lagrange Interpolation

result is a curve that is too wiggly, change to any control point

affects entire curve (nonlocal) this method is poor

minimize the wiggles

high-degree polynomials are bad

Linear Interpolation

Chalkboard

Spline Interpolation

Spine Interpolation

Demo

A spline is a piecewise polynomial - many low degree

polynomials are used to interpolate (pass through) the

control points

Cubic piecewise polynomials are the most common:

piecewise definition gives local control

10

Piecewise Polynomials

Spline: lots of little polynomials pieced together

Want to make sure they fit together nicely

Continuous in

position

Continuous in

position and tangent

vector

11

Continuous in

position, tangent,

and curvature

Splines

Types of splines:

Hermite Splines

Catmull-Rom Splines

Bezier Splines

Natural Cubic Splines

B-Splines

NURBS

12

Hermite Curves

Cubic Hermite Splines

P2

P1

Po

That is, we want a way to specify the end points and the

slope at the end points!

7

Splines

chalkboard

13

Using some algebra, we obtain:

p(u) = u3 u2

point that

gets drawn

&2

$ "3

u 1$

$0

$

%1

"2 1 1 # & p1 #

3 "2 "1!! $$ p2 !!

0 1 0 ! $ !p1 !

!$ !

0 0 0 " %!p2 "

basis

control matrix

(what the user gets to pick)

basis matrix and meaning of control matrix change with

the spline type

14

Using some algebra, we obtain:

p(u) = u3 u2

point that

gets drawn

&2

$ "3

u 1$

$0

$

%1

"2 1 1 # & p1 #

3 "2 "1!! $$ p2 !!

0 1 0 ! $ !p1 !

!$ !

0 0 0 " %!p2 "

basis

control matrix

(what the user gets to pick)

$

!

3

2 !$

" 2u + 3u ! $ p2 !

$

p(u ) = $ 3

2

u " 2u + u ! $ !p1 !

$

!$

!

3

2

$% u " u

!" %!p2 "

15

4 Basis Functions

T

$

!

3

2 !$

" 2u + 3u ! $ p2 !

$

p(u ) = $ 3

u " 2u 2 + u ! $ !p1 !

$

!$

!

3

2

$% u " u

!" %!p2 "

4 Basis Functions

of these 4 functions

16

It's easy to make a multi-segment Hermite spline

just specify the position and tangent at each joint

the pieces fit together with matched positions and first derivatives

gives C1 continuity

The points that the curve has to pass through are called

knots or knot points

17

Outline

Hermite Splines

Catmull-Rom Splines

Bezier Curves

Higher Continuity: Natural and B-Splines

Drawing Splines

Splines?

Must explicitly specify derivatives at each

endpoint!

Catmull-Rom Splines

Use for the roller-coaster assignment

With Hermite splines, the designer must specify all the

tangent vectors

Catmull-Rom: an interpolating cubic spline with builtin C1 continuity.

P2

P1

tangent at pi = s(pi+1 - pi-1)

Po

Catmull-Rom Splines

Use for the roller-coaster (next programming

assignment)

With Hermite splines, the designer must arrange for

consecutive tangents to be collinear, to get C1

continuity. This gets tedious.

Catmull-Rom: an interpolating cubic spline with builtin C1 continuity.

chalkboard

18

[

p(u) = u3 u2

& ! s 2! s s !2

$ 2s s !3 3!2s

u 1$

$ !s 0

s

$

0

%0 1

spline coefficients

CR basis

s # & p1 #

$ !

! s!! $ p2 !

0 ! $ p3 !

!$ !

0 " % p4 "

control vector

Parameter s is typically set to s=1/2.

19

&! s 2 ! s s ! 2

$2s s ! 3 3 ! 2s

3

2

[x y z ] = u u u 1 $

$! s 0

s

$

1

0

%0

spline coefficients

CR basis

20

s # & x1

$

! s !! $ x2

0 ! $ x3

!$

0 " % x4

y1 z1 #

y2 z 2 !!

y3 z 3 !

!

y4 z 4 "

control vector

Catmull-Rom Splines

Use for the roller-coaster assignment

With Hermite splines, the designer must specify all the

tangent vectors

Catmull-Rom: an interpolating cubic spline with builtin C1 continuity.

[

p(u) = u3 u2

& ! s 2! s s !2

$ 2s s !3 3!2s

u 1$

$ !s 0

s

$

0

%0 1

CR basis

s # & p1 #

$ !

! s!! $ p2 !

0 ! $ p3 !

!$ !

0 " % p4 "

control vector

Parameter s is typically set to s=1/2.

10

Cubic Curves in 3D

Three cubic polynomials, one for each coordinate

x(u) = axu3+bxu2+cxu+dx

y(u) = ayu3+byu2+cyu+dy

z(u) = azu3+bzu2+czu+dz

In matrix notation

[x(u )

y (u ) z (u )] = u 3 u 2

&ax

$b

x

$

u 1

$ cx

$d

% x

11

ay

by

cy

dy

az #

bz !

!

cz !

d z !"

&! s 2 ! s s ! 2

$2 s s ! 3 3 ! 2s

[x(u ) y(u ) z (u )] = u 3 u 2 u 1 $

$! s 0

s

$

1

0

%0

CR basis

12

s # & x1

$x

!

! s! $ 2

0 ! $ x3

!$

0 " % x4

y1 z1 #

!

y2 z 2 !

y3 z 3 !

!

y4 z 4 "

control vector

Outline

Hermite Splines

Catmull-Rom Splines

Bezier Curves

Higher Continuity: Natural and B-Splines

Drawing Splines

Problem with

Catmull-Rom Splines?

No control of derivatives at endpoints!

How can we solve this?

We want something intuitive.

Bezier Curves*

Another variant of the same game

Instead of endpoints and tangents, four control points

P'(u=0) = 3(P1-P0), P'(u=1) = 3(P3 P2)

P(u=1) = P3

curve contained within convex hull of control points

Gives more control knobs (series of points) than Hermite

Scale factor (3) is chosen to make velocity approximately constant

13

&! 1

$3

[x y z ] = u 3 u 2 u 1 $

$! 3

$

%1

3 ! 3 1 # & x1

$x

!

! 6 3 0! $ 2

3 0 0! $ x3

!$

0 0 0 " % x4

Bezier basis

14

y1 z1 #

y2 z 2 !!

y3 z 3 !

!

y4 z4 "

Bezier

control vector

3 Bernstein polynomials

Nonnegative, sum to 1

The entire curve lies inside the

polyhedron bounded by the

control points

15

Hermite Splines

Catmull-Rom Splines

Bezier Curves

Higher Continuity: Natural and B-Splines

Drawing Splines

Piecewise Polynomials

Spline: lots of little polynomials pieced together

Want to make sure they fit together nicely

Continuous in

position

Continuous in

position and tangent

vector

16

Continuous in

position, tangent,

and curvature

How could we get C2 continuity at control points?

Possible answers:

Use higher degree polynomials

degree 4 = quartic, degree 5 = quintic, but these get

computationally expensive, and sometimes wiggly

Give up local control

natural cubic splines

A change to any control point affects the entire curve

Give up interpolation

cubic B-splines

Curve goes near, but not through, the control points

17

Type

Local Control

Hermite

YES

Bezier

YES

Catmull-Rom YES

Natural

NO

B-Splines

YES

Continuity

Interpolation

C1

C1

C1

C2

C2

YES

YES

YES

YES

NO

Summary

Cant get C2, interpolation and local control with cubics

18

If you want 2nd derivatives at joints to match up, the

resulting curves are called natural cubic splines

Its a simple computation to solve for the cubics'

coefficients. (See Numerical Recipes in C book for

code.)

Finding all the right weights is a global calculation

(solve tridiagonal linear system)

19

B-Splines*

Give up interpolation

the curve passes near the control points

best generated with interactive placement (because its

hard to guess where the curve will go)

C2 continuity and local control are good

compensation for loss of interpolation

20

B-Spline Basis*

We always need 3 more control points than spline

pieces

& !1 3 ! 3

$ 3 !6 3

1$

MBs =

3

6 $! 3 0

$

4

1

%1

& Pi ! 3 #

$ Pi ! 2 !

!

GBsi = $

$ Pi ! 1 !

!

$

% Pi "

21

1#

!

0!

0!

!

0"

Hermite Splines

Catmull-Rom Splines

Bezier Curves

Higher Continuity: Natural and B-Splines

Drawing Splines

Basis matrix eqn. allows same code to draw any spline type

Method 1: brute force

Calculate the coefficients

For each cubic segment, vary u from 0 to 1 (fixed step size)

Plug in u value, matrix multiply to compute position on curve

Draw line segment from last position to current position

&! s 2 ! s s ! 2

$2s s ! 3 3 ! 2s

[x y z ] = u 3 u 2 u 1 $

$! s 0

s

$

1

0

%0

CR basis

22

s # & x1

$x

!

! s! $ 2

0 ! $ x3

!$

0 " % x4

y1 z1 #

!

y2 z 2 !

y3 z 3 !

!

y4 z 4 "

control vector

Whats wrong with this approach?

Draws in even steps of u

Even steps of u ! even steps of x

Line length will vary over the curve

Want to bound line length

too long: curve looks jagged

too short: curve is slow to draw

23

Drawing Splines, 2

Method 2: recursive subdivision - vary step size to draw short lines

Subdivide(u0,u1,maxlinelength)

umid = (u0 + u1)/2

x0 = P(u0)

x1 = P(u1)

if |x1 - x0| > maxlinelength

Subdivide(u0,umid,maxlinelength)

Subdivide(umid,u1,maxlinelength)

else drawline(x0,x1)

replace condition in if statement with straightness criterion

draws fewer lines in flatter regions of the curve

24

In Summary...

Summary:

define conditions on the curves and their continuity

Things to know:

basic curve properties (what are the conditions, controls, and properties for

each spline type)

generic matrix formula for uniform cubic splines x(u) = uBG

given definition derive a basis matrix

25

- Transportation + Assignment Models (1)Uploaded bymyra
- Course OutlineUploaded byMahmudur Rahman
- Cuve and Surface Mod Eel Ing 2003Uploaded bymashrurelahi
- Channel Estimation for UMTS LTEUploaded byFahmi Azman
- Cardinal Interpolation and Spline FunctionsUploaded byJose Joaquin Hernandez
- IgaUploaded byHeri
- Linear Equations in 2 Variables 9Uploaded byGaurav Sharma
- Solids Notes 1Uploaded byMahir Mahmood
- Image Resolution Enhancement by Using Wavelet Transform-2Uploaded byIAEME Publication
- CHAPTER6.PDFUploaded byteknikpembakaran2013
- 05763735Uploaded byRusli Taher
- Introduction to Arcgis Spatial Analyst en UsUploaded bydnv_agro_umss
- Colorimetric calibrationUploaded byRoberto Ricci
- Tutorial 2 AUploaded bylolka
- C1 Coordinate Geometry - Straight LinesUploaded byEricka Alvarez
- CadUploaded byAnonymous 7ZYHilD
- DSP 8Uploaded bysavisu
- CASD 2017. It cannot be denied that robust model predictive control with input constraint have been playing an important role in nonlinear model analysis. A group of nonlinear model system under state – dependent disturbances and input constraint is approached by robust nonlinear model predictive control method. The investigated state space model is separated into linear part, mismatch model and state – dependent disturbances belonging L∞. Solving optimization problem of upper quadratic function of infinite horizon objective function with input constraint via LMIs [4] provide state – feedback control law to help state converge to origin. In this paper, in order to obtain robust stability condition, the proposed method must generates stability regions lying in feasibility regions which ensure the existence of solution. Additionally, these regions are able to contract after each sampling time to proof the robust stability of the system. Finally, the simulation results of the three dimenUploaded byNam Hoang Thanh
- Detailed TOCUploaded byDiego Tume
- Maxsurf 11.pdfUploaded byganda irvan
- 07926984Uploaded byAnkita Arora
- pdf-to-wordUploaded byArvind Peri
- B Spline ClassUploaded byNikhilVasudevan
- Reconstructing SurfacesUploaded byMauricio Ignacio García Morales
- varioustypesofsurfacesUploaded byVishnu Sakravarthy
- Fortran Cf dUploaded byLahcen Akerkouch
- OrthogonalUploaded byKariem Mohamed Ragab Hamed
- notes1Uploaded byanishsukumar000gmailcom
- A Modified Optimal Sensor Placement Method Based on the Effective Independence MethodUploaded byYena
- COMPARING SATELLITE REMOTE SENSING AND GROUND NETWORK MEASUREMENTS FOR THE PRODUCTION OF SITE/TIME SPECIFIC IRRADIANCE DATAUploaded byJônatas Silva

- TGS__de_ (1)Uploaded byMuris Seferagić
- TBR_Ecopia_InfoSheetUploaded byrashom0099088
- Truck Tire Data BookUploaded byrashom0099088
- Design Notes3 (6)Uploaded byAnkur Ghosh
- lect_6_CUploaded byrashom0099088
- VB Scripting for CATIA V5 eBookUploaded byomik
- Us 20140311650Uploaded byrashom0099088
- knowledge_advisorUploaded by1097106323
- blickle_Uploaded byrashom0099088
- excel workUploaded byrashom0099088
- XTAUploaded byrashom0099088
- Arduino TutorialsUploaded byFlorin Petolea
- engeneering basicUploaded byDr_M_Soliman
- Constructive AnatomyUploaded bygazorninplotz
- Adobe Premiere Pro CS4 Read MeUploaded byrodrigo_caiafa1185
- TNTPSCS Installation LogUploaded byrashom0099088

- Curvellinear CorUploaded bysujayan2005
- TrigonometryUploaded bynguyenminhhoa96
- Geometric SequencesUploaded byzendikar21
- Analisis+Item++Add+Maths++Paper+1Uploaded byamie
- MayaUploaded byMelissa Julca Gonza
- thematic unit plan bedardUploaded byapi-247029058
- Definition and Examples Lateral Surface Area _ Define Lateral Surface Area - Geometry - Free Math Dictionary OnlineUploaded byAlvin Jay Anatalio
- Chapter 3 Simultaneous Linear EquationsUploaded byfikeryk
- California Standards Test Summative High School Mathematics (Blueprint AdoptedUploaded byfwannmacher
- SPM Matematik Tambahan Tingkatan 4Uploaded byRalphieyxa Rashid
- Entering Survey Data Using AutoCADUploaded byuntoni
- OG Error Log %2B Study PlanUploaded byTirthankar Datta
- MATH2114 Numerical LN2Uploaded bywas122333gmail.com
- Alevel Computer Science (Pseudocode Notes)Uploaded bySyed Ali
- LaPlace Table.pdfUploaded byShashank Babu
- CO250-webUploaded byKhayyam Lasi
- 2nd Quarter Math 1st Summative- With TOSUploaded byMary Athena Ibardaloza Adesna
- Exam 2 Cheat SheetUploaded bypurgree
- Vol49_2_6_VMallayyaUploaded bygaurnityananda
- Topic 3 Introduction to Calculus - IntegrationUploaded byNorlianah Mohd Shah
- Functions Past Year QuestionsUploaded byAnonymous ZSeqIiCo
- Elementary Math ManualUploaded bySharuhen
- Calculus_Early Transcendentals_1st Edition_by Michael Sullivan, Kathleen Miranda-W.H. Freeman; 1st edition (March 14, 2014).pdfUploaded byceasornicareasa
- transport-phenomena-1.1.pdfUploaded byliz
- Gauss TestUploaded bypudintekel
- VectorsAndMatrices.pdfUploaded bySuman Bhowmick
- LIVRO RAO_Cap 2 - Engineering_OptimizationUploaded byDroninho Arian Fagundes
- ADRC ACCWorkshop Sira-RamirezUploaded byAhmed H El Shaer
- Ch 04.pdfUploaded byVincents Genesius Evans
- Contoh Folio Addmath 2010 (Project Work 1)Uploaded byichigo325

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.