How can i stretch a line?

How can I remodel a line, i want to draw first a line then i want to remodel the line such as in paint software, which algorithm should I use? Are there several algorithms to achieve this? i am using the bresemhan algorithm

For example i have this line, but when i will click in the center and with the mouse i want to pull

• I find it hard to understand what exactly you want to achieve. I guess you draw a straight line and then "pull" to make it a curve? If you add a sketch or two, it might help.
– Tare
Sep 2, 2020 at 7:33
• @Tare i edited my question Sep 2, 2020 at 14:42
• From quickly reading up on the Bresenham algorithm, it has little to do with with your line you want to draw. You also don't mention the framework you're using, so this is still tricky to answer. However, the two things that come to mind when creating a curved line based on certain points are Splines and Bezier Curves. Your points would be the start and end point from your first line drawing, plus either the center or the point closest to the mouse click when pulling (and then to wherever you pull it). Based on that, you should be able to get a curve
– Tare
Sep 3, 2020 at 5:46
• @hubman i dont know sure, but bezier curves is used to 2d and 3d. Sep 5, 2020 at 21:35
• In theory you could just use the Bezier Curve in any plane and then project it into your 3D world. If you want to use it for surfaces, there are Bezier Surfaces (see en.wikipedia.org/wiki/B%C3%A9zier_surface ). If you just want a curve going through all 3 dimensions, there are some sources for that as well (see mathcurve.com/courbes3d.gb/bezier3d/bezier3d.shtml ). So I guess any way you look at it you should be fine in 3D.
– Tare
Sep 7, 2020 at 7:57