My tutorial was based on this article: http://www.gamedev.net/page/resource...avity-faq-r694
It's quite easy to follow.
NB: The part after 'The REAL Equations' is not mandatory to get it to work and can be skipped it you want.