# Example: Borromean rings

Published 2008-08-04 | Author: Dan Drake

This document shows how to make the Borromean rings using TikZ. It’s not very complicated, but it shows you how much a TikZ picture is really just like some source code.

Author: Dan Drake Dan Drake’s whatever page.

Download as: [PDF] [TEX]  •  [Open in Overleaf]

Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de. En français: TeXnique.fr.

% Title: Borromean_rings
% Author: Dan Drake <http://math.kaist.ac.kr/~drake>
% This document shows how to make the Borromean rings using TikZ. It's
% not very complicated, but it shows you how much a TikZ picture is
% really just like some source code.
%
% This document may be distributed and modified under the terms of the
% Creative Commons Attribution-Share Alike 3.0 license. See
%
% This document is available from
% http://www.scribd.com/doc/3292620/Borromean-rings. The
% LaTeX{} source code is available from http://math.kaist.ac.kr/~drake.

\documentclass{article}
\usepackage{tikz}
% drawing parameters
\newcommand{\circdist}{1}  % distance from origin to center of circles
\newcommand{\circlethickness}{6mm} % uh, thickness of the circles

% distance from the origin to the three "interior" intersections

% distance from the origin to the three "exterior" intersections

% so we can just specify an angle and get the correct color for the circle
\colorlet{180}{blue}
\colorlet{60}{red}
\colorlet{300}{green}

% draws one of our circles
\newcommand{\mycircle}[1]{%
\draw[thick, double distance=\circlethickness, double=#1]

\begin{document}

\begin{center}
\begin{tikzpicture}[scale=2]
% draw the circles
\foreach \angle in {180, 60, 300}
{
\mycircle{\angle}
}

% we need to re-do two of the intersections so that the rings
% interlock and aren't just piled on top of one another
{
\begin{scope}
\clip (\angle:\rad) circle (5/4*\circlethickness);
%                          you may need to adjust the 5/4 above so
%                          the clipping area is big enough
\mycircle{300}
\mycircle{180}
\end{scope}
}
\end{tikzpicture}
\end{center}

\end{document}