My first program to show to the world :) This demo was a bit old, but I always remember with wet eyes :>
You can download the video and other programming stuff in my website
I use verlet integration for physics, where each spring matches to any edge in the face patch (I import the hair as a single model from a modeling program). Before simulation starts I must sort faces by distance to the head center for allow a more realistic simulation.
The algorithm is too fast, and I use sphere-triangle collision instead sphere-point for more accurate results (and avoid interpenetration).