The CNC Cookbook have a bit on this:
which we discussed a bit at:
A new (to me at least) resource is: