Chains and pulleys.
I had a feeling adding support for chains would not be too difficult. However, it took just over 4 hours to get it all working. The difficult part with this one was positioning the chain segments properly. When they are placed incorrectly, the physics simulation corrects them by applying forces, which causes horrific jitter.
(Clicky for make big)
As part of the positioning, the rotation of each segment is also important. For this, I just used Chipmunk's excellent vector methods. The first step is getting the difference between the vectors, normalizing them to 0..1, and finally converting the resulting vector to an angle. For the position, I just use Chipmunk's built-in vector linear interpolation function. It's excellent!
There's one known bug that the segments nearest to each point on the chain are initialized with an incorrect rotation, and the positions are non-optimal. It creates a little bit of jitter, but it's not completely broken! It could be better.
The pulleys are just circles which are anchored to the default static body with pivot joints. Friction causes them rotate as the chain slides over.
The other obvious change for tonight is that most objects (but not all) are initialized with a random color. This was part of an API update for the object constructors.