1

How to add loops winding all the way around the torus and simple loops to this torus:

\documentclass[tikz,border=1.14mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}
\begin{document}
    \begin{tikzpicture}[scale=0.5]
        \begin{axis}[colormap/blackwhite,
            view={30}{60},axis lines=none
            ]
            \addplot3[surf,opacity=0.7,
            samples=50, point meta=x+3*z*z-0.25*y,
            domain=0:2*pi,y domain=0:2*pi,
            z buffer=sort]
            ({(3+cos(deg(x)))*cos(deg(y))}, 
            {(3+cos(deg(x)))*sin(deg(y))}, 
            {sin(deg(x))});
        \end{axis}
    \end{tikzpicture}
\end{document}

enter image description here

ale_7
  • 11
  • 2

1 Answers1

0

Like this:

enter image description here

Code:

\documentclass[border=10pt]{standalone} 
\usepackage{tikz}
\begin{document} 
    \begin{tikzpicture} 
        \foreach \r in {5,4.99,...,3}{%
            \pgfmathsetmacro{\c}{int(20*\r)}
        \draw[blue!\c] (0,0) circle(\r);
        }
        \foreach \an in {0,15,...,345}
            \draw (\an:4) circle(1.5);
    \end{tikzpicture} 
\end{document}

Edit to answer OP comment:

You can have this:

enter image description here

with little changes:

\documentclass[border=10pt]{standalone} 
\usepackage{tikz}
\begin{document} 
    \begin{tikzpicture} 
        \foreach \r in {5,4.99,...,3}{%
            \pgfmathsetmacro{\c}{int(20*\r)}
        \draw[gray!\c] (0,0) circle(\r);
        }
        \foreach \an in {0,10,...,350}
            \draw[line width=2pt] (\an:4) circle(1);
    \end{tikzpicture} 
\end{document}