This is a real time hair simulation with hair to head collisions. The simulation was written in C++ and uses OpenGL for realtime interaction with the model. The simulation is based on the paper "A Practicle Model for Hair Mutual Interactions", by Yizhou Yu . Also, for reference I used "GPU Gems 2", Chapter 23 Hair Demo . The simulation is invoked via a Mel GUI, and a user can interact with the model in realtime. After the simulation is complete, the Mel GUI can read in the data for rendering.

First, a hair model must be created that will allow my simulation to work, and also be renderable with my favorite renderer, Renderman. Since I want to set keys on the hair, and render with Shave and a Haircut, I need to duplicate the style (as far as I know I cant set keys on Shave guides). This Python script takes the Shave guide hairs and makes a duplicate set of NURBS curves.
Next, as found in GPU Gems, collision spheres are set around the head. This makes collisions easier to handle, and speeds things up. In this sim, there are eight spheres, but there could have been more if I had shoulders to collide with. Their positions and radii are recorded and used in the simulation.
The simulation can be run via the Mel GUI. I input the number of simulation steps and hair count, then clicking the "Run Simulation" button. A Mel pipe is open, then my simulation begins to run in an OpenGL window, and a user can interact with the model.
Head and hair simulation data is fed back into Maya, and keyframes are set on both the head model and NURBS curves we created earlier. Here I show the Mel for the hair, and for the head its just the same except instead of positions, I also have rotations.
Fiddle with some Shave parameters, and render with Renderman for Maya. Now I have my own simulation rendered with Renderman and Shave!