Click here to Skip to main content
15,894,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello

I am looking to create a curve by points and drag that points by a mouse move that is working fine for me.

But I am stuck to find the previous and next point from path bezier when use click on a path

Please refer to the attached image to understand my Expectation

Imgur: The magic of the Internet[^]


Can you please help me to find the resolution for this

What I have tried:

I referred to this example

https://www.codeproject.com/KB/WPF/769055/BezierCurveInterpolationSample.zip[^]
Posted
Updated 12-Jan-21 2:21am

Don't post this under Quick Answers - if you got the code from an article, then there is a "Add a Comment or Question" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.
Posting this here relies on them "dropping by" and realising it is for them.
 
Share this answer
 
Comments
Savan Sakariya 12-Jan-21 5:07am    
I already contacted to the author but he is not available to answer it.
OriginalGriff 12-Jan-21 5:43am    
And how long did you give him?
There are no messages from you in any article forum ... just this question and comment.
Savan Sakariya 12-Jan-21 5:53am    
I connected him with linked in id
https://www.linkedin.com/in/raulotanohurtado/
I am finding the solution for the last 4 days
The curve, which is provided by you, is not so easy. The line, you see on the Screen, is inside the curve not really existent. So the only thing you could do is :
Iterate through all the points of your curve and calculate if the point could be between 2 of them. In this case you should calculate the angle between the points and also if the angle between the previous point and your new point is nearly the same. Also the distance between the previous point and the new point should be less than the distance between the 2 points of the curve. If Yes then you got a match - if No : next iteration ...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900