Computes the spherical harmonic functions.
IppStatus ipprSH_32f(const Ipp32f* pX, const Ipp32f* pY, const Ipp32f* pZ, Ipp32u N, const Ipp32f* pDstYlm, Ipp32u L, IppSHState* pSHState);
IppStatus ipprSHBand_32f(const Ipp32f* pX, const Ipp32f* pY, const Ipp32f* pZ, Ipp32u N, const Ipp32f* pDstBandYlm, Ipp32u L);
pX, pY, pZ |
Pointers to the source vectors representing a unit sphere points in Cartesians coordinates. |
N |
Number of Cartesians points, that is the length of the source vector. |
pDstYlm |
Pointer to the destination vector to store SH values computed at given points for all orders up to order L, of size N(L+1)(L+1). |
pDstBandYlm |
Pointer to the destination vector to store SH values computed at given points only for order L, of size N(2L+1). |
L |
Order, can not be greater than maximum order specified in the function ipprSHInit. |
pSHState |
Pointer to the external buffer for the SHT state structure that must be initialized with maximum order not less than L. |
The functions ipprSH and ipprSHBand are declared in the ippr.h file. These functions calculates the spherical harmonics functions {Ylm (x, y, z):0 ≤ l ≤ L, |m| ≤ L} for each input point (pX[i], pY[i], pZ[i]), 0 ≤ i < N, which belong to a unit sphere, that is pX[i]2 + pY[i]2 + pZ[i]2 =1.
ipprSH. For each input point this function computes SH function values for all bands up to L. The total number of values for each point is (L+1)(L+1). They are stored in the destination vector pDstYlm as follows:
pDstYlm [i(L+1)(L+1) + 2l + m] = Ylm(pX[i], pY[i], pZ[i]), -L ≤ l ≤ L, |m| ≤ l, 0 ≤ i < N.
That is, they are stored by points, for each point by bands, and for each band by indexes in the following way:
Ylm values for the first point, all bands from 0 to L
Y00 - 0-band;
Y1-1, Y10, Y11 - 1-band;
Y2-2, Y2-1, Y20 , Y21, Y22 - 2-band
...
YL-L, YL-L+1 ,... YL-1, YL0, YL1,... YLL-1, YLL - L-band.
Then analogous set of Ylm values for the second point, all bands from 0 to L, then for the third point and so on up to the N-th point.
ipprSHBand. This function computes SH functions values for each point only for given band L. The total number of values for each point is (2L+1). They are stored in the destination vector pDstBandYlm as follows:
pDstBandYlm [i(2L+1) + L + m] = yLm(pX[i], pY[i], pZ[i]), -L ≤ m ≤ L, 0 ≤ i < N.
That is, they are stored by points for the given band L, and for each point by indexes in the following way:
yL-L, yL-L+1 ,... yL-1, yL0, yL1,... yLL-1, yLL.
ippStsNoErr |
Indicates no error. Any other value indicates an error. |
ippStsNullPtrErr |
Indicates an error if one of the specified pointers is NULL. |
ippStsSizeErr |
Indicates an error if N is equal to 0. |
ippStsRangeErr |
Indicates an error if L is greater that maximum order specified in the function ipprSHInit. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.