Rick Parent - CIS681 Interpolation of a time-space curve Interpolation (of a curve in space) Speed...
-
Upload
leslie-day -
Category
Documents
-
view
227 -
download
0
description
Transcript of Rick Parent - CIS681 Interpolation of a time-space curve Interpolation (of a curve in space) Speed...
Rick Parent - CIS681
Interpolation of a time-space curve
Interpolation (of a curve in space)
Speed control along curve
Reparameterizing according to arc length
Rick Parent - CIS681
Problem: generate a path through points at designated times with smooth motion
A
B
C
D
Time = 0
Time = 10
Time = 35
Time = 60
Rick Parent - CIS681
Solution: generate a space curve, distribute points evenly along curve, smoothly vary points temporally
A
B
C
D
Time = 0
Time = 10
Time = 35
Time = 60
Rick Parent - CIS681
Curves
Explicit form: y = f(x)
Implicit form: 0 = f(x,y)
x = f(u)
y = g(u)Parametric form:
Good for testing points or good for generating points?
Rick Parent - CIS681
CurvesParametric form: P = P(u) = (x,y,z)
x = f(u)y = g(u)z = h(u)
Space-curve P = P(u) 0.0 <=u<=1.0
u=1/3
u=2/3
u=0.0
u=1.0
Rick Parent - CIS681
Curves
Local v. global control
Computational complexity
Continuity
Interpolation v. approximation Match data v. design
cubic
local
1st order (tangential)
Rick Parent - CIS681
CurvesParametric form: P = P(u) = (x,y,z)
x = f(u)y = g(u)z = h(u)
Complexity: linear, cubic, higher order?
Cubic is lowest order that allows point of inflection between two points
Rick Parent - CIS681
Curves - continuity
none Zero order but not first order
1st but not 2nd order
2nd order
position tangent curvature
At junction of two circular arcs
Rick Parent - CIS681
Curves - local v. global control
Is area affected by editing operation restricted?Or does an edit affect the entire curve (even if slightly)?
Rick Parent - CIS681
Curvesu=1/3
u=2/3u=0.0
u=1.0
P(u) = a*u3 + b*u2 + c*u + d
P(0.0) = d = P0P(1/3) = a*(1/3)3 + b*(1/3)2 + c*(1/3) + d = P1P(2/3) = a*(2/3)3 + b*(2/3)2 + c*(2/3) + d = P2P(1.0) = a + b + c + d = P3
4-point formP0 P1
P2
P3
Rick Parent - CIS681
Curves
P(u) = a*u3 + b*u2 + c*u + d
P(0.0) = d = P0
P(1.0) = a + b + c + d = P1
P0
P1
P’0P’1
P’(0.0) = c = P’0
P’(1.0) = 3*a + 2*b + c = P’1
Hermite form
Rick Parent - CIS681
CurvesP(u) = u3*( m00*P1 + m01*P2 + m02*P3 + m03*P4) + u2*( m10*P1 + m11*P2 + m12*P3 + m13*P4) + …
P1P2P3P4
P(u) u3 u 1u2
m00 m01 m02 m03m10 m11 m12 m13m20 m21 m22 m23m30 m31 m32 m33
P(u) UMP
Rick Parent - CIS681
CurvesHermite
Bezier
Catmull-Rom
Blended parabolas
B-splines, NURBS
Rick Parent - CIS681
Hermite
Rick Parent - CIS681
Bezier
Rick Parent - CIS681
Catmull-Rom
Rick Parent - CIS681
Blended Parabolas
Rick Parent - CIS681
B-Spline / NURBS
Rick Parent - CIS681
Space-Time Curve
Given arclength* w, find u such that w = arclength(P(0.0), P(u))
w=0.3 w=0.6
w=0.0
w=1.0u=0.2 u=0.5
* relative arclength
Rick Parent - CIS681
Equal Parametric Increments
Rick Parent - CIS681
Arc Length
Rick Parent - CIS681
Arc Length - analytic
s dPduw1
w2
du
dPdu
((dx(u) /(du)),(dy(u) /(du)),(dz(u) /du)))
dPdu
((dx(u) /(du))2 (dy(u) /(du))2 (dz(u) /du))2)
dPdu
Au4 Bu3 Cu2 du E
A9(ax2 ay
2)
B12(axbx ayby )
C 6(axcx aycy ) 4(bx2 by
2)
D4(bxcx bycy )
E cx2 cy
2
Rick Parent - CIS681
Arc Length
P(0.0)
P(0.1)
P(0.2) P(0.3)
P(0.4)
Create table of parametric values and summed linear approximations to arclength
Rick Parent - CIS681
Arc Lengthdistance
Estimated u U Distance0.1 0.08
0.2 0.19
0.3 0.32
0.4 0.45
… …
Rick Parent - CIS681
Given arc length - find indexGiven arc length , d = 0.37
Find entries in table that bound given value:
U Distance0.1 0.080.2 0.190.3 0.320.4 0.45
… …
U U[i] (GivenDistance Distance[i]Distance[i 1] Distance[i]
)(U[i 1] U[i])
0.30.37 0.320.45 0.32
(0.3 0.4)
0.3385
Rick Parent - CIS681
Arc Length - Gaussian Quadrature
Weighted sum of samples - from table
See book
Adaptive - compare length of segment to sum of lengths of sub-segments
Rick Parent - CIS681
Controlling Motion Along a Curve
slowslowfast
Rick Parent - CIS681
Time-Distance Curve
time
distance
Slope indicates velocity
Usually use normalized distance (0:1) and normalized time (0:1) to reuse curves
Rick Parent - CIS681
Ease-in/ease-out
distance
time
(arclength)
Equally spaced samples in time specify arc length required for that frame
Rick Parent - CIS681
Time-Velocity Curve
velocity
time
Slope indicates acceleration
Area under curve indicates distance traveled
Use normalized distance and normalized time
Rick Parent - CIS681
Time- Acceleration Curve
acceleration
time
Signed area under curve is velocity (at end should be zero if object starts and ends at a stop)
This curves shows only constant acceleration and deceleration
Rick Parent - CIS681
Sine Ease-in / Ease-out
Ease in/ease out control for time-distance curve
Rick Parent - CIS681
Sinusoidal segment
distance
time
(arclength)
Sin(u)
2
u2
(Sin(t 2
)1)2
0 t 1
-1
1
Rick Parent - CIS681
Sinusoidal End Segments
distance
time
Linear segment(arclength)
Sinusoidal segments
Rick Parent - CIS681
Sinesoidal and linear segments
Rick Parent - CIS681
Sinesoidal and linear segments
ease(t) (k12
sin(( tk1
2
2
) 1)) / f
( k1
2
t k1) / f
( k1
2
k2 k1 ((1 k2) 2
)sin( t k2
1 k2
2
)) / f
f k12
k2 k1 (1 k2) 2
t k1
k1 t k2
k2 t
where
Rick Parent - CIS681
Constant Acceleration
acceleration
timet1 t2
Relationship between acceleration, deceleration, time accleration ends, time deceleration starts, and distance traveled
Assume begin and end with velocity = 0
A
D
A*t1 = - B*(1-t2)
Rick Parent - CIS681
Constant Acceleration
velocity
timet1 t2
Distance is area under the curve
Find v such that area = 1
v
Rick Parent - CIS681
Constant Acceleration
Parabolic segments
Linear segment
distance
time