Graphics Reference
In-Depth Information
where the coefficients
L
l
are computed by integrating
L
over the corresponding
SH basis function:
π
2π
L
l
=
(
θ
,
φ
)
Y
l
,
m
(
θ
,
φ
)
θ
.
L
sin
θ
d
φ
d
0
0
=
,
,
,...
=
−
,...,
For each
l
0
1
2
the basis functions are defined for
m
l
l
; i.e., there
are 2
l
1 basis functions of each degree
l
. It is sometimes useful to “flatten” the
indexing of
l
and
m
to a single index
i
,
+
i
=
l
(
l
+
1
)+
m
+
1
,
which reduces the double summation in Equation (10.1) to the single summation
n
2
i
=
1
i
y
i
(
θ
,
φ
)
.
(10.2)
To avoid ambiguity, the single-index SH basis functions and corresponding co-
efficients are denoted by
y
i
and
i
, respectively, in Equation (10.2). The upper
limit on the summation
n
2
comes from the the total number of SH basis functions
through degree
l
which is 1
2
;
n
+
3
+
5
+
···
+
2
n
+
1
=(
l
+
1
)
=
l
+
1isthe
order
of the expansion.
Another useful optimization available for real spherical harmonics was em-
ployed in Chapter 7. The spherical coordinates
θ
and
φ
appear only in sine
and cosine functions.
If a point on the sphere is represented by a unit vector
s
, these trigonometric functions can be represented directly in terms of the rectan-
gular coordinates of
,where
x
2
y
2
z
2
s
=(
x
,
y
,
z
)
+
+
=
1. For example, cos
θ
=
z
,
15
16
x
2
y
2
Y
2
,−
2
=
π
(
−
)
4π
15
4
Y
1
,−
1
=
−
x
Y
2
,−
1
=
−
xz
π
4π
4π
5
16π
(
3
z
2
Y
0
,
0
=
Y
1
,
0
=
z
Y
2
,
0
=
−
1
)
4π
15
4π
Y
1
,
1
=
−
y
Y
2
,
1
=
−
yz
15
16
Y
2
,
2
=
2
xy
π
Real spherical harmonics for
l
=
0
,
1
,
2 in rectangular coordinates (
x
2
+
y
2
+
z
2
Table 10.1
=
1).