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?
Answer
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]}
Comments
Post a Comment