I ran across this paper that explains one way to calculate support structures for 3D printing.
http://cybertron.cg.tu-berlin.de/rapid_prototyping_11ws/slicer/
I found it relatively clear and easy to understand.
Of course, there are more than one way to skin this cat, so this isn't necessarily the way any given software works.