TeX - LaTeX Asked on May 15, 2021
How can I create a crossing in the picture below? I tried to follow examples in the manual for tikz Knots package.
documentclass[11pt]{amsart}
usepackage{tikz}
usetikzlibrary{knots}
begin{document}
begin{tikzpicture}[scale=0.75]
begin{knot}[clip width=5, clip radius=8pt, consider self intersections]
strand[thick] (0,0)
to[out=up, in=down] (0,1)
to[out=up, in=left] (0.5,1.5)
to[out=right, in=up] (1,1)
to[out=down, in=right] (0.5,0.5)
to[out=left, in=down] (0,1)
to[out=up, in=down] (0,2);
end{knot}
end{tikzpicture}
end{document}
EDIT: I am trying to illustrate the first Reidemeister move. Responding to Andrew’s comment, I modified my code so that the crossing is not at the endpoint of a section and the crossing has tangents in different directions. However, the problem still persists:
begin{knot}[clip width=10, clip radius=15pt, consider self intersections]
strand[thick] (0,0)
to[out=up, in=down] (0,0.7)
to[out=up, in=left] (0.5,1.5)
to[out=right, in=up] (1,1)
to[out=down, in=right] (0.5,0.5)
to[out=left, in=down] (0,1.3)
to[out=up, in=down] (0,2);
end{knot}
Finding the intersections in a knot diagram is a lengthy process so the knots library makes a few optimisations, which can be turned off if needed. These are:
consider self intersections=true
overrides this.end tolerance=<dimen>
(for simplicity, it uses the l^1 norm).ignore endpoint intersections=false
.Here are three solutions. The first adjusts the path so that the intersection is not near an section endpoint (that is, near a specified point on the path). The second uses a smaller adjustment and adjusts end tolerance=<dimen>
as well. The third uses the key ignore endpoint intersections=false
on the original path.
documentclass{article}
usepackage{tikz}
usetikzlibrary{knots}
title{Untitled}
author{}
date{2020-11-11}
begin{document}
maketitle
begin{tikzpicture}
begin{knot}[clip width=10, clip radius=15pt, consider self intersections]
strand[thick] (0,0)
to[out=up, in=down] (0,0.5)
to[out=up, in=left] (0.5,1.5)
to[out=right, in=up] (1,1)
to[out=down, in=right] (0.5,0.5)
to[out=left, in=down] (0,1.5)
to[out=up, in=down] (0,2);
end{knot}
end{tikzpicture}
begin{tikzpicture}
begin{knot}[clip width=10, clip radius=15pt, consider self intersections, end tolerance=3pt]
strand[thick] (0,0)
to[out=up, in=down] (0,0.7)
to[out=up, in=left] (0.5,1.5)
to[out=right, in=up] (1,1)
to[out=down, in=right] (0.5,0.5)
to[out=left, in=down] (0,1.3)
to[out=up, in=down] (0,2);
end{knot}
end{tikzpicture}
begin{tikzpicture}[scale=0.75]
begin{knot}[clip width=5, clip radius=8pt, consider self intersections, ignore endpoint intersections=false]
strand[thick] (0,0)
to[out=up, in=down] (0,1)
to[out=up, in=left] (0.5,1.5)
to[out=right, in=up] (1,1)
to[out=down, in=right] (0.5,0.5)
to[out=left, in=down] (0,1)
to[out=up, in=down] (0,2);
end{knot}
end{tikzpicture}
end{document}
Correct answer by Andrew Stacey on May 15, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP