Sample image for the requirementI have drawn a closed path bezier curve using the UIBezier path code.Im able to find if touched point on screen is on the closed bezier path boundary or outside it. Requirement:- I need to drag the point where user touched on the closed path bezier curve boundary and make the closed path bezier curve extend.
Refer:- The below question is same as mine but i could not find a solution from it. https://math.stackexchange.com/questions/53819/changing-a-bezier-curve-by-dragging-a-point-on-the-curve-itself-rather-than-a-co
It would be a great help if i could get the Objective C code or algorithm to do the above functionality.
Hi Fang, I have posted the image in my post which illustrates the requirement. Currently i have only point A and point B which is from user touch and move finger. I need to calculate point C and D and remove the path CD so that it looks like the original curve is just expanded in the user finger movement direction.
Note:- I do all this when i get a closed curve.If not closed the user is able to draw free hand which im able to achieve.Currently using quad curve for my requirement.
Any help would be greatful.