Graphics Reference
In-Depth Information
95
95
90
90
85
85
80
80
75
75
70
70
65
65
60
60
M0H
M12H
T0H
T12H
W0H
W12H
Th0H
Th12H
F0H
F12H
S0H
S12H
Su0H
Su12H
M0H
M0H
M12H
T0H
T12H
W0H
W12H
Th0H
Th12H
F0H
F12H
S0H
S12H
Su0H
Su12H
M0H
Figure 9.1: The temperature at noon and midnight for each day in a week. The domain of
this function consists of 15 points. When we linearly interpolate the values between pairs of
adjacent points, we get a function defined on the whole week—a connect-the-dots version
of the original.
Further suppose that the times are measured in 12-hour units, starting at midnight
Sunday, so t 0 = 0, t 1 = 1, etc.
In this formulation i is the index of the interval containing t , and s describes
the fraction of the way from t i to t i + 1 where t lies (when t = t i , s is zero; when
t = t i + 1 , s is one).
Inline Exercise 9.1: Suppose that t 0 = 0, t 1 = 1, etc., and that f 0 = 7, f 1 = 3,
and f 2 = 4; evaluate f ( 1. 2 ) by hand. If we changed f 0 to 9, would it change the
value you computed? Why or why not?
Just as we can have barycentric coordinates on a triangle (see Section 7.9.1),
we can place them on an interval [ p , q ] as well. The first coordinate varies from
one at p to zero at q ; the second varies from zero at p to one at q . Their sum is
everywhere one that is, for every point of the interval [ p , q ] , the sum is one (see
Exercise 9.8). With these barycentric coordinates, we can write a slightly more
symmetric version of the formula above:
f ( t )= c 0 ( t ) f i + c 1 ( t ) f i + 1 ,
(9.6)
where c 0 ( t ) is the first barycentric coordinate of t and c 1 ( t ) is the other.
 
 
Search WWH ::




Custom Search