I do like making these tangent/derivative projects. Many thanks to this article: https://javascript.info/bezier-curve