Source: https://www.timdevereux.co.uk/maths/geompages/8theorem.pdf