%% Native wave and acoustic components.
\usetikzlibrary{tikzphysics.core}
\makeatletter




%% BEGIN NATIVE COMPONENT EXTENSIONS
%% transverse wave
\tikzset{
 wave length/.initial=4cm,
 physics wave length/.style={wave length={#1}},
 wave amplitude/.initial=.4cm,
 physics wave amplitude/.style={wave amplitude={#1}},
 wave cycles/.initial=2,
 physics wave cycles/.style={wave cycles={#1}},
 wave phase/.initial=0,
 physics wave phase/.style={wave phase={#1}},
}
\pgfdeclareshape{physicstransversewavenode}{
 \savedmacro\tikzphysics@component@physicstransversewavenodestate{%
  \tikzphysics@component@length\cw{wave length}
  \tikzphysics@component@length\camp{wave amplitude}
  \pgfmathsetmacro\cn{\pgfkeysvalueof{/tikz/wave cycles}}
  \pgfmathsetmacro\cphase{\pgfkeysvalueof{/tikz/wave phase}}
\tikzphysics@component@check{\cw>0 && \camp>0 && \cn>0 && \cn<=100}{Wave length and amplitude must be positive and cycles in (0,100]}
  \addtosavedmacro\cw
  \addtosavedmacro\camp
  \addtosavedmacro\cn
  \addtosavedmacro\cphase
 }
 \anchor{center}{\tikzphysics@component@physicstransversewavenodestate\tikzphysics@component@point{0}{0}}
 \anchor{north}{\tikzphysics@component@physicstransversewavenodestate\tikzphysics@component@point{0}{\camp}}
 \anchor{south}{\tikzphysics@component@physicstransversewavenodestate\tikzphysics@component@point{0}{-(\camp)}}
 \anchor{east}{\tikzphysics@component@physicstransversewavenodestate\tikzphysics@component@point{\cw/2}{0}}
 \anchor{west}{\tikzphysics@component@physicstransversewavenodestate\tikzphysics@component@point{-(\cw/2)}{0}}
 \anchor{north east}{\tikzphysics@component@physicstransversewavenodestate\tikzphysics@component@point{\cw/2}{\camp}}
 \anchor{north west}{\tikzphysics@component@physicstransversewavenodestate\tikzphysics@component@point{-(\cw/2)}{\camp}}
 \anchor{south east}{\tikzphysics@component@physicstransversewavenodestate\tikzphysics@component@point{\cw/2}{-(\camp)}}
 \anchor{south west}{\tikzphysics@component@physicstransversewavenodestate\tikzphysics@component@point{-(\cw/2)}{-(\camp)}}
 \anchor{start}{\tikzphysics@component@physicstransversewavenodestate\tikzphysics@component@point{-\cw/2}{0}}
 \anchor{end}{\tikzphysics@component@physicstransversewavenodestate\tikzphysics@component@point{\cw/2}{0}}
 \anchor{text}{\pgf@x=-.5\wd\pgfnodeparttextbox\pgf@y=-.5\ht\pgfnodeparttextbox\advance\pgf@y by.5\dp\pgfnodeparttextbox}
 \tikzphysics@declarepercentanchors{axis}{\tikzphysics@component@physicstransversewavenodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(0)*1cm}
 \tikzphysics@declarepercentanchors{curve}{\tikzphysics@component@physicstransversewavenodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(\camp*sin(360*\cn*\tikzphysics@percent+\cphase))*1cm}
 \anchorborder{\edef\cpx{\the\pgf@x}\edef\cpy{\the\pgf@y}\tikzphysics@component@physicstransversewavenodestate\pgfpointborderrectangle{\pgfpoint{\cpx}{\cpy}}{\tikzphysics@component@point{\cw/2}{\camp}}}
 \backgroundpath{\tikzphysics@component@physicstransversewavenodestate
\pgfmathtruncatemacro\ccount{ceil(max(100,24*\cn))}
\def\cu{0}\tikzphysics@component@move{(-.5+\cu)*\cw}{\camp*sin(360*\cn*\cu+\cphase)}
\foreach \ci in {1,...,\ccount}{\pgfmathsetmacro\cu{\ci/\ccount}\tikzphysics@component@line{(-.5+\cu)*\cw}{\camp*sin(360*\cn*\cu+\cphase)}
}
 }
}
\tikzphysics@declarehook{transverse wave}
\tikzphysics@registerdisplayname{physicstransversewavenode}{transverse wave}
\tikzphysics@registeranchors{physicstransversewavenode}{center,north,south,east,west,start,end}
\tikzphysics@registerfamilies{physicstransversewavenode}{axis,curve}
\tikzphysics@registerkeys{physicstransversewavenode}{wave length,wave amplitude,wave cycles,wave phase}
\tikzphysics@registerkeydefaults{physicstransversewavenode}{wave length/4cm,wave amplitude/.4cm,wave cycles/2,wave phase/0}
\tikzset{physicstransversewavenode/.style={shape=physicstransversewavenode,physics logical shape=physicstransversewavenode,anchor=center,draw=black,fill=none,inner sep=0pt,outer sep=0pt,physics debug setup,every physics object,every transverse wave},transverse wave/.style={physicstransversewavenode}}
\def\tikzphysics@component@physicsstandingwavenodeordinal#1{%
 \anchor{node-#1}{\tikzphysics@component@physicsstandingwavenodestate\tikzphysics@component@check{#1<=(\cn)}{standing wave node index out of range}\tikzphysics@component@point{(-.5+#1/\cn)*\cw}{0}}%
 \anchor{antinode-#1}{\tikzphysics@component@physicsstandingwavenodestate\tikzphysics@component@check{#1<=(\cn-1)}{standing wave antinode index out of range}\tikzphysics@component@point{(-.5+(#1+.5)/\cn)*\cw}{0}}%
}
%% standing wave
\tikzset{
 wave length/.initial=4cm,
 physics wave length/.style={wave length={#1}},
 wave amplitude/.initial=.4cm,
 physics wave amplitude/.style={wave amplitude={#1}},
 standing wave lobes/.initial=3,
 physics standing wave lobes/.style={standing wave lobes={#1}},
}
\pgfdeclareshape{physicsstandingwavenode}{
 \savedmacro\tikzphysics@component@physicsstandingwavenodestate{%
  \tikzphysics@component@length\cw{wave length}
  \tikzphysics@component@length\camp{wave amplitude}
  \pgfmathsetmacro\cn{\pgfkeysvalueof{/tikz/standing wave lobes}}
\tikzphysics@component@check{\cw>0 && \camp>0 && \cn>0 && \cn<=100}{Wave length and amplitude must be positive and cycles in (0,100]}
\tikzphysics@component@check{\cn==int(\cn) && \cn<=100}{Standing wave lobes must be an integer from 1 to 100}
  \addtosavedmacro\cw
  \addtosavedmacro\camp
  \addtosavedmacro\cn
 }
 \anchor{center}{\tikzphysics@component@physicsstandingwavenodestate\tikzphysics@component@point{0}{0}}
 \anchor{north}{\tikzphysics@component@physicsstandingwavenodestate\tikzphysics@component@point{0}{\camp}}
 \anchor{south}{\tikzphysics@component@physicsstandingwavenodestate\tikzphysics@component@point{0}{-(\camp)}}
 \anchor{east}{\tikzphysics@component@physicsstandingwavenodestate\tikzphysics@component@point{\cw/2}{0}}
 \anchor{west}{\tikzphysics@component@physicsstandingwavenodestate\tikzphysics@component@point{-(\cw/2)}{0}}
 \anchor{north east}{\tikzphysics@component@physicsstandingwavenodestate\tikzphysics@component@point{\cw/2}{\camp}}
 \anchor{north west}{\tikzphysics@component@physicsstandingwavenodestate\tikzphysics@component@point{-(\cw/2)}{\camp}}
 \anchor{south east}{\tikzphysics@component@physicsstandingwavenodestate\tikzphysics@component@point{\cw/2}{-(\camp)}}
 \anchor{south west}{\tikzphysics@component@physicsstandingwavenodestate\tikzphysics@component@point{-(\cw/2)}{-(\camp)}}
 \anchor{start}{\tikzphysics@component@physicsstandingwavenodestate\tikzphysics@component@point{-\cw/2}{0}}
 \anchor{end}{\tikzphysics@component@physicsstandingwavenodestate\tikzphysics@component@point{\cw/2}{0}}
 \anchor{text}{\pgf@x=-.5\wd\pgfnodeparttextbox\pgf@y=-.5\ht\pgfnodeparttextbox\advance\pgf@y by.5\dp\pgfnodeparttextbox}
 \tikzphysics@declarepercentanchors{axis}{\tikzphysics@component@physicsstandingwavenodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(0)*1cm}
 \tikzphysics@declarepercentanchors{curve}{\tikzphysics@component@physicsstandingwavenodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(\camp*sin(180*\cn*\tikzphysics@percent))*1cm}
\foreach \ci in {0,...,100}{\expandafter\tikzphysics@component@physicsstandingwavenodeordinal\expandafter{\ci}}
 \anchorborder{\edef\cpx{\the\pgf@x}\edef\cpy{\the\pgf@y}\tikzphysics@component@physicsstandingwavenodestate\pgfpointborderrectangle{\pgfpoint{\cpx}{\cpy}}{\tikzphysics@component@point{\cw/2}{\camp}}}
 \backgroundpath{\tikzphysics@component@physicsstandingwavenodestate
\pgfmathtruncatemacro\ccount{ceil(max(100,24*\cn))}
\def\cu{0}\tikzphysics@component@move{(-.5+\cu)*\cw}{\camp*sin(180*\cn*\cu)}
\foreach \ci in {1,...,\ccount}{\pgfmathsetmacro\cu{\ci/\ccount}\tikzphysics@component@line{(-.5+\cu)*\cw}{\camp*sin(180*\cn*\cu)}
}
 }
}
\tikzphysics@declarehook{standing wave}
\tikzphysics@registerdisplayname{physicsstandingwavenode}{standing wave}
\tikzphysics@registeranchors{physicsstandingwavenode}{center,north,south,east,west,start,end}
\tikzphysics@registerfamilies{physicsstandingwavenode}{axis,curve}
\tikzphysics@registerkeys{physicsstandingwavenode}{wave length,wave amplitude,standing wave lobes}
\tikzphysics@registerkeydefaults{physicsstandingwavenode}{wave length/4cm,wave amplitude/.4cm,standing wave lobes/3}
\tikzset{physicsstandingwavenode/.style={shape=physicsstandingwavenode,physics logical shape=physicsstandingwavenode,anchor=center,draw=black,fill=none,inner sep=0pt,outer sep=0pt,physics debug setup,every physics object,every standing wave},standing wave/.style={physicsstandingwavenode}}
%% longitudinal wave
\tikzset{
 wave length/.initial=4cm,
 physics wave length/.style={wave length={#1}},
 wave amplitude/.initial=.4cm,
 physics wave amplitude/.style={wave amplitude={#1}},
 wave cycles/.initial=2,
 physics wave cycles/.style={wave cycles={#1}},
 wave coils/.initial=16,
 physics wave coils/.style={wave coils={#1}},
 wave compression/.initial=.65,
 physics wave compression/.style={wave compression={#1}},
}
\pgfdeclareshape{physicslongitudinalwavenode}{
 \savedmacro\tikzphysics@component@physicslongitudinalwavenodestate{%
  \tikzphysics@component@length\cw{wave length}
  \tikzphysics@component@length\camp{wave amplitude}
  \pgfmathsetmacro\cn{\pgfkeysvalueof{/tikz/wave cycles}}
  \pgfmathsetmacro\ccoils{\pgfkeysvalueof{/tikz/wave coils}}
  \pgfmathsetmacro\cc{\pgfkeysvalueof{/tikz/wave compression}}
\tikzphysics@component@check{\cw>0 && \camp>0 && \cn>0 && \cn<=100}{Wave length and amplitude must be positive and cycles in (0,100]}
\tikzphysics@component@check{\cn==int(\cn) && \ccoils==int(\ccoils) && \ccoils>=1 && \ccoils<=100 && \cc>=0 && \cc<1}{Longitudinal wave requires integer cycles and coils and 0 <= compression < 1}
  \addtosavedmacro\cw
  \addtosavedmacro\camp
  \addtosavedmacro\cn
  \addtosavedmacro\ccoils
  \addtosavedmacro\cc
 }
 \anchor{center}{\tikzphysics@component@physicslongitudinalwavenodestate\tikzphysics@component@point{0}{0}}
 \anchor{north}{\tikzphysics@component@physicslongitudinalwavenodestate\tikzphysics@component@point{0}{\camp}}
 \anchor{south}{\tikzphysics@component@physicslongitudinalwavenodestate\tikzphysics@component@point{0}{-(\camp)}}
 \anchor{east}{\tikzphysics@component@physicslongitudinalwavenodestate\tikzphysics@component@point{\cw/2}{0}}
 \anchor{west}{\tikzphysics@component@physicslongitudinalwavenodestate\tikzphysics@component@point{-(\cw/2)}{0}}
 \anchor{north east}{\tikzphysics@component@physicslongitudinalwavenodestate\tikzphysics@component@point{\cw/2}{\camp}}
 \anchor{north west}{\tikzphysics@component@physicslongitudinalwavenodestate\tikzphysics@component@point{-(\cw/2)}{\camp}}
 \anchor{south east}{\tikzphysics@component@physicslongitudinalwavenodestate\tikzphysics@component@point{\cw/2}{-(\camp)}}
 \anchor{south west}{\tikzphysics@component@physicslongitudinalwavenodestate\tikzphysics@component@point{-(\cw/2)}{-(\camp)}}
 \anchor{start}{\tikzphysics@component@physicslongitudinalwavenodestate\tikzphysics@component@point{-\cw/2}{0}}
 \anchor{end}{\tikzphysics@component@physicslongitudinalwavenodestate\tikzphysics@component@point{\cw/2}{0}}
 \anchor{text}{\pgf@x=-.5\wd\pgfnodeparttextbox\pgf@y=-.5\ht\pgfnodeparttextbox\advance\pgf@y by.5\dp\pgfnodeparttextbox}
 \tikzphysics@declarepercentanchors{axis}{\tikzphysics@component@physicslongitudinalwavenodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(0)*1cm}
 \tikzphysics@declarepercentanchors{curve}{\tikzphysics@component@physicslongitudinalwavenodestate}{((-.5+\tikzphysics@percent+\cc*sin(360*\cn*\tikzphysics@percent)/(2*pi*\cn))*\cw)*1cm}{(\camp*sin(360*\ccoils*\tikzphysics@percent))*1cm}
 \anchorborder{\edef\cpx{\the\pgf@x}\edef\cpy{\the\pgf@y}\tikzphysics@component@physicslongitudinalwavenodestate\pgfpointborderrectangle{\pgfpoint{\cpx}{\cpy}}{\tikzphysics@component@point{\cw/2}{\camp}}}
 \backgroundpath{\tikzphysics@component@physicslongitudinalwavenodestate
\pgfmathtruncatemacro\ccount{ceil(max(100,24*\ccoils))}
\def\cu{0}\tikzphysics@component@move{(-.5+\cu+\cc*sin(360*\cn*\cu)/(2*pi*\cn))*\cw}{\camp*sin(360*\ccoils*\cu)}
\foreach \ci in {1,...,\ccount}{\pgfmathsetmacro\cu{\ci/\ccount}\tikzphysics@component@line{(-.5+\cu+\cc*sin(360*\cn*\cu)/(2*pi*\cn))*\cw}{\camp*sin(360*\ccoils*\cu)}
}
 }
}
\tikzphysics@declarehook{longitudinal wave}
\tikzphysics@registerdisplayname{physicslongitudinalwavenode}{longitudinal wave}
\tikzphysics@registeranchors{physicslongitudinalwavenode}{center,north,south,east,west,start,end}
\tikzphysics@registerfamilies{physicslongitudinalwavenode}{axis,curve}
\tikzphysics@registerkeys{physicslongitudinalwavenode}{wave length,wave amplitude,wave cycles,wave coils,wave compression}
\tikzphysics@registerkeydefaults{physicslongitudinalwavenode}{wave length/4cm,wave amplitude/.4cm,wave cycles/2,wave coils/16,wave compression/.65}
\tikzset{physicslongitudinalwavenode/.style={shape=physicslongitudinalwavenode,physics logical shape=physicslongitudinalwavenode,anchor=center,draw=black,fill=none,inner sep=0pt,outer sep=0pt,physics debug setup,every physics object,every longitudinal wave},longitudinal wave/.style={physicslongitudinalwavenode}}
\def\tikzphysics@component@physicsopenpipenodeordinal#1{%
 \anchor{node-#1}{\tikzphysics@component@physicsopenpipenodestate\tikzphysics@component@check{#1<=(\cn-1)}{open pipe node index out of range}\tikzphysics@component@point{(-.5+(#1+.5)/\cn)*\cw}{0}}%
 \anchor{antinode-#1}{\tikzphysics@component@physicsopenpipenodestate\tikzphysics@component@check{#1<=(\cn)}{open pipe antinode index out of range}\tikzphysics@component@point{(-.5+#1/\cn)*\cw}{0}}%
}
%% open pipe
\tikzset{
 pipe length/.initial=4cm,
 physics pipe length/.style={pipe length={#1}},
 pipe width/.initial=.8cm,
 physics pipe width/.style={pipe width={#1}},
 pipe mode/.initial=1,
 physics pipe mode/.style={pipe mode={#1}},
}
\pgfdeclareshape{physicsopenpipenode}{
 \savedmacro\tikzphysics@component@physicsopenpipenodestate{%
  \tikzphysics@component@length\cw{pipe length}
  \tikzphysics@component@length\ch{pipe width}
  \pgfmathsetmacro\cn{\pgfkeysvalueof{/tikz/pipe mode}}
\tikzphysics@component@check{\cw>0 && \ch>0 && \cn==int(\cn) && \cn>=1 && \cn<=50}{Pipe dimensions must be positive and mode an integer from 1 to 50}
\pgfmathsetmacro\camp{.35*\ch}
  \addtosavedmacro\cw
  \addtosavedmacro\ch
  \addtosavedmacro\cn
  \addtosavedmacro\camp
 }
 \anchor{center}{\tikzphysics@component@physicsopenpipenodestate\tikzphysics@component@point{0}{0}}
 \anchor{north}{\tikzphysics@component@physicsopenpipenodestate\tikzphysics@component@point{0}{\ch/2}}
 \anchor{south}{\tikzphysics@component@physicsopenpipenodestate\tikzphysics@component@point{0}{-(\ch/2)}}
 \anchor{east}{\tikzphysics@component@physicsopenpipenodestate\tikzphysics@component@point{\cw/2}{0}}
 \anchor{west}{\tikzphysics@component@physicsopenpipenodestate\tikzphysics@component@point{-(\cw/2)}{0}}
 \anchor{north east}{\tikzphysics@component@physicsopenpipenodestate\tikzphysics@component@point{\cw/2}{\ch/2}}
 \anchor{north west}{\tikzphysics@component@physicsopenpipenodestate\tikzphysics@component@point{-(\cw/2)}{\ch/2}}
 \anchor{south east}{\tikzphysics@component@physicsopenpipenodestate\tikzphysics@component@point{\cw/2}{-(\ch/2)}}
 \anchor{south west}{\tikzphysics@component@physicsopenpipenodestate\tikzphysics@component@point{-(\cw/2)}{-(\ch/2)}}
 \anchor{start}{\tikzphysics@component@physicsopenpipenodestate\tikzphysics@component@point{-\cw/2}{0}}
 \anchor{end}{\tikzphysics@component@physicsopenpipenodestate\tikzphysics@component@point{\cw/2}{0}}
 \anchor{text}{\pgf@x=-.5\wd\pgfnodeparttextbox\pgf@y=-.5\ht\pgfnodeparttextbox\advance\pgf@y by.5\dp\pgfnodeparttextbox}
 \tikzphysics@declarepercentanchors{axis}{\tikzphysics@component@physicsopenpipenodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(0)*1cm}
 \tikzphysics@declarepercentanchors{curve}{\tikzphysics@component@physicsopenpipenodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(\camp*cos(180*\cn*\tikzphysics@percent))*1cm}
 \tikzphysics@declarepercentanchors{top}{\tikzphysics@component@physicsopenpipenodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(\ch/2)*1cm}
 \tikzphysics@declarepercentanchors{bottom}{\tikzphysics@component@physicsopenpipenodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(-\ch/2)*1cm}
\foreach \ci in {0,...,100}{\expandafter\tikzphysics@component@physicsopenpipenodeordinal\expandafter{\ci}}
 \anchorborder{\edef\cpx{\the\pgf@x}\edef\cpy{\the\pgf@y}\tikzphysics@component@physicsopenpipenodestate\pgfpointborderrectangle{\pgfpoint{\cpx}{\cpy}}{\tikzphysics@component@point{\cw/2}{\ch/2}}}
 \backgroundpath{\tikzphysics@component@physicsopenpipenodestate
\pgfmathtruncatemacro\ccount{ceil(max(100,24*\cn))}
\def\cu{0}\tikzphysics@component@move{(-.5+\cu)*\cw}{\camp*cos(180*\cn*\cu)}
\foreach \ci in {1,...,\ccount}{\pgfmathsetmacro\cu{\ci/\ccount}\tikzphysics@component@line{(-.5+\cu)*\cw}{\camp*cos(180*\cn*\cu)}
}
\tikzphysics@component@move{-\cw/2}{-\ch/2}
\tikzphysics@component@line{\cw/2}{-\ch/2}
\tikzphysics@component@move{-\cw/2}{\ch/2}
\tikzphysics@component@line{\cw/2}{\ch/2}
 }
}
\tikzphysics@declarehook{open pipe}
\tikzphysics@registerdisplayname{physicsopenpipenode}{open pipe}
\tikzphysics@registeranchors{physicsopenpipenode}{center,north,south,east,west,start,end}
\tikzphysics@registerfamilies{physicsopenpipenode}{axis,curve,top,bottom}
\tikzphysics@registerkeys{physicsopenpipenode}{pipe length,pipe width,pipe mode}
\tikzphysics@registerkeydefaults{physicsopenpipenode}{pipe length/4cm,pipe width/.8cm,pipe mode/1}
\tikzset{physicsopenpipenode/.style={shape=physicsopenpipenode,physics logical shape=physicsopenpipenode,anchor=center,draw=black,fill=none,inner sep=0pt,outer sep=0pt,physics debug setup,every physics object,every open pipe},open pipe/.style={physicsopenpipenode}}
\def\tikzphysics@component@physicsclosedpipenodeordinal#1{%
 \anchor{node-#1}{\tikzphysics@component@physicsclosedpipenodestate\tikzphysics@component@check{#1<=(\cn-1)}{closed pipe node index out of range}\tikzphysics@component@point{(-.5+2*#1/(2*\cn-1))*\cw}{0}}%
 \anchor{antinode-#1}{\tikzphysics@component@physicsclosedpipenodestate\tikzphysics@component@check{#1<=(\cn-1)}{closed pipe antinode index out of range}\tikzphysics@component@point{(-.5+(2*#1+1)/(2*\cn-1))*\cw}{0}}%
}
%% closed pipe
\tikzset{
 pipe length/.initial=4cm,
 physics pipe length/.style={pipe length={#1}},
 pipe width/.initial=.8cm,
 physics pipe width/.style={pipe width={#1}},
 pipe mode/.initial=1,
 physics pipe mode/.style={pipe mode={#1}},
}
\pgfdeclareshape{physicsclosedpipenode}{
 \savedmacro\tikzphysics@component@physicsclosedpipenodestate{%
  \tikzphysics@component@length\cw{pipe length}
  \tikzphysics@component@length\ch{pipe width}
  \pgfmathsetmacro\cn{\pgfkeysvalueof{/tikz/pipe mode}}
\tikzphysics@component@check{\cw>0 && \ch>0 && \cn==int(\cn) && \cn>=1 && \cn<=50}{Pipe dimensions must be positive and mode an integer from 1 to 50}
\pgfmathsetmacro\camp{.35*\ch}
  \addtosavedmacro\cw
  \addtosavedmacro\ch
  \addtosavedmacro\cn
  \addtosavedmacro\camp
 }
 \anchor{center}{\tikzphysics@component@physicsclosedpipenodestate\tikzphysics@component@point{0}{0}}
 \anchor{north}{\tikzphysics@component@physicsclosedpipenodestate\tikzphysics@component@point{0}{\ch/2}}
 \anchor{south}{\tikzphysics@component@physicsclosedpipenodestate\tikzphysics@component@point{0}{-(\ch/2)}}
 \anchor{east}{\tikzphysics@component@physicsclosedpipenodestate\tikzphysics@component@point{\cw/2}{0}}
 \anchor{west}{\tikzphysics@component@physicsclosedpipenodestate\tikzphysics@component@point{-(\cw/2)}{0}}
 \anchor{north east}{\tikzphysics@component@physicsclosedpipenodestate\tikzphysics@component@point{\cw/2}{\ch/2}}
 \anchor{north west}{\tikzphysics@component@physicsclosedpipenodestate\tikzphysics@component@point{-(\cw/2)}{\ch/2}}
 \anchor{south east}{\tikzphysics@component@physicsclosedpipenodestate\tikzphysics@component@point{\cw/2}{-(\ch/2)}}
 \anchor{south west}{\tikzphysics@component@physicsclosedpipenodestate\tikzphysics@component@point{-(\cw/2)}{-(\ch/2)}}
 \anchor{start}{\tikzphysics@component@physicsclosedpipenodestate\tikzphysics@component@point{-\cw/2}{0}}
 \anchor{end}{\tikzphysics@component@physicsclosedpipenodestate\tikzphysics@component@point{\cw/2}{0}}
 \anchor{text}{\pgf@x=-.5\wd\pgfnodeparttextbox\pgf@y=-.5\ht\pgfnodeparttextbox\advance\pgf@y by.5\dp\pgfnodeparttextbox}
 \tikzphysics@declarepercentanchors{axis}{\tikzphysics@component@physicsclosedpipenodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(0)*1cm}
 \tikzphysics@declarepercentanchors{curve}{\tikzphysics@component@physicsclosedpipenodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(\camp*sin(90*(2*\cn-1)*\tikzphysics@percent))*1cm}
 \tikzphysics@declarepercentanchors{top}{\tikzphysics@component@physicsclosedpipenodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(\ch/2)*1cm}
 \tikzphysics@declarepercentanchors{bottom}{\tikzphysics@component@physicsclosedpipenodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(-\ch/2)*1cm}
\foreach \ci in {0,...,100}{\expandafter\tikzphysics@component@physicsclosedpipenodeordinal\expandafter{\ci}}
 \anchorborder{\edef\cpx{\the\pgf@x}\edef\cpy{\the\pgf@y}\tikzphysics@component@physicsclosedpipenodestate\pgfpointborderrectangle{\pgfpoint{\cpx}{\cpy}}{\tikzphysics@component@point{\cw/2}{\ch/2}}}
 \backgroundpath{\tikzphysics@component@physicsclosedpipenodestate
\pgfmathtruncatemacro\ccount{ceil(max(100,24*\cn))}
\def\cu{0}\tikzphysics@component@move{(-.5+\cu)*\cw}{\camp*sin(90*(2*\cn-1)*\cu)}
\foreach \ci in {1,...,\ccount}{\pgfmathsetmacro\cu{\ci/\ccount}\tikzphysics@component@line{(-.5+\cu)*\cw}{\camp*sin(90*(2*\cn-1)*\cu)}
}
\tikzphysics@component@move{-\cw/2}{-\ch/2}
\tikzphysics@component@line{\cw/2}{-\ch/2}
\tikzphysics@component@move{-\cw/2}{\ch/2}
\tikzphysics@component@line{\cw/2}{\ch/2}
\tikzphysics@component@move{-\cw/2}{-\ch/2}
\tikzphysics@component@line{-\cw/2}{\ch/2}
 }
}
\tikzphysics@declarehook{closed pipe}
\tikzphysics@registerdisplayname{physicsclosedpipenode}{closed pipe}
\tikzphysics@registeranchors{physicsclosedpipenode}{center,north,south,east,west,start,end}
\tikzphysics@registerfamilies{physicsclosedpipenode}{axis,curve,top,bottom}
\tikzphysics@registerkeys{physicsclosedpipenode}{pipe length,pipe width,pipe mode}
\tikzphysics@registerkeydefaults{physicsclosedpipenode}{pipe length/4cm,pipe width/.8cm,pipe mode/1}
\tikzset{physicsclosedpipenode/.style={shape=physicsclosedpipenode,physics logical shape=physicsclosedpipenode,anchor=center,draw=black,fill=none,inner sep=0pt,outer sep=0pt,physics debug setup,every physics object,every closed pipe},closed pipe/.style={physicsclosedpipenode}}
%% END NATIVE COMPONENT EXTENSIONS
\makeatother
\endinput
