https://medium.com/@monocosmo77/using-bezier-curves-in-computer-graphics-and-computer-vision-part2-394a3fec6555