10

The book has a lot of beautiful vector diagrams like these.

enter image description here

enter image description here

I think pulling this off in TikZ is difficult so I was wondering whether TikZ was used, or some other software.

John
  • 307
  • 1
  • 7

1 Answers1

10

I think that all of these figures can be produced with pgfplots. The histograms can be produces along the lines of this post, and the surfaces as parametric plots. Here is one example.

\documentclass[tikz,border=3mm]{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{colormaps}
\pgfplotsset{compat=1.17}
\begin{document}
\begin{tikzpicture}
 \begin{axis}[hide axis,view={50}{15},unit vector ratio=1 1 1,
    colormap/viridis,
   declare function={R(\u)=0.5+\u/360;rr(\u)=0.05+\u/1080;
    torusx(\u,\v)=cos(\u)*(R(\u) + rr(\u)*cos(\v)); 
    torusy(\u,\v)=(R(\u) + rr(\u)*cos(\v))*sin(-1*\u);
    torusz(\u,\v)=rr(\u)*sin(\v);}]
  \addplot3[surf,point meta=rawx,%shader=interp,
    domain=0:720,domain y=0:360,samples=36,
    z buffer=sort] 
    ({torusx(x,y)},{torusy(x,y)},{torusz(x,y)-3*rr(x)});
 \end{axis}
\end{tikzpicture}
\end{document}

enter image description here

Or

\documentclass[tikz,border=3mm]{standalone}
\usepackage{pgfplots}
%\usepgfplotslibrary{colormaps}
\pgfplotsset{compat=1.17}
\begin{document}
\begin{tikzpicture}
 \begin{axis}[hide axis,view={50}{15},unit vector ratio=1 1 1,
  colormap/viridis,
   declare function={R(\u)=0.5+\u/360;rr(\u)=0.05+\u/1080;
    torusx(\u,\v)=cos(\u)*(R(\u) + rr(\u)*cos(\v)); 
    torusy(\u,\v)=(R(\u) + rr(\u)*cos(\v))*sin(-1*\u);
    torusz(\u,\v)=rr(\u)*sin(\v);}]
  \addplot3[surf,point meta=u,variable=u,variable y=v,%shader=interp,
    domain=0:720,domain y=0:360,samples=36,
    z buffer=sort] 
    ({torusx(u,v)},{torusy(u,v)},{torusz(u,v)-3*rr(u)});
 \end{axis}
\end{tikzpicture}
\end{document}

enter image description here