Top Banner
Baharul Islam Senior Lecturer Department of MTCA Daffodil International University
35
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Mtc124 lecture 6 interpolation

Baharul IslamSenior Lecturer

Department of MTCADaffodil International University

Page 2: Mtc124 lecture 6 interpolation
Page 3: Mtc124 lecture 6 interpolation

Computer graphics generated images that change with time

Any computer graphics parameters can be modified as functions of time• Location, direction, shape, pose, texture

coordinates, light parameters, camera parameters, etc

Page 4: Mtc124 lecture 6 interpolation

Key-frame method• Specify the parameters at key-frames and

interpolate the values of the parameters for other frames

Physically-based simulation• Give initial conditions, then modify the

values of the parameters by simulating physics, etc

Page 5: Mtc124 lecture 6 interpolation

Specify the parameters at key-frames and interpolate the values of the parameters for other frames

Interpolation methods: linear, spline, etc

Page 6: Mtc124 lecture 6 interpolation

t1

t2

t3

Page 7: Mtc124 lecture 6 interpolation

Designing appropriate interpolation functions for different applications

Parameterization of the interpolation functions based on distance traveled

Controllability of the interpolated values over time

Page 8: Mtc124 lecture 6 interpolation

Location of objects in a scene• Prefer smooth curves (non-linear) trajectory

rather than straight lines (linear)

Page 9: Mtc124 lecture 6 interpolation

Location of objects in a scene• Prefer smooth curves (non-linear) trajectory

rather than straight lines (linear)

Page 10: Mtc124 lecture 6 interpolation

Size of an object• Non-linear or linear, depends on the need

Page 11: Mtc124 lecture 6 interpolation

Size of an object• Non-linear or linear, depends on the need

Page 12: Mtc124 lecture 6 interpolation

Interpolation vs approximation

Parametric continuity

Global vs local control

Page 13: Mtc124 lecture 6 interpolation

Interpolating curve• Keys are the sample points of a curve• Keys represent actual locations that the

curve should pass through Approximating curve

• Only two end points (keys) are interpolated• Other points (keys) are meant to control the

shape of the curve

Page 14: Mtc124 lecture 6 interpolation

Keys are the sample points of a curve Keys represent actual locations that

the curve should pass through

Page 15: Mtc124 lecture 6 interpolation

Interpolating curve• Keys are the sample points of a curve• Keys represent actual locations that the

curve should pass through Approximating curve

• Only two end points (keys) are interpolated• Other points (keys) are meant to control the

shape of the curve

Page 16: Mtc124 lecture 6 interpolation

Only two end points (keys) are interpolated

Other points (keys) are meant to control the shape of the curve

Page 17: Mtc124 lecture 6 interpolation

Smoothness of a curve in a mathematical sense• Positional continuity C0 (zeroth-order)• Tangential continuity C1 (first-order)• Curvature continuity C2 (second-order)

Page 18: Mtc124 lecture 6 interpolation

A small change in the value of the parameter always results in a small change in the value of the curve function

u

Not C0

Page 19: Mtc124 lecture 6 interpolation

A small change in the value of the parameter always results in a small change in the value of the curve function

u

Is C0

Page 20: Mtc124 lecture 6 interpolation

A small change in the value of the parameter always results in a small change in the first derivative of the curve function

u

Not C1

Page 21: Mtc124 lecture 6 interpolation

A small change in the value of the parameter always results in a small change in the first derivative of the curve function

u

Is C1

Page 22: Mtc124 lecture 6 interpolation

A small change in the value of the parameter always results in a small change in the second derivative of the curve function

u

Not C2

Junction of two circular arcs

Page 23: Mtc124 lecture 6 interpolation

A small change in the value of the parameter always results in a small change in the second derivative of the curve function

u

Is C2

Junction of two circular arcs

Page 24: Mtc124 lecture 6 interpolation

Global control• Modifying a key has an effect on the overall

shape of the curve• Natural spline

Local control• Modifying a key has an effect on the limited

region of the curve• Bézier, B-spline, etc

Page 25: Mtc124 lecture 6 interpolation

Interpolation between two points Use a straight line to connect two

interpolation points

0.0u

0.1u

)0.0(P

)0.1(P

)(uP

)0.1()0.0()1()( uPPuuP

Page 26: Mtc124 lecture 6 interpolation

Use a straight line to connect two interpolation points

0.0u

0.1u

)0.0(P

)0.1(P

)(uP

)0.1()()0.0()()( PuGPuFuP

)0.1()0.0()1()( uPPuuP

Page 27: Mtc124 lecture 6 interpolation

Use a straight line to connect two interpolation points

)0.1()()0.0()()( PuGPuFuP

PMU LTuP

P

PuuP

P

PuGuFuP

)(

)0.1(

)0.0(

01

111)(

)0.1(

)0.0()()()(

Page 28: Mtc124 lecture 6 interpolation

Explicit form

Implicit form

Parametric form

)(xfy

0),( yxf

)(

)(

ugy

ufx

Page 29: Mtc124 lecture 6 interpolation

Parametric form

),,()( zyxuPP )(

)(

)(

uhz

ugy

ufx

0.10.0 u

0.0u

0.1u31u

32u

Page 30: Mtc124 lecture 6 interpolation

Four control points P0, P1, P2, P3

C1 continuity, convex-hull property

0P

1P

2P

3P

Page 31: Mtc124 lecture 6 interpolation

Four control points P0, P1, P2, P3

3

0

)()(i

ii ubPuP

33

22

21

30

)(

)1(3)(

)1(3)(

)1()(

uub

uuub

uuub

uub

0P

1P

2P

3P

Page 32: Mtc124 lecture 6 interpolation

Four control points P0, P1, P2, P3

PMU BTuP

P

P

P

P

uuuuP

)(

0001

0033

0363

1331

1)(

3

2

1

0

23

Page 33: Mtc124 lecture 6 interpolation

• Two end points P0, P1 and their tangents t0 and t1

• C1 continuity

0P

1P

0t

1t

Page 34: Mtc124 lecture 6 interpolation

PMU

t

t

1

0

HTuP

P

P

uuuuP

)(

0001

0100

1233

1122

1)( 1

0

23

• Two end points P0, P1 and their tangents t0 and t1

Page 35: Mtc124 lecture 6 interpolation

• Can be derived from Bézier curves– Compute the derivatives at the end points of a

Bézier curve– Substitute the results (tangents) to the Bézier

curves equation