https://www.graphics.rwth-aachen.de/media/teaching_files/mueller_siggraph12.pdf