So the qarp(a,b,c,t) expression is the basis for that. With one for x and y you will get a quadratic Bézier curve. A and c are the endpoints and b is a control point in the middle. Typically the curve will not touch the middle control point but newt is utilizing a little additional math to have the control point be on the curve.
Anyways, the t is a value from 0 to 1 to get any point along the curve.
Basically this is how you’d create points along the curve.
Repeat 10 times
— create at qarp(ax,bx,cx,loopindex/10), qarp(ay,by,cy,loopindex/10)
Newts example draws lines between them with canvas and adds them as waypoints for the move to behavior to move along the curve. Conceptually you can think of the curve getting approximated by multiple lines that are moved along in series. That was done so the speed would be constant. If you alternately just changed t over time and used the qarp expression you could have a more precise curve but the speed would vary.
The shape of the curve is limited by those three control points. You could use cubic() instead to get one more control point to give finer control. There are other ways to do curves between points too, but you’d have to write the whole equation out.
All that in the example was just expressions. No js used there.