How to derive herons formula