ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/cal/spharm.cal
(Generate patch)

Comparing ray/src/cal/cal/spharm.cal (file contents):
Revision 1.2 by greg, Wed Feb 9 17:28:36 2005 UTC vs.
Revision 1.3 by greg, Wed Feb 9 17:36:28 2005 UTC

# Line 72 | Line 72 | SphericalHarmonicYr(l,m,theta,phi) : SHthetaF(l,m,thet
72   SphericalHarmonicYi(l,m,theta,phi) : SHthetaF(l,m,theta)*sin(m*phi);
73  
74                                          { Ordered, real SH basis functions }
75 + { Coeff. order based on Basri & Jacobs paper, "Lambertian Reflectance and
76 +        Linear Subspaces," IEEE Trans. on Pattern Analysis & Machine Intel.,
77 +        vol. 25, no. 2, Feb. 2003, pp. 218-33, Eq. (7):
78 +
79 +        i       n       m       even/odd
80 +        =       =       =       ========
81 +        1       0       0       x
82 +        2       1       0       x
83 +        3       1       1       e
84 +        4       1       1       o
85 +        5       2       0       x
86 +        6       2       1       e
87 +        7       2       1       o
88 +        8       2       2       e
89 +        9       2       2       o
90 +        10      3       0       x
91 +        11      3       1       e
92 +        ...
93 + }
94   SH_B4(l,m,o,theta,phi) : if(m-.5, if(o, SphericalHarmonicYi(l,m,theta,phi),
95                                          SphericalHarmonicYr(l,m,theta,phi)),
96                                  SHthetaF(l,0,theta) );
# Line 79 | Line 98 | SH_B3(l,r,theta,phi) : SH_B4(l,floor((r+1.00001)/2),od
98   SH_B2(l,i,theta,phi) : SH_B3(l,i-l*l-1,theta,phi);
99   SphericalHarmonicB(i,theta,phi) : SH_B2(ceil(sqrt(i)-1.00001),i,theta,phi);
100  
101 <                                        { Application of SH fitting coeff. f(i) }
101 >                                        { Application of SH coeff. f(i) }
102   SH_F2(n,f,theta,phi) : if(n-.5, f(n)*SphericalHarmonicB(n,theta,phi) +
103                                  SH_F2(n-1,f,theta,phi), 0);
104   SphericalHarmonicF(f,theta,phi) : SH_F2(f(0),f,theta,phi);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines