答案1
这应该可以让你入门了。我\coilwidth
在设计中使用了注释,以便于更改。
\documentclass{standalone}
\usepackage{circuitikz}
\newcommand{\coilwidth}{0.25}
\tikzset{coil/.pic={\draw plot ({0.61*\coilwidth*sin(25*\x)},0.01*\x);}}% domain=-5:5
\begin{document}
\begin{circuitikz}
\draw (0,0) rectangle (2,2);
\draw (\coilwidth,\coilwidth) rectangle (2-\coilwidth,2-\coilwidth);
\pgfmathsetmacro{\offset}{(2-2*\coilwidth-0.1)/4.5}%
\foreach \i in {0,1,2,3,4} {\draw (0.5*\coilwidth, 1.22*\coilwidth+\offset*\i) pic{coil};}
\end{circuitikz}
\end{document}