答案1
以下是一些起始示例:
\documentclass[tikz,border=7mm]{standalone}
% define some useful styles to draw the strings
\tikzset{
pt/.style={insert path={node[scale=2]{.}}},
dnup/.style={insert path={ [pt] .. controls +(0,1) and +(0,-1) .. +(#1,2) [pt]}},
dndn/.style={insert path={ [pt] .. controls +(0,1) and +(0,1) .. +(#1,0) [pt]}},
upup/.style={insert path={ [pt] .. controls +(0,-1) and +(0,-1) .. +(#1,0) [pt]}},
}
\begin{document}
\begin{tikzpicture}
\draw (0,0) rectangle (7,2);
\draw (1,0) [dnup=2];
\draw (1,2) [upup=1];
\draw (2,0) [dnup=2];
\draw (3,0) [dndn=1];
\draw (5,0) [dnup=0];
\draw (6,0) [dnup=0];
\end{tikzpicture}
\end{document}