17
University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Orthogonal Functions and Fourier Series

Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

  • Upload
    others

  • View
    22

  • Download
    4

Embed Size (px)

Citation preview

Page 1: Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell

Orthogonal Functions andFourier Series

Page 2: Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell

Vector SpacesSet of vectorsClosed under the following operations

Vector addition: v1 + v2 = v3

Scalar multiplication: s v1 = v2

Linear combinations:

Scalars come from some field Fe.g. real or complex numbers

Linear independenceBasisDimension

vv =!=

i

n

i

ia

1

Page 3: Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell

Vector Space AxiomsVector addition is associative and commutativeVector addition has a (unique) identity element(the 0 vector)Each vector has an additive inverse

So we can define vector subtraction as adding aninverse

Scalar multiplication has an identity element (1)Scalar multiplication distributes over vectoraddition and field additionMultiplications are compatible (a(bv)=(ab)v)

Page 4: Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell

Coordinate Representation

Pick a basis, order the vectors in it, then allvectors in the space can be represented assequences of coordinates, i.e. coefficients ofthe basis vectors, in order.Example:

Cartesian 3-spaceBasis: [i j k]Linear combination: xi + yj + zkCoordinate representation: [x y z]

][][][ 212121222111 bzazbyaybxaxzyxbzyxa +++=+

Page 5: Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell

Functions as vectors

Need a set of functions closed under linearcombination, where

Function addition is definedScalar multiplication is defined

Example:Quadratic polynomialsMonomial (power) basis: [x2 x 1]Linear combination: ax2 + bx + cCoordinate representation: [a b c]

Page 6: Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell

Metric spaces

Define a (distance) metric s.t.d is nonnegatived is symmetricIndiscernibles are identical

The triangle inequality holds

R!)d(21v,v

)d()d(: ijjiji v,vv,vVv,v =!"

0)d(: !"# jiji v,vVv,v

)d()d()d(: kikjjikji v,vv,vv,vVv,v,v !+"#

jijiji vvv,vVv,v =!="# 0)d(:

Page 7: Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell

Normed spaces

Define the length or norm of a vectorNonnegativePositive definiteSymmetricThe triangle inequality holds

Banach spaces – normed spaces that are complete(no holes or missing points)

Real numbers form a Banach space, but not rationalnumbers Euclidean n-space is Banach

v

0: !"# vVv

0vv =!= 0

vvVv aaFa =!!" :,

jijiji vvvvVv,v +!+"# :

Page 8: Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell

Norms and metrics

Examples of norms:p norm:

p=1 manhattan normp=2 euclidean norm

Metric from normNorm from metric if

d is homogeneous

d is translation invariant

then

ppD

i

ix

1

1!!

"

#

$$

%

&'=

2121vvv,v !=)d(

)d()d(:, jijiji v,vv,vVv,v aaaFa =!!"

!

"vi ,vj,t # V : d(vi ,vj) = d(vi + t,vj + t)

),d( 0vv =

Page 9: Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell

Inner product spaces

Define [inner, scalar, dot] product (for real spaces) s.t.

For complex spaces:

Induces a norm: vv,v =

R!ji v,v

kjkikji v,vv,vv,vv +=+

jiji v,vvv aa =,

ijji v,vvv =,

0, !vv

0vvv =!= 0,

ijji v,vvv =, jiji v,vvv aa =,

Page 10: Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell

Some inner products

Multiplication in RDot product in Euclidean n-space

For real functions over domain [a,b]

For complex functions over domain [a,b]

Can add nonnegative weight function

!=b

a

dxxgxfgf )()(,

!=b

a

dxxgxfgf )()(,

i

D

i

i 2,1,21vvv,v !

=

=1

!=b

a

wdxxwxgxfgf )()()(,

Page 11: Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell

Hilbert Space

An inner product space that is complete wrtthe induced norm is called a Hilbert spaceInfinite dimensional Euclidean spaceInner product defines distances and anglesSubset of Banach spaces

Page 12: Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell

Orthogonality

Two vectors v1 and v2 are orthogonal if

v1 and v2 are orthonormal if they areorthogonal and

Orthonormal set of vectors (Kronecker delta)

0=21v,v

1==2211v,vv,v

jiji ,!=v,v

Page 13: Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell

Examples

Linear polynomials over [-1,1] (orthogonal)

B0(x) = 1, B1(x) = x

Is x2 orthogonal to these?Is orthogonal to them? (Legendre)

0

1

1

=!"

dxx

2

132+x

Page 14: Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell

Fourier series

Cosine series

!

C0(") =1, C

1(") = cos("), C

n(") = cos(n")

!

Cm,C

n= cos(m")cos(n")d"

0

2#

$

=1

20

2#

$ (cos[(m + n)"]+ cos[(m % n)"])

=1

2(m + n)sin[(m + n)"]+

1

2(m % n)sin[(m % n)"]

&

' (

)

* + 0

2#

= 0

for m , n , 0

!

f (") = aii= 0

#

$ Ci(")

Page 15: Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell

Fourier series

!

=1

2cos(2n") +

1

2

#

$ %

&

' ( d" =

1

4nsin(2n") +

"

2

#

$ %

&

' (

0

2)

*0

2)

= ) for m = n + 0

!

=1

22cos(0)d"

0

2#

$ = 2# for m = n = 0

Sine series

!

S0(") = 0, S1(") = sin("), Sn(") = sin(n")

!

Sm,S

n= sin(m")sin(n")d"

0

2#

$ = 0 for m % n or m = n = 0

= # for m = n % 0

!

f (") = bii= 0

#

$ Si(")

Page 16: Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell

Fourier seriesComplete series

Basis functions are orthogonal but notorthonormalCan obtain an and bn by projection

!

f (") = ann= 0

#

$ cos(n") + bn sin(n")

!

Cm,S

n= cos(m")sin(n")d"

0

2#

$ = 0

!

f ,Ck = f (")cos(k")0

2#

$ d" = cos0

2#

$ (k")d" ain= 0

%

& cos(n") + bi sin(n")

= ak cos2

0

2#

$ (k")d" = # ak (or 2# ak for k = 0)

Page 17: Orthogonal Functions and Fourier Seriesfussell/courses/cs384g-fall...University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell Functions as vectors Need a set

University of Texas at Austin CS384G - Computer Graphics Spring 2010 Don Fussell

Fourier series

!

ak =1

"f (#)cos(k#)

0

2"

$ d#

a0

=1

2"f (#)d#

0

2"

$

Similarly for bk

!

bk =1

"f (#)sin(k#)

0

2"

$ d#