Source: http://www.debart.fr/pdf/tr_rectangle.pdf