Source: https://www.epfl.ch/labs/lasig/wp-content/uploads/2018/12/manifold_tut_1.pdf