Principle :
The program uses an Hermite polynomial to define a piece of curve between two consecutive points of the list [ m[0] , .... , m[n] ] of control points : it is defined by a procedure " hermite(p0, p1, tau0, tau1) ", where p0, p1 are the starting en ending points and tau0, tau1 are the tangent vectors at these points. This procedure is used on the interval [0,1].
To actually define the piece [ m[k] , m[k+1] ] of the curve the procedure is used with the tangent vector tau[k] = tension * ( m[k+1] - m[k-1] ) at m[k] : the tension parameter has a strong effect on the curve's look and takes his value between 0 and 1.
At first one point is added at the beginning of the list, and one or two at the end, depending on wether the curve is closed or not : this trick to handle all the control points which define the curve.
Display :
In the middle the canvas where the curve is displayed.
Up you can choose the number of starting points by clicking on a radio button; the text area aside displays the actual number of points.
At right you can open or close the curve.
At left you can show or hide the control points.
Down :
At left you can modify the tension parameter, which more or less defines the smoothness of the curve : the default value is 0.5, which seems to be the finest one.
At right you can modify the number of segments used to draw each piece of the curve : his range is from 5 to 50 and the default value is 20, which seems large enough.
Between the buttons to save the curve onto the local storage of your navigator, or to load the curve from a previous storage : this for the time of your session life.
Rules :
You may drag an existing control point by clicking on it, then dragging it and finally dropping it where you want.
When clicking in the canvas while holding the Shift key you add a control point at the end of the list. If you want to insert a control point before an existing point you have to previously click on this point while holding the Alt key, then add a new point as mentionned.
You can remove an existing control point by clicking on it while holding the Ctrl key.