# How to draw interlocking tori with Tikz?

I need to draw a couple of interlocking tori, as in the picture, using Tikz.

I've been looking at some examples online and all I find is instructions to do it with Gnuplot, nothing about Tikz. If anyone could help I would deeply appreciate it.

You can plot 4 half tori like this :

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\pgfplotsset{
torus/.style 2 args={
surf,
color=#1!50,faceted color=#1,
samples=17,
z buffer=sort,
domain=0:360, y domain=#2:#2+180
}
}
\def\m{sin(x)}
\def\n{(2+cos(x))*sin(y)}
\def\p{(2+cos(x))*cos(y)}

\begin{document}
\begin{tikzpicture}
\begin{axis}[hide axis,axis equal,scale=3,view={20}{20}]
\end{axis}
\end{tikzpicture}
\end{document}


• To make the tori look "circular" rather than "elliptic", you can use the unit vector ratio=1 1 1 option or axis equal. – Tom Bombadil Nov 28 '15 at 23:46

Run with xelatex:

\documentclass[pstricks]{standalone}
\usepackage{pst-solides3d}
\begin{document}

\psset{Decran=50,viewpoint=20 80 30,lightsrc=viewpoint,action=none}
\begin{pspicture}[solidmemory](-4,-3)(3,3)
\psSolid[r1=2.5,r0=1.5,object=tore,ngrid=18 36,fillcolor=green!30,name=tA]
\psSolid[r1=2.5,r0=1.5,object=tore,ngrid=18 36,fillcolor=blue!30,RotX=90,name=tB](2,0,0)
\psSolid[object=fusion,base=tA tB,action=draw**]
\end{pspicture}

\end{document}