function representation spherical harmonics
play

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


  1. Function Representation & Spherical Harmonics

  2. 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 ( x ) i i = i 1 • Storing a finite number of coefficients c i gives an approximation of G (x)

  3. Examples of basis functions Tent function (linear interpolation) Associated Legendre polynomials

  4. Function approximation • Linear combination – sum of scaled basis functions = × c 1 = × c 2 × = c 3

  5. Function approximation • Linear combination – sum of scaled basis functions n ( ) = ∑ c B x i i = i 1

  6. Finding the coefficients • How to find coefficients c i ? – Minimize an error measure • What error measure? – L 2 error ∑ 2 ∫ 2 = − E [ G ( x ) c B ( x ) ] L i i i I Original function Approximated function

  7. Finding the coefficients • Minimizing E L2 leads to        B B B B B B c G B 1 1 1 2 1 n 1 1        B B B B c G B       = 2 1 2 2 2 2                         B B B B B B c G B     n 1 n 2 n n n n Where ∫ = F H F ( x ) H ( x ) dx I

  8. Finding the coefficients • Matrix    B B B B B B 1 1 1 2 1 n    B B B B   = 2 1 2 2 B           B B B B B B   n 1 n 2 n n does not depend on G(x) – Computed just once for a given basis

  9. Finding the coefficients • Given a basis {B i (x)} 1. Compute matrix B 2. Compute its inverse B -1 • Given a function G(x) to approximate 1. Compute dot products [ ] T  G B G B G B 1 2 n 2. … (next slide)

  10. Finding the coefficients 2. Compute coefficients as     c G B 1 1     c G B     − = 2 2 1 B               c G B   n n

  11. Orthonormal basis • Orthonormal basis means =  1 i j =  B B ≠ i j  0 i j • If basis is orthonormal then      B B B B B B 1 0 1 1 1 2 1 n      B B B B 1     = = = 2 1 2 2 B I                   B B B B B B  0 1 n 1 n 2 n n

  12. Orthonormal basis • If the basis is orthonormal, computation of approximation coefficients simplifies to     c G B 1 1     c G B     = 2 2               c G B   n n • We want orthonormal basis functions

  13. Orthonormal basis • Projection: How “similar” is the given basis function to the function we’re approximating ∫ = × c 1 ∫ = × c 2 ∫ = × c 3 Original function Basis functions Coefficients

  14. Another reason for orthonormal basis functions • Intergral of product = dot product of coefficients f(x) = f i B i (x) ∫ f(x)g(x)dx = f i g i g(x) = g i B i (x)

  15. Application to GI • Illumination integral L o = ∫ L i ( ω i ) BRDF ( ω i ) cos θ i d ω i

  16. Spherical Harmonics

  17. Spherical harmonics • Spherical function approximation • Domain I = unit sphere S – directions in 3D • Approximated function: G( θ , φ ) • Basis functions: Y i ( θ , φ )= Y l , m ( θ , φ ) – indexing: i = l (l+1) + m

  18. The SH Functions

  19. Spherical harmonics • K … normalization constant • P … Associated Legendre polynomial – Orthonormal polynomial basis on (0,1) • In general: Y l,m ( θ , φ ) = K . Ψ ( φ ) . P l , m (cos θ ) – Y l , m ( θ , φ ) is separable in θ and φ

  20. Function approximation with SH − = n 1 m l ∑ ∑ θ ϕ = θ ϕ G ( , ) c l Y ( , ) , m l , m = = − l 0 m l • n …approximation order • There are n 2 harmonics for order n

  21. Function approximation with SH • Spherical harmonics are orthonormal • Function projection π π – Computing the SH coefficients 2 ∫ ∫∫ = = ω ω ω = θ ϕ θ ϕ θ θ ϕ c G Y G ( ) Y ( ) d G ( , ) Y ( , ) sin d d l , m l , m l , m l , m S 0 0 – Usually evaluated by numerical integration • Low number of coefficients  low-frequency signal

  22. Function approximation with SH

  23. Product integral with SH • Simplified indexing – Y i = Y l,m – i = l ( l +1) + m • Two functions 2 2 n n ∑ ∑ ω = ω ω = ω represented by SH F ( ) f i Y ( ) G ( ) g i Y ( ) i i = = i 0 i 0 2 n ∑ ∫ ω ω ω = F ( ) G ( ) d f g i i = i 0 S

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend