12

Graphics[KnotData[{5, 1}, "KnotDiagramData"]] gives

but I would like to create diagrams like this

remeniscent of Celtic knot designs (which I made by adapting the above Mathematica image in Illustrator). Is there any way to do this in Mathematica directly?

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
martin
  • 8,678
  • 4
  • 23
  • 70

2 Answers2

19

You can use a common 3D trick with double boundary (1, 2, 3):

fun = KnotData[{5, 1}, "SpaceCurve"];
ParametricPlot3D[fun[t], {t, 0, 2 Pi}, PlotPoints -> 100, MaxRecursion -> 1, 
   Axes -> False, Boxed -> False, ViewPoint -> {0, 0, ∞}, 
   ViewVertical -> {0, -1, 0}, PlotRange -> All, 
   Lighting -> {{"Ambient", White}}] /. 
  Line[pts_] :> {White, Tube[pts, 0.1], FaceForm[Opacity[0], Black], 
    Tube[pts, 0.12]}

enter image description here

ybeltukov
  • 43,673
  • 5
  • 108
  • 212
4

This is only a first idea how one could proceed

KnotData[{5, 1}, "Name"]

"Solomon seal knot"

fun = KnotData["Solomon seal knot", "SpaceCurve"];

par =
 ParametricPlot3D[fun[t], {t, 0, 2 Pi},
  Axes -> False,
  Boxed -> False,
  ViewPoint -> Above,
  ImageSize -> Medium,
  PlotStyle -> Thickness[0.05]]

enter image description here

ColorNegate @ EdgeDetect @ Image @ par

enter image description here

eldo
  • 67,911
  • 5
  • 60
  • 168