Finally got the formula to find the points that lie on the bezier curve.
bezier path is working