Basically, I guess you're going to need some code to rotate a 3D vector, which will probably require some matrix math. Then, you can rotate the vector around the base of the hemisphere, rotate the vector 'up' by x amount, and repeat until the entire hemisphere is scanned. Gah, does that make sense?
[edit] Actually, I'm informed it is possible to do 3d vector rotation without the use of matrices.
[edit] Actually, I'm informed it is possible to do 3d vector rotation without the use of matrices.