I'm doing some computer graphics program. I need to draw a bezier curve and then determine if a point is on this curve. I've defined 4 points(2 endpoints, 2 control points) and plotted a bezier curve using DrawBeziers
. So how can I determine if a point is on the drawn curve?
- Should I get all the points on the Bezier curve and check if a point in all points of the curve?
- Should I get the equation of the curve and check a point can make the equation true?
- Should I use
DrawBeziers
method to draw it?
How can I implement this feature?
I'm looking forward to everyone's answers, it would be better if the answers could be explained in detail. Thanks in advance.