These curves are defined by the Frenet ODE with constant torsion tau and the
curvature function kappa(s) = a0 + a1*cos(s) + a2*cos(2s) + a3*cos(3s).
To find closed examples note: these curves have the shown principal normals at s = k*pi as symmetry axes for 180 degree rotations. The program adjusts the parameter tau, so that after changes of other parameters these symmetry axes are made coplanar and therefore intersect in one point. The parameter steps associated with pressing up-down keys are medium sized and allow the user to get near closed curves quickly. Smaller parameter changes for final closing have to be typed. -- One can set parameter values which result in negative curvature values. The resulting curves are not "Frenet curves", but the integration of the ODE gives analytic solutions. For example a0 = 2.699, a1 = 3.07, any tau-value between 0.4 and 0.8 will be adjusted to close.
A (4,9) knot is obtained with a0 = 0, a1 = 1.938 and tau = 0.6 will be adjusted.