Have a look at this:

http://dcostanet.net/wordpress/2005/...-of-a-polygon/