Graphics Reference
In-Depth Information
Whatever function we synthesize, however, will be periodic of period 1, because
each term in the sum is periodic with that period. Thus, if f is a sum of sines and
cosines of different integer frequencies, we'll have f ( 2 )= f (
1.5
1
1
2 ) .
0.5
We're using the term “frequency” here quite specifically: We say that x
0
cos( 2
cos( x )
is a function of frequency 1. In the same way, some topics prefer to define the
Fourier transform on the interval [
π
x ) is a function of frequency 1. Some other texts say that x
0.5
] ; depending on the
interval, this introduces a multiplicative constant in the definition of the inner
product. We're following the convention of Dym and McKean [DM85] so that
the interested reader may refer there for proofs, but there is no universal stan-
dard. Fortunately for us, we'll mostly be concerned with qualitative properties
of the Fourier transform, for which the interval of definition and multiplicative
constants are not important.
1, 1 ] ,or [ 0, 1 ] ,or [ 0, 2
π
1
1.5
0.5
0
0.5
Figure 18.31: A “square wave”
function.
More surprising, perhaps, is that any even continuous function f on the interval
H that satisfies f ( 2 )= f (
1
1
2 ) can be written as a sum of cosines of various integer
frequencies. Even discontinuous functions can be almost written as such a sum.
For instance, the square-wave function (see Figure 18.31) defined by
f ( x )= 1
0
1
1
1
4
4
x
(18.34)
0.5
0
0.5
1
otherwise
1
can be almost expressed by the infinite sum
cos( 2
0
f ( x )= 4
π
cos( 6
π
x )
+ cos( 10
π
x )
π
x )
−...
(18.35)
3
5
1
4
1 ) k cos( 2
=
( 2 k + 1 ) (
π
( 2 k + 1 ) x ) .
(18.36)
0.5
0
0.5
π
k = 0
1
We say “almost expressed” because f (
1
±
4 )= 0—the average of the values of f to
1
1
the left and right of
4 )= 1.
The sequence in Equation 18.35 can be approximated by taking a finite num-
ber of terms; a few of those approximations are shown in Figure 18.32.
±
4 —rather than being equal to f (
±
0
1
As a more graphically oriented example, let's take one row of pixels from a
symmetric image like that shown in Figure 18.33. We've actually taken half a row
and flipped it over to get a perfectly symmetric line of 3,144 pixels, shown in
Figure 18.34.
If we write this function as a sum of cosines, the sum will have 3,144 terms,
which is hard to read. It starts out as
0.5
0
0.5
Figure 18.32: The square wave
approximated by 2 , 10 , and 100
terms. The slight overshoot in the
approximations is called ringing.
f ( x )= 129.28 cos( 0 x )+ 5.67 cos( 2
π
x )
2.35 cos( 4
π
x )+
...
.
(18.37)
We can make an abstract picture of this summation by plotting the coefficients :
At 0 we plot 129.28, at 1 we plot 5.67, at 2 we plot
2.34, etc. The result is
shown in Figure 18.35, except that since the coefficient of cos( 0 x ) is actually
141.8, we've adjusted the y -axis so that you can see the other details, thus hiding
the large coefficient for the cos( 0 x ) term. (That coefficient is just the average of
all the pixel values.)
 
 
Search WWH ::




Custom Search