# Trefoil knot

> The simplest nontrivial knot, drawn as one closed strand with three crossings. A knots example with its complete LaTeX source, ready to copy or open in TeXeR.

A knots example in the TeXeR TikZ library: https://texer.org/library/knots/trefoil

Package: [knots](https://texer.org/library/knots.md), on CTAN at https://ctan.org/pkg/spath3.

Tags: trefoil, knot

## Source

```latex
\usetikzlibrary{knots}

\begin{tikzpicture}[scale=0.9]
  \begin{knot}[consider self intersections=true, clip width=5, flip crossing=2]
    \strand[thick] (0,2)
    .. controls +(2.2,0) and +(120:-2.2) .. (210:2)
    .. controls +(120:2.2) and +(60:2.2) .. (-30:2)
    .. controls +(60:-2.2) and +(-2.2,0) .. (0,2);
  \end{knot}
\end{tikzpicture}
```

## As a complete document

The same example in a document that compiles on its own with pdfLaTeX:

```latex
\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage{amssymb}
\usetikzlibrary{knots}

\begin{document}

\begin{tikzpicture}[scale=0.9]
  \begin{knot}[consider self intersections=true, clip width=5, flip crossing=2]
    \strand[thick] (0,2)
    .. controls +(2.2,0) and +(120:-2.2) .. (210:2)
    .. controls +(120:2.2) and +(60:2.2) .. (-30:2)
    .. controls +(60:-2.2) and +(-2.2,0) .. (0,2);
  \end{knot}
\end{tikzpicture}
\end{document}
```
