Check out our code here: github.com/stvnrhodes/CNCAirbrush
As well, there were a couple of papers that provided some very helpful algorithms