projectPointToQuadraticBezier function