Source: https://perso.liris.cnrs.fr/tpierron/ARSIR2021/TP6.pdf