Upload
rahman-r-hillol
View
142
Download
0
Tags:
Embed Size (px)
Citation preview
Baharul IslamSenior Lecturer
Department of MTCADaffodil International University
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
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
Specify the parameters at key-frames and interpolate the values of the parameters for other frames
Interpolation methods: linear, spline, etc
t1
t2
t3
Designing appropriate interpolation functions for different applications
Parameterization of the interpolation functions based on distance traveled
Controllability of the interpolated values over time
Location of objects in a scene• Prefer smooth curves (non-linear) trajectory
rather than straight lines (linear)
Location of objects in a scene• Prefer smooth curves (non-linear) trajectory
rather than straight lines (linear)
Size of an object• Non-linear or linear, depends on the need
Size of an object• Non-linear or linear, depends on the need
Interpolation vs approximation
Parametric continuity
Global vs local control
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
Keys are the sample points of a curve Keys represent actual locations that
the curve should pass through
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
Only two end points (keys) are interpolated
Other points (keys) are meant to control the shape of the curve
Smoothness of a curve in a mathematical sense• Positional continuity C0 (zeroth-order)• Tangential continuity C1 (first-order)• Curvature continuity C2 (second-order)
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
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
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
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
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
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
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
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
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
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()()()(
Explicit form
Implicit form
Parametric form
)(xfy
0),( yxf
)(
)(
ugy
ufx
Parametric form
),,()( zyxuPP )(
)(
)(
uhz
ugy
ufx
0.10.0 u
0.0u
0.1u31u
32u
Four control points P0, P1, P2, P3
C1 continuity, convex-hull property
0P
1P
2P
3P
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
Four control points P0, P1, P2, P3
PMU BTuP
P
P
P
P
uuuuP
)(
0001
0033
0363
1331
1)(
3
2
1
0
23
• Two end points P0, P1 and their tangents t0 and t1
• C1 continuity
0P
1P
0t
1t
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
• 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