\RequirePackage{luatex85}
\RequirePackage{shellesc}
\def\height{.8}
\ShellEscape{python curve.py --height \height\space --steps 30}
\documentclass[border=10pt]{standalone}
\thispagestyle{empty}

\usepackage{tikz}
\usetikzlibrary{calc}

\tikzset{
  folding path/.style={gray,dotted},
  outer path/.style={gray,thick},
  hiding path/.style={gray,dashed}
}

\begin{document}
\begin{tikzpicture}[scale=4]
\foreach \k in {0,...,2} {
  \begin{scope}[xshift=\k*1.5cm]
\draw[folding path] (0,0)
plot file {Triskele.table}
coordinate (b)
;
\draw[outer path] (0,0) coordinate (a) -- (b) -- ++(0,1) coordinate (c) -- ($($(b)+(b)$)+(0,1)$) coordinate (d) -- ++(0,1) coordinate (e);
\draw[outer path] (1,0) -- ($($(b)+(b)$)+(1,2)$);

\draw[hiding path] foreach \nd in {a,b,c,d,e} { (\nd) -- ++(1,0)} ;
\path (-45:.35) coordinate (f) (1,0) ++(-135:.35) coordinate (g);
\draw[outer path] (0,0) -- (f) -- (g) -- (1,0);

\draw[hiding path] (b) arc[start angle=180,end angle=0,x radius=.5,y radius=\height/2];
\draw[hiding path] (b) ++(0,1) arc[start angle=-180,end angle=0,x radius=.5,y radius=\height/2];
\draw[hiding path] (d) arc[start angle=180,end angle=0,x radius=.5,y radius=\height/2];
\draw[hiding path] (d) ++(0,1) arc[start angle=-180,end angle=0,x radius=.5,y radius=\height/2];

\draw[folding path] (1,0)
plot[xshift=1cm,xscale=-1] file {Triskele.table}
;
\draw[folding path] (1,0)
plot[shift={(b)},yshift=1cm] file {Triskele.table}
;
\draw[folding path] (1,0)
plot[shift={(b)},yshift=1cm,xshift=1cm,xscale=-1] file {Triskele.table}
;
  \end{scope}
}
\end{tikzpicture}
\end{document}
