Function Representation & Spherical Harmonics Function - - PowerPoint PPT Presentation

function representation spherical harmonics
SMART_READER_LITE
LIVE PREVIEW

Function Representation & Spherical Harmonics Function - - PowerPoint PPT Presentation

Function Representation & Spherical Harmonics Function approximation G (x) ... function to represent B 1 (x), B 2 (x), B n (x) basis functions G (x) is a linear combination of basis functions n = G ( x ) c B


slide-1
SLIDE 1

Function Representation & Spherical Harmonics

slide-2
SLIDE 2

Function approximation

  • G(x) ... function to represent
  • B1(x), B2(x), … Bn(x) … basis functions
  • G(x) is a linear combination of basis functions
  • Storing a finite number of coefficients ci gives an

approximation of G(x)

) ( ) (

1

x B c x G

i n i i

=

=

slide-3
SLIDE 3

Examples of basis functions

Tent function (linear interpolation) Associated Legendre polynomials

slide-4
SLIDE 4

Function approximation

  • Linear combination

– sum of scaled basis functions

×

1

c = = = ×

2

c ×

3

c

slide-5
SLIDE 5

Function approximation

  • Linear combination

– sum of scaled basis functions

( )=

=

x B c

n i i i 1

slide-6
SLIDE 6

Finding the coefficients

  • How to find coefficients ci?

– Minimize an error measure

  • What error measure?

– L2 error

2

] ) ( ) ( [

2 ∫

− =

I i i i L

x B c x G E

Approximated function Original function

slide-7
SLIDE 7

Finding the coefficients

  • Minimizing EL2 leads to

Where

              =                          

n n n n n n n

B G B G B G c c c B B B B B B B B B B B B B B B B        

2 1 2 1 2 1 2 2 1 2 1 2 1 1 1

=

I

dx x H x F H F ) ( ) (

slide-8
SLIDE 8

Finding the coefficients

  • Matrix

does not depend on G(x)

– Computed just once for a given basis

              =

n n n n n

B B B B B B B B B B B B B B B B      

2 1 2 2 1 2 1 2 1 1 1

B

slide-9
SLIDE 9

Finding the coefficients

  • Given a basis {Bi(x)}
  • 1. Compute matrix B
  • 2. Compute its inverse B-1
  • Given a function G(x) to approximate
  • 1. Compute dot products
  • 2. … (next slide)

[ ]

T n

B G B G B G 

2 1

slide-10
SLIDE 10

Finding the coefficients

  • 2. Compute coefficients as

              =            

− n n

B G B G B G c c c  

2 1 1 2 1

B

slide-11
SLIDE 11

Orthonormal basis

  • Orthonormal basis means
  • If basis is orthonormal then

   ≠ = = j i j i B B

j i

1

I B =             =               = 1 1 1

2 1 2 2 1 2 1 2 1 1 1

      

n n n n n

B B B B B B B B B B B B B B B B

slide-12
SLIDE 12

Orthonormal basis

  • If the basis is orthonormal, computation of

approximation coefficients simplifies to

  • We want orthonormal basis functions

              =            

n n

B G B G B G c c c  

2 1 2 1

slide-13
SLIDE 13

Orthonormal basis

  • Projection: How “similar” is the given basis

function to the function we’re approximating

× × ×

∫ ∫

1

c =

2

c =

3

c =

Original function Basis functions Coefficients

slide-14
SLIDE 14

Another reason for orthonormal basis functions

f(x) = fi Bi(x) g(x) = gi Bi(x)

∫f(x)g(x)dx = fi

gi

  • Intergral of product = dot product of

coefficients

slide-15
SLIDE 15

Application to GI

  • Illumination integral

Lo = ∫ Li(ωi) BRDF (ωi) cosθi dωi

slide-16
SLIDE 16

Spherical Harmonics

slide-17
SLIDE 17

Spherical harmonics

  • Spherical function approximation
  • Domain I = unit sphere S

– directions in 3D

  • Approximated function: G(θ,φ)
  • Basis functions: Yi(θ,φ)= Yl,m(θ,φ)

– indexing: i = l (l+1) + m

slide-18
SLIDE 18

The SH Functions

slide-19
SLIDE 19

Spherical harmonics

  • K … normalization constant
  • P … Associated Legendre polynomial

– Orthonormal polynomial basis on (0,1)

  • In general: Yl,m(θ,φ) = K . Ψ(φ) . Pl,m(cos θ)

– Yl,m(θ,φ) is separable in θ and φ

slide-20
SLIDE 20

Function approximation with SH

  • n…approximation order
  • There are n2 harmonics for order n

) , ( ) , (

, 1 ,

ϕ θ ϕ θ

m l n l l m l m m l Y

c G

∑ ∑

− = = − =

=

slide-21
SLIDE 21

Function approximation with SH

  • Spherical harmonics are orthonormal
  • Function projection

– Computing the SH coefficients – Usually evaluated by numerical integration

  • Low number of coefficients

 low-frequency signal

∫∫ ∫

= = =

π π

ϕ θ θ ϕ θ ϕ θ ω ω ω

2 0 0 , , , ,

sin ) , ( ) , ( ) ( ) ( d d Y G d Y G Y G c

m l S m l m l m l

slide-22
SLIDE 22

Function approximation with SH

slide-23
SLIDE 23

Product integral with SH

  • Simplified indexing

– Yi= Yl,m – i = l (l+1) + m

  • Two functions

represented by SH

) ( ) (

2

ω ω

i n i iY

f F

=

= ) ( ) (

2

ω ω

i n i iY

g G

=

=

∑ ∫

=

=

2

) ( ) (

n i i i S

g f d G F ω ω ω