Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Computer Animation

Spline Driven Animation

x,y = Q(u)
for u:[0,1]

• Equal arc lengths


• Equal spacing in u
Computer Animation
Spline Driven Animation

Given
Q(u ) = au 3 + bu 2 + cu + d

ds = dx 2 + dy 2 + dz 2
2 2 2
 dx   dy   dz 
=   +  + 
 du   du   du 
Computer Animation
Spline Driven Animation

1
u  dx   dy   dz 
2 2 2
 2
s = A(u ) = ∫   +   +    du
 du   du   du  
u0 

Q(u ) → Q( A −1(s ))
Re parameterization
Find
u = A −1(s )
Computer Animation
Spline Driven Animation

Find : u = A −1(s )
A : monotonically increasing
i.e. u1 < u2
and A(u1 ) < A(u2 )

u3
Computer Animation
Spline Driven Animation

Bi sec tion Method


For sá
Start with full interval (u1...u3 )
Get u2 in the middle, find s2
If sá < s2 : uá is ∈ [u1, u2 ]
If sá > s2 : uá is ∈ [u2 , u3 ]
Continue till within u3
a threshold
Computer Animation
Spline Driven Animation
1
u  dx   dy   dz 
2 2 2
 2
s = ∫   +   +    du
 du   du   du  
u0 
Since
Q(u ) = au 3 + bu 2 + cu + d
1

[ ]
u 2
s = ∫ Au 4 + Bu 3 + Cu 2 + Du + E du
u0
Apply Numerical Method
Computer Animation
Spline Driven Animation
Alternately

Chord length parameterization

ui+1 ui+2
ui di+1
di
Computer Animation
Spline Driven Animation
Velocity (Speed) Curve

v: (s, t)

1
Q(u)
s

t 1
Computer Animation
Morphing

Transformation of object shapes from one form to


another

• Each form may be considered as a key frame


• Establish common topology for the two key frames
• Interpolate the intermediate frames

added point
t
Intermediate form
Computer Animation
Image Morphing
Transformation of one image (source) to another image
(target)

• Normalization of both images


• Feature correspondence
• Warping of the two images (spatial deformation)
• Color blending
Computer Animation
Image Morphing

Without feature correspondence (cross dissolving)

Source Destination
Computer Animation
Image Morphing

Correspondence
Computer Animation
Image Morphing
Triangle Method
• Feature points are marked on source and target.
• These feature are given the correspondence.
• Triangulate the points.
• Interpolate triangulation for intermediate frames.
• Warp the images, and blend colors.

Source Target
Computer Animation
Image Morphing
Triangle Method
Interpolation in triangular domain
How is P related to P1, P2 and P3 ?

P2 P= uP1+ vP2 + wP3

A3 A u = A1/A, v = A2/A, w = A3/A


1
•P A: total area of triangle
A2
P1 P3
u, v, w : Barycentric coordinates.
Computer Animation
Image Morphing
Triangle Method

With feature correspondence (Triangle Method)

Source Destination
Computer Animation
Image Morphing
Triangle Method

Example
Computer Animation
Image Morphing
Application

You might also like