Mathematica has curated knot data, e.g.,

KnotData[{3, 1}]

knot image

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]

knot space curve line


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.)

  • $\begingroup$ What you are asking is not so easy to implement... Have you heard about KnotPlot? Have a look. $\endgroup$ Nov 23, 2017 at 8:46
  • $\begingroup$ @Henrik: Yes, what I'm seeking is indeed difficult, and yes I'm aware of KnotPlot. (Thanks.). I don't think even it does quite what I seek (distort an arbitrary knot). I was hoping that some enterprising graduate student had made progress on the problem using Mathematica. $\endgroup$ Nov 24, 2017 at 6:32
  • $\begingroup$ If you have managed to figure this out, I would love to hear what you did. I'm interested in making diagrams for knots with a number of crossings that are higher than the crossing number, to use in some lessons on knot theory. The problem is that I'd also like the diagrams to be pretty. $\endgroup$
    – j0equ1nn
    Mar 6, 2019 at 22:02
  • $\begingroup$ @j0equ1nn: I'll let you know if I ever figure this out. So far, everything has been on a case-by-case design basis. I craft the equations for the desired knot, but that is very slow. $\endgroup$ Mar 6, 2019 at 23:55


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.