12
$\begingroup$

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?

$\endgroup$
3

2 Answers 2

19
$\begingroup$

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

$\endgroup$
3
  • $\begingroup$ Nice solution thanks! :) One minor poit - mine is showing up slightly differently to youur - ie with contour lines - I an on v.10.2 - can you relpicate this? $\endgroup$
    – martin
    Commented Nov 15, 2015 at 15:49
  • 1
    $\begingroup$ @martin It is a bug of versions 10.0 – 10.2, I advise to upgrade to 10.3. $\endgroup$
    – ybeltukov
    Commented Nov 15, 2015 at 16:10
  • $\begingroup$ ok will do - thanks again :) $\endgroup$
    – martin
    Commented Nov 15, 2015 at 16:13
4
$\begingroup$

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

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.