Here is an old APUG thread about lens hood design geometry. I have linked to the last page so that you are spared the 'discussion'. Just scroll down to the bottom of the page - the summary is in the last few posts. The first page has a summary of the method and reasoning, though I would use the entrance pupil in the calculation, for better performance.

Good luck,
Helen