Two Colliding Pendula

 

This example uses the new addObject method.  Notice also the use of a circular constraint and the particle interaction.