https://medium.com/@monocosmo77/using-bezier-curves-in-computer-graphics-and-computer-vision-part1-ebf94db55519