write my own quadraticCurve function without canvas with pure Bezier functions math