RECF runs a series of online challenges every year: There is a good submission for three different components: http://challenges.robotevents.com/uploads/0003066_original.doc
The three parts are a small one by square, a 60 degree triangle and a flat square. I like to see a 45 degree (45/45/90) one too.

