diff options
author | Karl Berry <karl@freefriends.org> | 2014-04-16 21:46:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-04-16 21:46:17 +0000 |
commit | f96c6f3b55f5a86a5f9dd5dbfe6422c72d1b4b8e (patch) | |
tree | beffc750cc66d32f5364d9cab5c4f9ee4e9a39cc /Master/texmf-dist/tex | |
parent | 408cfedcfd5475001e9dd7bd27370fbcfd72f50b (diff) |
pst-circ (16apr14)
git-svn-id: svn://tug.org/texlive/trunk@33466 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex | 172 |
1 files changed, 163 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex b/Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex index f0d6b52e3c1..d5f9905cd4d 100644 --- a/Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex +++ b/Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex @@ -1,4 +1,4 @@ -%% $Id: pst-circ.tex 904 2014-04-01 08:46:07Z herbert $ +%% $Id: pst-circ.tex 906 2014-04-15 19:37:50Z herbert $ %% This is file `pst-circ.tex' %% %% IMPORTANT NOTICE: @@ -26,8 +26,8 @@ \ifx\PSTXKeyLoaded\endinput \else\input pst-xkey \fi \ifx\PSTMultidoLoaded\endinput\else\input multido.tex\fi % -\def\fileversion{2.06} -\def\filedate{2014/04/01} +\def\fileversion{2.07} +\def\filedate{2014/04/15} \message{`pst-circ' v\fileversion (hv)} % \edef\PstAtCode{\the\catcode`\@} @@ -931,7 +931,6 @@ \expandafter\def\csname pst@#2\endcsname[##1](##2)(##3)##4{{% \pst@draw@dipole{#1,##1}{##2}{##3}{##4}{\@nameuse{pst@draw@#2}}}\ignorespaces}% % - % \@namedef{pst@multidipole@#2}{\@ifnextchar[{\@nameuse{pst@multidipole@#2@}}{\@nameuse{pst@multidipole@#2@}[]}} \expandafter\def\csname pst@multidipole@#2@\endcsname[##1]##2{% \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{##2}% @@ -949,9 +948,7 @@ {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname} }% \pst@multidipole@% -} - }% -\ignorespaces}% +}}\ignorespaces}% % \newCircDipole{RFLine} \newCircDipole{resistor} @@ -2725,7 +2722,6 @@ \def\mixer{\pst@object{mixer}} \def\mixer@i(#1)(#2)(#3)#4#5{% \addbefore@par{dimen=middle}% - \begin@ClosedObj \pst@getcoor{#1}\pst@tempa \pst@getcoor{#2}\pst@tempb \pst@getcoor{#3}\pst@tempc @@ -2739,7 +2735,9 @@ /XC X1 X2 add 2 div def /YC Y2 def XC YC){C@} + \begingroup\use@par \rput(C@){\pst@draw@mixer{#3}{#4}{#5}} + \endgroup \ifx\psk@Tinput\pst@Tinput@left% \ifPst@inputarrow \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=180]{#1}{Tport@left} @@ -2757,11 +2755,11 @@ \fi \pcline[linestyle=none](#1)(#2)% for the endarrows \pcline[linestyle=none](#2)(#3)% for the endarrows - \end@ClosedObj \ignorespaces% } \def\pst@draw@mixer#1#2#3{% \pscircle[#3,linewidth=1.5\pslinewidth](0,0){0.5} + \let\psk@fillstyle\psfs@none \psline[linewidth=1.5\pslinewidth](-0.3535,-0.3535)(0.3535,0.3535) \psline[linewidth=1.5\pslinewidth](-0.3535,0.3535)(0.3535,-0.3535) \pnode(-0.5,0){Tport@left}% @@ -5198,6 +5196,162 @@ \fi }} % +% PHOTOVOLTAIC CELL +% +% \cell +% +\def\cell{\@ifnextchar[{\pst@cell}{\pst@cell[]}} +\def\pst@cell[#1](#2)(#3)#4{{% + \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@cell} +% \pst@getcoor{#2}\pst@tempa +% \pst@getcoor{#3}\pst@tempb + \ignorespaces} +% +\def\pst@draw@cell{{% + \pscircle(0.1,0){0.5} + \psline[linewidth=2.5\pslinewidth](-0.1,-0.2)(-0.1, 0.2) + \psline[linewidth=2\pslinewidth](0.1,-0.4)(0.1, 0.4) + \psline[arrows=->](0.9,1)(0.5,0.6) + \psline[arrows=->](0.6,1)(0.2,0.6) + \wire(-0.6,0)(-0.1,0) + \wire(0.6,0)(0.1,0) + \pnode(-0.6,0){dipole@1} + \pnode(0.6,0){dipole@2}% +}\ignorespaces}% +% +% \splitter +% +\def\splitter{\pst@object{splitter}} +\def\splitter@i(#1)(#2)(#3)#4#5{% + \addbefore@par{dimen=middle}% + \pst@getcoor{#1}\pst@tempa + \pst@getcoor{#2}\pst@tempb + \pst@getcoor{#3}\pst@tempc + \pnode(!% + \pst@tempa /Y1 exch \pst@number\psyunit div def + /X1 exch \pst@number\psxunit div def + \pst@tempb /Y2 exch \pst@number\psyunit div def + /X2 exch \pst@number\psxunit div def + \pst@tempc /Y3 exch \pst@number\psyunit div def + /X3 exch \pst@number\psxunit div def + /XC X1 X2 add 2 div def + /YC Y2 def + XC YC){C@} + \begingroup\use@par + \rput(C@){\pst@draw@splitter{#3}{#4}{#5}} + \ifx\psk@Tinput\pst@Tinput@left% + \ifPst@inputarrow + \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=180]{#1}{Tport@left} + \else + \ncangle[arrows=-,arm=0.5,angleB=0]{#1}{Tport@left} + \fi + \ncangle[arrows=-, arm=0.5,angleB=0]{#2}{Tport@right} + \else + \ifPst@inputarrow + \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=0]{#2}{Tport@right} + \else + \ncangle[arrows=-,arm=0.5,angleB=180]{Tport@right}{#2} + \fi + \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left} + \fi + \endgroup + \pcline[linestyle=none](#1)(#2)% for the endarrows + \pcline[linestyle=none](#2)(#3)% for the endarrows + \ignorespaces% +} +\def\pst@draw@splitter#1#2#3{% + \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) + \let\psk@fillstyle\psfs@none + %% Diagonal line within the square + \ifx\psk@Tinput\pst@Tinput@left% + \ifx\psk@tripole@style\pst@tripole@style@top% + \psline[linewidth=1.5\pslinewidth](-0.5,0.5)(0.5,-0.5) + \else + \psline[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) + \fi + \else + \ifx\psk@tripole@style\pst@tripole@style@top% + \psline[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5) + \else + \psline[linewidth=1.5\pslinewidth](-0.5,0.5)(0.5,-0.5) + \fi + \fi + \pnodes(-0.5,0){Tport@left}(0.5,0){Tport@right}% + \ifx\psk@tripole@style\pst@tripole@style@top% + \pcline[offset=-\psk@label@offset,linestyle=none](Tport@left)(Tport@right)\ncput{#2}% + \pnode(0,0.5){Tport@center} + \ncangle[arrows=-,arm=0.5,angleB=90]{#1}{Tport@center} + \else + \pcline[offset=\psk@label@offset,linestyle=none](Tport@left)(Tport@right)\ncput{#2}% + \pnode(0,-0.5){Tport@center} + \ncangle[arrows=-,arm=0.5,angleB=270]{#1}{Tport@center} + \fi% +} +% +%%% Attenuator %%% +% +\newCircDipole{attenuator} +\def\pst@draw@attenuator{% + \pnode(-0.433,0){dipole@1} + \pnode(0.433,0){dipole@2} + \psline[fillstyle=none, arrowinset=0](-0.5,0)(0.5,0) + \ifx\psk@Dinput\pst@Dinput@right + \psline[linewidth=1.5\pslinewidth,fillstyle=none](-0.10825,0.433)(0.10825,0.2165)(-0.10825,0)(0.10825,-0.2165)(-0.10825,-0.433) + \else + \psline[linewidth=1.5\pslinewidth, fillstyle=none](0.10825,0.433)(-0.10825,0.2165)(0.10825,0)(-0.10825,-0.2165)(0.10825,-0.433) + \fi +} +% +% THIS CAN BE SET AS AN OPTION OF THE OSCILLATOR... +% IT'S UP TO YOU... +% +%%% Modulator +% +\newCircDipole{modulator} +\def\pst@draw@modulator{% + \pnode(-0.5,0){dipole@1} + \pnode(0.5,0){dipole@2} + \pscircle[linewidth=1.5\pslinewidth](0,0){0.5} + \ifx\psk@Dinput\pst@Dinput@right + \psline[linewidth=1.5\pslinewidth]{cc-cc}(-0.3,-0.1)(0,0.2)(0,-0.1)(0.3,-0.1) + \else + \psline[linewidth=1.5\pslinewidth]{cc-cc}(-0.3,-0.1)(0,-0.1)(0,0.2)(0.3,-0.1) + \fi +} +% +%%% Plug %%% +% +\def\plug{\@ifnextchar[{\pst@plug}{\pst@plug[]}} +\def\pst@plug[#1]{% + \@ifnextchar({\pst@plugi[#1]{0}}{\pst@plugi[#1]}% +} +\def\pst@plugi[#1]#2(#3){{% + \psset{#1}% + \rput{#2}(#3){% + \psline[linewidth=1.5\pslinewidth](0,0)(0,-0.3)(1.2,-0.3)(1.5,0)(1.2,0.3)(0,0.3)(0,0) + }}% + \ignorespaces% +} +% +% \ampsinu +% +% THIS CAN ALSO BE SET AS AN OPTION FOR THE AMPLIFIER... +% IT'S UP TO YOU +\newCircDipole{ampsinu} +\def\pst@draw@ampsinu{% + \pnode(-0.433,0){dipole@1} + \pnode(0.433,0){dipole@2} + \ifx\psk@Dinput\pst@Dinput@right + \pstriangle[gangle=90,linewidth=1.5\pslinewidth](0.433,0)(1,0.866) + \pscurve[fillstyle=none,linewidth=1\pslinewidth](0.071625,-0.20)(0.025,-0.125)(0.061625,-0.05)% + (0.15,0.025)(0.238375,0.1)(0.275,0.175)(0.238375,0.25) + \else + \pstriangle[gangle=-90,linewidth=1.5\pslinewidth](-0.433,0)(1,0.866) + \pscurve[fillstyle=none,linewidth=1\pslinewidth](-0.071625,-0.20)(-0.025,-0.125)(-0.061625,-0.05)% + (-0.15,0.025)(-0.238375,0.1)(-0.275,0.175)(-0.238375,0.25) + \fi +} +% \catcode`\@=\PstAtCode\relax % \endinput
\ No newline at end of file |