+ All Categories
Home > Documents > CS148: Introduction to Computer Graphics and Imaging...

CS148: Introduction to Computer Graphics and Imaging...

Date post: 15-Apr-2018
Category:
Upload: phungtu
View: 235 times
Download: 1 times
Share this document with a friend
30
Page 1 CS148: Introduction to Computer Graphics and Imaging Splines and Curves CS148 Lecture 9 Pat Hanrahan, Winter 2009 Topics Splines Cubic Hermite interpolation Matrix representation of cubic polynomials Catmull-Rom interpolation Curves Bezier curve Chaiken’s subdivision algorithm Properties of Bezier curves
Transcript

Page 1

CS148: Introduction to Computer Graphics and Imaging

Splines and Curves

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Topics

Splines

Cubic Hermite interpolation

Matrix representation of cubic polynomials

Catmull-Rom interpolation

Curves

Bezier curve

Chaiken’s subdivision algorithm

Properties of Bezier curves

Page 2

Cubic Hermite Interpolation

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Cubic Hermite Interpolation

Given: values and derivatives at 2 points

Page 3

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Assume cubic polynomial

Solve for coefficients:

Cubic Hermite Interpolation

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Matrix Representation

Page 4

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Matrix Representation

Inverse

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Matrix Representation

Page 5

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Matrix Representation of Polynomials

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Matrix Representation of Polynomials

Page 6

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Matrix Representation of Polynomials

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Matrix Representation

Transpose

Page 7

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Matrix Representation of Polynomials

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Hermite Basis Matrix

Page 8

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Hermite Basis Matrix

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Hermite Basis Functions

Page 9

Catmull-Rom Interpolation

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Catmull-Rom Interpolation

Page 10

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Catmull-Rom Interpolation

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Catmull-Rom Interpolation

Page 11

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Catmull-Rom Interpolation

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Catmull-Rom Interpolation

Page 12

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Catmull-Rom Interpolation

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Catmull-Rom To Hermite Interpolation

Page 13

Bezier Curves

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Paths

Capabilities

1. Smooth curves

2. Line and curve segments 3. Kinks

Page 14

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Bezier Curve

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Bezier To Hermite Interpolation

Page 15

Demo of Bezier Curves

Subdivision

Page 16

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Chaiken’s Algorithm

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Chaiken’s Algorithm

Page 17

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Chaiken’s Algorithm

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Chaiken’s Algorithm

Page 18

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Chaiken’s Algorithm

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Bezier Curve

Page 19

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Bezier Curve

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Bezier Curve

Page 20

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Bezier Curve

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Bezier Curve

Page 21

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Properties

Property 1: Interpolate end points

Property 2: Tangents

Property 3: Convex hull property

Extrapolation

Page 22

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Bezier Curve - Extrapolation

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Bezier Curve - Extrapolation

Page 23

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Bezier Curve - Extrapolation

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Bezier Curve - Extrapolation

Page 24

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Bezier Curve

Left Bezier Curve

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Bezier Curve

Right Bezier Curve Left Bezier Curve

Can subdivide a Bezier curve into two pieces

Page 25

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Applications of Subdivision

Drawing Bezier curve

??

Intersect two Bezier curves

??

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Continuity between 2 Bezier Curves

3rd point of the 1st curve is the same as the 1st point of

the 2nd curve

Page 26

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Continuity between 2 Bezier Curves

Tangent of the 1st curve is equal to the tangent of the

2nd curve

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Pyramid Algorithm

Page 27

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Pyramid Algorithm

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Pyramid Algorithm

Page 28

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Pyramid Algorithm

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Pyramid Algorithm

Page 29

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Bernstein Polynomials

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Pyramid Algorithm

Page 30

CS148 Lecture 9 Pat Hanrahan, Winter 2009

Things to Remember

Splines

Cubic hermite interpolation

Matrix representation of cubic polynomials

Catmull-Rom splines

How to think of CR in terms of Hermite spline

Curves

Bezier curve

How to think of BC in terms of Hermite spline

Chaiken’s algorithm

Subdivision algorithm including applications

Properties of Bezier curves


Recommended