Graphics Reference
In-Depth Information
24.4.2 Splines
Bilinear interpolation can be seen as a blending of values at the four corners by
certain polynomials, suggesting that any interpolating spline would also work,
and indeed this is true: If we take any function h that's 0 everywhere except in the
range
1
x , y
1, where it's nonnegative, and is 1 at ( 0, 0 ) , we can define a
function
F ( x , y )=
i , j
v ( i , j ) h ( x
i , y
j )
(24.14)
that takes on the known values v ( i , j ) at each integer point ( i , j ) . If, in addition, the
function h has the property that F is everywhere 1 when all the v ( i , j ) values are
1, then in general the value F ( x , y ) will lie between the minimum and maximum
values known at the four corner points. Examples of such functions are
1
1
2
• The box function on the unit square
2 <
x , y
<
• The bilinear basis function
If we weaken the requirement that h ( 0, 0 )= 1, other functions like the bicubic
B-spline basis function can also be used.
Even more general functions can be chosen to play the role of h ,butthekey
idea is simple: h represents how the effect of the value at each vertex fades as we
move away from that vertex. In doing so, h encodes something of our belief about
the implicit function that we're representing by samples.
24.4.3 Mathematical Models and Sampled
Implicit Representations
As the previous sections show, given samples of a function on the integer grid,
there's no single answer to the question, “What function do these samples come
from?” And without an answer to that question, there's no hope of answering,
“What implicit curve (or surface) do these samples define?” In the case of data
gathered in an experiment, there may be little knowledge on which to base our
choice of function, but it's clear that if the variation of the function over a grid cell
is so large that the values at the corners of the grid cell fail to represent this vari-
ation faithfully, any interpolation and level-set finding is bound to give a wrong
answer. It's therefore common to assume that the function being sampled is band-
limited (i.e., its Fourier transform contains no frequencies higher than some spec-
ified frequency
), and that the samples are spaced close enough to ensure that
we can accurately reconstruct any such function from its samples. Indeed, if the
samples are spaced twice as close as needed for reconstruction, then simple linear
interpolation serves to approximate the function quite well, as we saw in Chap-
ter 18. Unfortunately, approximating the true function F 0 by a function F whose
value at each point is very near the value of F 0 does not ensure that a level set of
F resembles the corresponding level set of F 0 . To understand this, consider a very
gradually sloping beach. A very small change in tide level can create a drastic shift
in the shoreline; alternatively, a beach shaped only slightly differently can have a
drastically different-looking shoreline. Thus, the level sets of F and F 0 need not
be very similar at all.
ω
 
 
 
Search WWH ::




Custom Search