It's called a bezier curve. I have a code to draw one, but the handles aren't draggable. You will have to do that yourself.
Code:
EnableExplicit
Structure SPointF
X.d
Y.d
EndStructure
Macro PointF(Var, pX, pY)
Var.SPointF\x = pX
Var\y = pY
EndMacro
Global PointF(A, 40, 100)
Global PointF(B, 80, 20)
Global PointF(C, 150, 180)
Global PointF(D, 260, 100)
Procedure lerp(*dest.SPointF, *a.SPointF, *b.SPointF, T.d)
*dest\x = *a\x + (*b\x-*a\x)*T
*dest\y = *a\y + (*b\y-*a\y)*T
EndProcedure
Procedure Bezier(*dest.SPointF, T.f)
Protected AB.SPointF
Protected BC.SPointF
Protected CD.SPointF
Protected ABBC.SPointF
Protected BCCD.SPointF
lerp (ab, a,b,t); // point between a and b (green)
;Plot(ab\x, ab\y, $007F00)
lerp (bc, b,c,t); // point between b and c (green)
;Plot(bc\x, bc\y, $007F00)
lerp (cd, c,d,t); // point between c and d (green)
;Plot(cd\x, cd\y, $007F00)
lerp (abbc, ab,bc,t); // point between ab and bc (blue)
;Plot(abbc\x, abbc\y, $FF0000)
lerp (bccd, bc,cd,t); // point between bc and cd (red)
;Plot(bccd\x, bccd\y, $0000FF)
lerp (*dest, abbc,bccd,t); // point on the bezier-curve (black)
EndProcedure
; Line plotting code
Global pX, pY
Procedure LinePlotStart(X, Y)
pX = X
pY = Y
EndProcedure
Procedure LinePlot(X, Y, Col)
LineXY(pX, pY, X, Y, Col)
pX = X
pY = Y
EndProcedure
; End line plotting code
OpenWindow(0, 0, 0, 512, 384, "", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
CreateImage(0, 512, 384)
StartDrawing(ImageOutput(0))
Box(0, 0, 512, 384, $FFFFFF)
Global p.SPointF
Global I.l
Global T.f
#Step = 100
Bezier(p, 0)
LinePlotStart(p\x, p\y)
For I=0 To #Step
t.f = i/(#Step+0.)
bezier (p, t)
LinePlot(p\x, p\y, 0)
Next
DrawingMode(#PB_2DDrawing_Transparent)
Circle(A\x, A\y, 2, $00FF00) : DrawText(A\x, A\y, "A") :
Circle(B\x, B\y, 2, $00FF00) : DrawText(B\x, B\y, "B") :
Circle(C\x, C\y, 2, $00FF00) : DrawText(C\x, C\y, "C") :
Circle(D\x, D\y, 2, $00FF00) : DrawText(D\x, D\y, "D") :
StopDrawing()
ImageGadget(0, 0, 0, 0, 0, ImageID(0))
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Break
EndSelect
ForEver