%%%%%%%%%%%special symbols%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%basic three-phase circuits%%%%%%%%%%%%%%%
%%%%%%%%delta load, star load, star source%%%%%%%%%%%%%%%%%%%%
%%%%%%%two ports, closed loop, unistor %%%%%%%%%%%%%%%%%%%
\newcommand{\deltaload }{
\put(0,0){
\multiput(0,0)(10,17.5){2}{\line(3,5){5}}
\multiput(6.8,7.2)(5.3,9){2}{\line(-5,3){4}}
\multiput(6.8,7.2)(-4,2.4){2}{\line(3,5){5.3}}
}
\put(30,0){
\multiput(0,0)(-10,17.5){2}{\line(-3,5){5}}
\multiput(-6.8,7.2)(-5.3,9){2}{\line(5,3){4}}
\multiput(-6.8,7.2)(4,2.4){2}{\line(-3,5){5.3}}
}
\put(0,0){\hrez{0}}
}
\newcommand{\starload }{
\put(0,0){
\multiput(0,0)(13,9.1){2}{\line(3,2){4}}
\multiput(5.4,1)(9,6.1){2}{\line(-2,3){2.5}}
\multiput(5.4,1)(-2.6,3.9){2}{\line(3,2){9}}
}
\put(34,0){
\multiput(0,0)(-13,9.1){2}{\line(-3,2){4}}
\multiput(-5.4,1)(-9,6.1){2}{\line(2,3){2.5}}
\multiput(-5.4,1)(2.6,3.9){2}{\line(-3,2){9}}
}
\put(17,11.5){\vvrez{0}}
\put(17,11.5){\node}
}
\newcommand{\starsource }{
\put(0,0){
\put(0,0){\line(3,2){17}}
\put(7,4.9){\circle{9}}
}
\put(34,0){
\put(0,0){\line(-3,2){17}}
\put(-7,4.9){\circle{9}}
}
\put(17,11.5){\vwire{20}}
\put(17,23){\circle{9}}
\put(17,11.5){\node}
}
% network a%%
\newcommand{\neta}{
\multiput(0.5,0)(0,20){2}{\pin}
\multiput(1,0)(0,20){2}{\hhrez{0}}
\multiput(21.5,0)(0,20){2}{\pin}
}
% network b%%
\newcommand{\netb}{
\multiput(0.5,0)(0,20){2}{\pin}
\put(1,20){\hhrez{0}}
\put(1,0){\hwire{20}}
\multiput(21.5,0)(0,20){2}{\pin}
}
% network c%%
\newcommand{\netc}{
\multiput(0.5,0)(0,20){2}{\pin}
\multiput(1,0)(0,20){2}{\hhrez{0}}
\put(21,0){\line(1,3){6.4}}
\put(21,20){\line(1,-3){6.4}}
\multiput(27.5,0)(0,20){2}{\pin}
}
\newcommand{\netd}{
\multiput(0.5,0)(0,20){2}{\pin}
\multiput(1,0)(0,20){2}{\hwire{5}}
\multiput(6,0)(10,0){2}{\vvrez{0}}
\multiput(16,0)(0,20){2}{\hwire{5}}
\multiput(21.5,0)(0,20){2}{\pin}
}
% network e%%
\newcommand{\nete}{
\multiput(0.5,0)(0,20){2}{\pin}
\put(1,20){\hhrez{0}}
\put(1,0){\line(1,0){20,0}}
\put(21,0){\line(1,3){6.4}}
\put(21,20){\line(1,-3){6.4}}
\multiput(27.5,0)(0,20){2}{\pin}
}
% transformer%%
\newcommand{\tran}{
\multiput(0.5,0)(0,20){2}{\pin}
\multiput(1,0)(0,20){2}{\line(1,0){4}}
\put(5,0){\vvind{R}{0}}
\put(10,0){\vvind{L}{0}}
\multiput(10,0)(0,20){2}{\line(1,0){4}}
\multiput(14.8,0)(0,20){2}{\pin}
}
%I network%%
\newcommand{\inet}{
\multiput(0.5,0)(0,20){2}{\pin}
\put(11.5,0){\vvrez{0}}
\multiput(11.5,0)(0,20){2}{\node}
\multiput(1,0)(0,20){2}{\hwire{20}}
\multiput(21.5,0)(0,20){2}{\pin}
}
%Gamma network%%
\newcommand{\gneta}{
\multiput(0.5,0)(0,20){2}{\pin}
\multiput(1,0)(0,20){2}{\hwire{5}}
\put(6.5,20){\hhrez{0}}
\put(6.5,0){\vvrez{0}}
\multiput(6.5,0)(0,20){2}{\node}
\put(6.5,0){\hwire{20}}
\multiput(27,0)(0,20){2}{\pin}
}
\newcommand{\gnetb}{
\multiput(0.5,0)(0,20){2}{\pin}
\put(21,20){\hwire{5.5}}
\put(1,20){\hhrez{0}}
\put(21,0){\vvrez{0}}
\multiput(21,0)(0,20){2}{\node}
\put(1,0){\hwire{25.5}}
\multiput(27,0)(0,20){2}{\pin}
}
%L network%%
\newcommand{\lneta}{
\multiput(0.5,0)(0,20){2}{\pin}
\multiput(1,0)(0,20){2}{\hwire{5}}
\put(6.5,0){\hhrez{0}}
\put(6.5,0){\vvrez{0}}
\multiput(6.5,0)(0,20){2}{\node}
\put(6.5,20){\hwire{20}}
\multiput(27,0)(0,20){2}{\pin}
}
\newcommand{\lnetb}{
\multiput(0.5,0)(0,20){2}{\pin}
\multiput(21,0)(0,20){2}{\hwire{5}}
\put(1,0){\hhrez{0}}
\put(21,0){\vvrez{0}}
\multiput(21,0)(0,20){2}{\node}
\put(1,20){\hwire{20}}
\multiput(27,0)(0,20){2}{\pin}
}
%Pi network%%%%
\newcommand{\pineta}{
\multiput(0.5,0)(0,20){2}{\pin}
\put(1,20){\hrez{0}}
\multiput(6,0)(20,0){2}{\vvrez{0}}
\multiput(6,0)(0,20){2}{\node}
\multiput(26,0)(0,20){2}{\node}
\multiput(31.5,0)(0,20){2}{\pin}
\put(1,0){\hwire{30}}
}
\newcommand{\pinetb}{
\multiput(0.5,0)(0,20){2}{\pin}
\put(1,0){\hrez{0}}
\multiput(6,0)(20,0){2}{\vvrez{0}}
\multiput(6,0)(0,20){2}{\node}
\multiput(26,0)(0,20){2}{\node}
\multiput(31.5,0)(0,20){2}{\pin}
\put(1,20){\hwire{30}}
}
%T network%%%%%
\newcommand{\tneta}{
\multiput(0.5,0)(0,20){2}{\pin}
\multiput(1,20)(20,0){2}{\hhrez{0}}
\put(21,0){\vvrez{0}}
\multiput(21,0)(0,20){2}{\node}
\multiput(41.5,0)(0,20){2}{\pin}
\put(1,0){\hwire{40}}
}
\newcommand{\tnetb}{
\multiput(0.5,0)(0,20){2}{\pin}
\multiput(1,0)(20,0){2}{\hhrez{0}}
\put(21,0){\vvrez{0}}
\multiput(21,0)(0,20){2}{\node}
\multiput(41.5,0)(0,20){2}{\pin}
\put(1,20){\hwire{40}}
}
%lattice network%%%%%
\newcommand{\xnet}[1]{
\ifnum#1=1
\multiput(0.5,0)(41.5,0){2}{\pin}
\multiput(6,0)(0,35){2}{\hrez{0}}
\put(18.5,15){\drez{U}{0}}
\put(3.5,0){\dwire{U}{15}}
\put(3.5,35){\drez{D}{0}}
\put(23.5,15){\dwire{D}{15}}
\multiput(0.5,35)(41.5,0){2}{\pin}
\multiput(3.5,0)(35,0){2}{\node}
\multiput(3.5,35)(35,0){2}{\node}
\multiput(1.5,0)(34.5,0){2}{\hwire{5}}
\multiput(1.5,35)(34.5,0){2}{\hwire{5}}
\fi
\ifnum#1=2
\multiput(0.5,0)(41.5,0){2}{\pin}
\put(6,35){\hrez{0}}
\multiput(8,0)(8,0){4}{\hwire{6}}
\multiput(3.5,0)(5,5){7}{\dwire{U}{4}}
\put(3.5,35){\drez{D}{0}}
\put(23.5,15){\dwire{D}{15}}
\multiput(0.5,35)(41.5,0){2}{\pin}
\multiput(3.5,0)(35,0){2}{\node}
\multiput(3.5,35)(35,0){2}{\node}
\multiput(1.5,0)(34.5,0){2}{\hwire{5}}
\multiput(1.5,35)(34.5,0){2}{\hwire{5}}
\fi
}
%bridget H network%%%
\newcommand{\bhnet}{
\multiput(0.5,0)(0,20){2}{\pin}
\multiput(1,20)(20,0){2}{\hhrez{0}}
\put(21,0){\vvrez{0}}
\multiput(21,0)(0,20){2}{\node}
\multiput(41.5,0)(0,20){2}{\pin}
\multiput(1,0)(20,0){2}{\hhrez{0}}
\multiput(11,-10)(0,40){2}{\hhrez{0}}
\multiput(3.5,0)(35,0){2}{\node}
\multiput(3.5,20)(35,0){2}{\node}
\multiput(3.5,20)(35,0){2}{\vwire{10}}
\multiput(3.5,-10)(35,0){2}{\vwire{10}}
\multiput(3.5,30)(27.5,0){2}{\hwire{7.5}}
\multiput(3.5,-10)(27.5,0){2}{\hwire{7.5}}
}
%H network%%%%
\newcommand{\hnet}{
\multiput(0.5,0)(0,20){2}{\pin}
\multiput(1,20)(20,0){2}{\hhrez{0}}
\put(21,0){\vvrez{0}}
\multiput(21,0)(0,20){2}{\node}
\multiput(41.5,0)(0,20){2}{\pin}
\multiput(1,0)(20,0){2}{\hhrez{0}}
}
%bridget T network%%%
\newcommand{\btnet}{
\multiput(0.5,0)(0,20){2}{\pin}
\multiput(1,20)(20,0){2}{\hhrez{0}}
\put(21,0){\vvrez{0}}
\multiput(21,0)(0,20){2}{\node}
\multiput(41.5,0)(0,20){2}{\pin}
\put(1,0){\hwire{40}}
\put(11,30){\hhrez{0}}
\multiput(3.5,20)(35,0){2}{\node}
\multiput(3.5,20)(35,0){2}{\vwire{10}}
\multiput(3.5,30)(27.5,0){2}{\hwire{7.5}}
}
%twin T network%%%
\newcommand{\ttnet}{
\multiput(0.5,0)(0,20){2}{\pin}
\multiput(6,30)(24,0){2}{\hhrez{0}}
\multiput(6,20)(24,0){2}{\hhrez{0}}
\multiput(24,0)(8,0){2}{\vvrez{0}}
\multiput(24,0)(0,20){2}{\node}
\multiput(32,0)(0,30){2}{\node}
\multiput(6,20)(44,0){2}{\node}
\multiput(55.5,0)(0,20){2}{\pin}
\put(1,0){\hwire{54}}
\multiput(1,20)(49,0){2}{\hwire{5}}
\multiput(26,20)(0,10){2}{\hwire{4}}
\multiput(6,20)(44,0){2}{\vwire{10}}
\put(32,20){\vwire{10}}
}
%gyrator%%%%
\newcommand{\gyrator}{
\multiput(0.5,0)(0,20){2}{\pin}
\multiput(1,0)(0,20){2}{\hwire{5}}
\multiput(6,0)(8,0){2}{\vwire{20}}
\put(6,10){\oval(5,5)[r]}
\put(14,10){\oval(5,5)[l]}
\multiput(14,0)(0,20){2}{\hwire{5}}
\multiput(19.5,0)(0,20){2}{\pin}
}
%closed loop in signal flow graph%%%
\newcommand{\flow}[1]{
\ifx#1U
\put(0,0.5){\line(-1,1){4} }
\put(0,0.5){\line(1,1){4} }
\multiput(-4.1,4.5)(8.1,0){2}{\line(0,1){6} }
\put(-4,10.5){\line(1,0){8} }
\fi
\ifx#1D
\put(0,-0.5){\line(-1,-1){4} }
\put(0,-0.5){\line(1,-1){4} }
\multiput(-4.1,-4.5)(8.1,0){2}{\line(0,-1){6} }
\put(-4,-10.5){\line(1,0){8} }
\fi
}
%unistor%%%%%%
\newcommand{\unistor}[1]{
\ifx#1R                          %%right oriented
\put(0,0){
\put(0,0){\line(1,0){4.1} }
\put(4,-0.8){$\triangleright$ }
\put(5.5,0){\line(1,0){4.5} } }
\fi
\ifx#1L                          %%left oriented
\put(0,0){
\put(0,0){\line(1,0){4.1} }
\put(3.85,-0.8){$\triangleleft$ }
\put(5.5,0){\line(1,0){4.5} } }
\fi
\ifx#1U                           %%up oriented
\put(0,0){
\put(0,0){\line(0,1){4.1} }
\put(-1.5,4){$\bigtriangleup$ }
\put(0,6.4){\line(0,1){3.6} } }
\fi
\ifx#1D                            %%down oriented
\put(0,0){
\put(0,0){\line(0,1){4.1} }
\put(-1.5,4.6){$\bigtriangledown$ }
\put(0,6.4){\line(0,1){3.6} } }
\fi
}
%%%%three phase symbol
\newcommand{\threephase}[1]{
  \ifx#1D
\put(0,0){\line(1,2){2}}     %delta
\put(4,0){\line(-1,2){2}}
\put(0,0){\line(1,0){4}}
   \else \ifx#1S
\put(0,0){\line(-2,1){4}}     %starr
\put(0,0){\line(2,1){4}}
\put(0,0){\line(0,-1){4.75}}
    \fi \fi
}
%%%%graetz rectifier symbol
\newcommand{\rgraetz}{
\put(0,0){\line(1,0){4}}
\put(4,0){\line(1,1){6}}
\put(4,0){\line(1,-1){6}}
\put(16,0){\line(-1,1){6}}
\put(16,0){\line(-1,-1){6}}
\put(16,0){\line(1,0){4}}
\put(10,6){\line(0,1){4}}
\put(10,-6){\line(0,-1){4}}
\put(6,0){\line(1,0){8}}
\put(8,2){\line(0,-1){4}}
\put(12,0){\line(-2,1){4}}
\put(12,0){\line(-2,-1){4}}
\put(12,2){\line(0,-1){4}}
}
%%%%single phase transformer symbol
\newcommand{\trafo}[1]{
  \ifx#1H
\put(0,0){\line(1,0){3.5}}
\put(15,0){\line(-1,0){4}}
\multiput(6,0)(2.5,0){2}{\circle{5}}
   \else  \ifx#1V
\put(0,0){\line(0,1){3.5}}
\put(0,15){\line(0,-1){4}}
\multiput(0,6)(0,2,5){2}{\circle{5}}
    \fi \fi
}
%%%%engine
\newcommand{\engine}[1]{
\put(0,0){\circle{10}}
\put(-1.5,1){$\rm M$}
  \ifnum#1=0
\put(-2,-2){\line(1,0){4}} %DC
  \else  \ifnum#1=1
\put(0,-3){$\sim$} %AC 1 phase
\put(-2,-3){$1$}
   \else \ifnum#1=3
\put(0,-3){$\sim$} %AC 3 phase
\put(-2,-3){$3$}
   \else \ifnum#1=4
\put(-6,-3){\line(1,0){12}} %linear
   \else \ifnum#1=5
\put(-2,-1){\line(1,0){4}} %stepping
\put(-2,-1){\line(0,-1){2}}
\put(2,-1){\line(0,1){2}}
    \fi \fi \fi \fi \fi
}
%%%%power generator
\newcommand{\gener}[1]{
\put(0,0){\circle{10}}
\put(-1.5,1){$\rm G$}
  \ifnum#1=0
\put(-2,-2){\line(1,0){4}} %DC
  \else  \ifnum#1=1
\put(0,-3){$\sim$} %AC 1 phase
\put(-2,-3){$1$}
   \else \ifnum#1=3
\put(0,-3){$\sim$} %AC 3 phase
\put(-2,-3){$3$}
    \fi \fi \fi
}
\endinput
