I am trying to implement CGContextAddCurveToPoint()
in my app. In addition to the starting point and ending points, the function also takes two control points.
I need to know the exact formula of the curve so I can calculate the shortest distance from the curve to a tapped point, so I'm just wondering if anyone know how, mathematically, the two control points affect the cubic function which it is supposed to draw.