Mathematica has curated knot data, e.g.,
KnotData[{3, 1}]
One can extract the three-dimensional space curve in this way:
f = KnotData[{3, 1}, "SpaceCurve"]
(* {Sin[#1] + 2 Sin[2 #1], Cos[#1] - 2 Cos[2 #1], -Sin[3 #1]} & *)
and plot it to show a line, e.g.,
ParametricPlot3D[f[t], {t, 0, 2 Pi}, Axes -> False]
Question
I would like to generate a knot image from the KnotData database (as in the top shaded diagram, above), and then be able to click on a point on the knot and drag/move it left-right-up-down with the rest of the knot obeying the physical constraints. (Formally, this does not change the knot... just its visual representation.) I'd like to then be able to rotate the entire figure in three dimensions and then "grab" another point on the knot and move it likewise. And so on. It is to be expected that the "string" will stretch or contract, as needed. (Presumably the final algorithmic step would be automatic smoothing of the final curve.) In this way, I want to make (by hand) a number of knot diagrams for the same original knot, all that share the same visual style.
This problem is quite difficult, because the transformation must "know" when portions of the links would intersect and hence prevent them from passing through one another.
My hope is that there is some code for an analogous problem (dragging a "string") that can be applied to this problem. (There is a demonstration that allows one to click and drag on a grid, but clearly this isn't quite as sophisticated as what I'm seeking.)