The subject is rather well done and there are many approaches. I can't guess what stopped you from using a google or other search on this old problem.
Bob