Picture's worth a thousand words:
https://img519.imageshack.us/img519/6591/tempdw2.png
But I thought I'll add some(words) anyway :p
This is only an example. there are a few more cases... Make sure you put as much in as possible.
Benny
When in doubt, delete history and freeze transformations.
My latest snake game
(Requires DirectX9 SDK and Framework)