SLIDE 11 11
Let’s Take this a Step Further
Suppose animator knows path but
wants more control over speed?
What we have
P(u) – position w.r.t. spline control
Note that this is NOT
S(u) – length traveled w.r.t. spline control.
And we need to give animator control of
S(t) – length traveled at a given time.
Let’s Take this a Step Further
Suppose animator knows path but wants
more control over speed?
What we have
P(u) – position w.r.t. spline control
What we need
U(S) – length w.r.t. spline control
And let animator define
S(t) – length w.r.t. time (velocity/speed)
Then
P(t) = P (U (S (t)))
Arc Length
Arc Length = distance traveled along a
curve.
Mathematically defined as:
du du dP u u s
u u
∫
=
2 1
) , (
2 1
Arc Length
So, arc length is an integral
Ways to solve
Analytic – integral not always solvable Numerical Integration – more when we talk
about physics.
Forward Differencing
Arc Length
Forward Differencing
Sample the curve at equally spaced u values. Estimate arc length by calculating linear distance
between sampled points.
For example,
Given P(u) calculate at u= 0.00, 0.05, 0.10, 0.15, … Define arc length s(u) s (0.0) = 0.0 s (0.05) = distance between P(0.05) and P(0.0) s (0.1) = s (0.05) + distance between P(0.10) and P(0.05) Etc.
Arc Length
Forward Differencing
This will give us a mapping from P(u) to
s(u) for sampled u values.
Perform interpolation (linear or cubic)
between sampled values