diff options
author | Karl Berry <karl@freefriends.org> | 2010-01-16 23:40:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-01-16 23:40:29 +0000 |
commit | ae1e709b7a40dcb1e9f38161ff4c7ae17bc51b3a (patch) | |
tree | 33509329e37cf711df8bc369df2b808dcc2b0bc3 /Master | |
parent | 6b2af6c8872b046b9483c1d4d0f4486b75ec3386 (diff) |
pst-sigsys update (16jan10)
git-svn-id: svn://tug.org/texlive/trunk@16748 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-sigsys/Changes | 16 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-sigsys/README | 19 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-sigsys/pst-sigsys-doc.bib | 56 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-sigsys/pst-sigsys-doc.pdf | bin | 318173 -> 280754 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-sigsys/pst-sigsys-doc.tex | 1585 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-sigsys/pst-sigsys.tex | 541 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pst-sigsys/pst-sigsys.sty | 433 |
7 files changed, 1618 insertions, 1032 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-sigsys/Changes b/Master/texmf-dist/doc/generic/pst-sigsys/Changes index 10f672ab9f7..c8a04804ec7 100644 --- a/Master/texmf-dist/doc/generic/pst-sigsys/Changes +++ b/Master/texmf-dist/doc/generic/pst-sigsys/Changes @@ -1 +1,15 @@ -v 1.1 2009-04-01 - add pshtick, psvtick, pshTick, and psvTick
\ No newline at end of file +v 1.2 2010-01-15 - 1. Added macros \pstick, \psTick, \pssignal, \ldotsnode, \ncstar, + \psBraceUp, \psBraceDown, \psBraceLeft, and \psBraceRight. + 2. Added the keys gratioWh, gratioWv, gratioHh, and gratioHv. + 3. Added the style RoundCorners. + 4. Updated macros \pscircleop, \psframeop, \psldots, and \nclist. + 5. Removed all package options (notelegant and pstadd). + 6. Removed the global round-cornering settings. + 7. Removed macros \pshtick, \psvtick, \pshTick, \psvTick, + \RE, \IM, \sRE, and \sIM. + 8. Removed the styles BraceUp, BraceDown, BraceLeft, and BraceRight. + +v 1.1 2009-04-01 - 1. Added macros \pshtick, \psvtick, \pshTick, and \psvTick. + 2. Updated macros \psusampler and \psdsampler. + +v 1.0 2009-01-15 - The first version of the package.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/generic/pst-sigsys/README b/Master/texmf-dist/doc/generic/pst-sigsys/README index 237ea23b9bb..106afc320d4 100644 --- a/Master/texmf-dist/doc/generic/pst-sigsys/README +++ b/Master/texmf-dist/doc/generic/pst-sigsys/README @@ -1,17 +1,24 @@ -pst-sigsys package 2009/04/01 v1.1 +pst-sigsys package 2010/01/15 v1.2 ---------------------------------- -The pst-sigsys is a collection of useful macros for disciplines related to signal processing. It defines macros for plotting a sequence of numbers, drawing the pole-zero diagram of a system, shading the region of convergence, creating an adder or a multiplier node, placing a framed node at a given coordinate, creating an up-sampler or a down-sampler node, and connecting a list of nodes using any node-connecting macro. +This package is a collection of useful macros for disciplines related to signal processing. +It defines macros for plotting a sequence of numbers, drawing the pole-zero diagram of a +system, shading the region of convergence, creating an adder or a multiplier node, placing +a framed node at a given coordinate, creating an up-sampler or a down-sampler node, +sequentially connecting a list of nodes, and connecting a list of nodes to one node using +any node-connecting macro. -Copyright (C) 2009, by Farshid Delgosha <fdelgosha@gmail.com> +Copyright (C) 2010, by Farshid Delgosha <fdelgosha@gmail.com> CTAN: graphics/pstricks/contrib/pst-sigsys Files: * README - this file - * pst-sigsys.sty - the package - * pst-sigsys-doc.tex - the tex file of the package documentation + * Changes - change log + * pst-sigsys.sty - the package wrapper + * pst-sigsys.tex - the package main file + * pst-sigsys-doc.tex - the LaTeX file of the package documentation * pst-sigsys-doc.pdf - the pdf file of the package documentation - * pstricks.bib - some citations + * pst-sigsys-doc.bib - the documentation bibliography License: diff --git a/Master/texmf-dist/doc/generic/pst-sigsys/pst-sigsys-doc.bib b/Master/texmf-dist/doc/generic/pst-sigsys/pst-sigsys-doc.bib new file mode 100644 index 00000000000..a908354b250 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-sigsys/pst-sigsys-doc.bib @@ -0,0 +1,56 @@ +@MISC{xkeyval, + author = {Hendri Adriaens}, + title = {xkeyval package}, + howpublished = {\url{CTAN:/macros/latex/contrib/xkeyval}}, + year = {2004}, +} + + +@MANUAL{pstricks, + TITLE = {PSTricks - \texttt{PSTricks} macros for generic {\TeX}}, + author = {{Timothy Van} Zandt}, + year = {1993}, + note = {\url{http://www.tug.org/application/PSTricks}}, +} + + +@MANUAL{pstricks-add, + TITLE = {\texttt{pstricks-add}: Additionals Macros for pstricks}, + author = {Dominique Rodriguez and Herbert Vo\ss}, + year = {2008}, + note = {\url{CTAN:/graphics/pstricks/contrib/pstricks-add}}, +} + + +@MANUAL{pst-xkey, + TITLE = {pst-xkey package}, + author = {Hendri Adriaens}, + year = {2004}, + note = {\url{CTAN:/macros/latex/contrib/xkeyval/run/pst-xkey}}, +} + + +@MANUAL{pst-node, + TITLE = {pst-node package}, + author = {{Timothy Van} Zandt}, + year = {1999}, + note = {\url{CTAN:/graphics/pstricks/base/pst-node}}, +} + + +@MANUAL{pst-plot, + TITLE = {\texttt{pst-plot}: Plotting two dimensional functions and data}, + author = {{Timothy Van} Zandt}, + year = {1999}, + note = {\url{CTAN:graphics/pstricks/base/pst-plot}}, +} + + +@BOOK{Rotman:00, + AUTHOR = {J. J. Rotman}, + TITLE = {A First Course in Abstract Algebra}, + PUBLISHER = {Prentice Hall}, + YEAR = {2000}, + edition = {2nd}, + address = {NJ}, +} diff --git a/Master/texmf-dist/doc/generic/pst-sigsys/pst-sigsys-doc.pdf b/Master/texmf-dist/doc/generic/pst-sigsys/pst-sigsys-doc.pdf Binary files differindex ec9f9f3278b..be0f8ff5a54 100644 --- a/Master/texmf-dist/doc/generic/pst-sigsys/pst-sigsys-doc.pdf +++ b/Master/texmf-dist/doc/generic/pst-sigsys/pst-sigsys-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pst-sigsys/pst-sigsys-doc.tex b/Master/texmf-dist/doc/generic/pst-sigsys/pst-sigsys-doc.tex index 98d547a8a13..484b42aff24 100644 --- a/Master/texmf-dist/doc/generic/pst-sigsys/pst-sigsys-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-sigsys/pst-sigsys-doc.tex @@ -1,16 +1,17 @@ %%==================================== %% This is pst-sigsys documentation. %% Farshid Delgosha -%% 04/01/2009 +%% 01/15/2010 %%==================================== -\documentclass[10pt]{article} +\documentclass[11pt]{article} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \usepackage[cmex10]{amsmath} \usepackage{amssymb} \usepackage{array} +\usepackage{fancyhdr} \usepackage[bf,labelsep=period]{caption} \usepackage[margin=1in,dvips]{geometry} \usepackage{xspace} @@ -20,35 +21,100 @@ \usepackage[table]{xcolor} \usepackage{multido} \usepackage{xkeyval} -\usepackage[pstadd]{pst-sigsys} +\usepackage{pst-sigsys} \usepackage{pst-plot} \usepackage{pstricks-add} \usepackage{multicol} -\usepackage{showexpl} -\lstset{explpreset={numbers=left,numberstyle=\tiny,numbersep=.5em},width=7cm,% -basicstyle=\ttfamily\small,rframe=,frame=single,backgroundcolor=\color{orange!30}} -\definecolor{BrickRed}{RGB}{233,49,16} -\usepackage{hyperref} -\hypersetup{colorlinks,backref,pagebackref,breaklinks,linkcolor=BrickRed,dvips,% -bookmarksopen=true,bookmarksopenlevel=2,pdfpagelayout=SinglePage,pdfview=Fit,% -pdftitle={The pst-sigsys Package},pdfauthor={Farshid Delgosha}} +\usepackage{bera} + +%%=== showexpl ====================================================== +\usepackage{showexpl} +\lstset{% + explpreset={numbers=left,numberstyle=\tiny,numbersep=.5em},% + basicstyle=\ttfamily\small,% + rframe=,% + frame=single,% + backgroundcolor=\color{yellow!10},% + keywordstyle=\color{blue}% +} +%%=== end showexpl ================================================== + + +%%=== hyperref ====================================================== +\usepackage[pagebackref]{hyperref} +\hypersetup{% + colorlinks,backref,breaklinks,dvips,% + linkcolor=BrickRed,% + citecolor=TealBlue,% + urlcolor=ForestGreen!50!black,% + bookmarksopen=true,% + bookmarksopenlevel=2,% + pdfpagelayout=SinglePage,% + pdfview=Fit,% + pdftitle={The PST-SigSys Package},% + pdfauthor={Farshid Delgosha}% +} +%%=== end hyperref ================================================== \makeatletter -%=== some settings ================================================= +%%=== some settings ================================================= \setlength{\parskip}{.5\baselineskip} \def\tableofcontents{\@starttoc{toc}} -%=== end some settings ============================================= +\renewcommand\l@subsection{\@dottedtocline{2}{1.5em}{3.15em}} +\psset{gridcolor=gray,gridlabelcolor=gray} +%%=== end some settings ============================================= + + +%%=== headers ======================================================= +\fancyhf{} +\rhead{{\sffamily\bfseries\thepage}} +\lhead{\nouppercase{\leftmark}} +\renewcommand{\headrule}{\psline[linewidth=.4pt,linecolor=Tangerine](\textwidth,0)} +\pagestyle{fancy} +%%=== end headers =================================================== + + +%%=== colors ======================================================== +\definecolor{Salmon}{RGB}{178,51,51} +\definecolor{BrickRed}{RGB}{233,49,16} +\definecolor{TealBlue}{RGB}{16,83,165} +\definecolor{ForestGreen}{RGB}{0,153,0} +\definecolor{Tangerine}{RGB}{244,176,108} +%%=== end colors ==================================================== + + +%%=== maketitle ===================================================== +\def\maketitle{% +\begin{center} +\parindent\z@ +{\Large\@title} \\[.5\baselineskip] +{(version \pstsigsysFV)} \\[1.5\baselineskip] +\@author \\ +\href{mailto:\@email}{\@email} \\[\baselineskip] +\@date +\end{center} +\vskip 2\baselineskip +} +\def\email#1{\def\@email{#1}} +%%=== end maketitle ================================================= -%=== new macros ==================================================== -\def\package{\texttt{pst-sigsys}\xspace} +%%=== new macros ==================================================== +\def\PSTSigSys{\texttt{pst-sigsys}\xspace} \def\CMD#1{{\ttfamily\textbackslash #1}} \def\rmit#1{\textrm{\textit{#1}}} -\def\keys{[\rmit{keys}]} -% +\def\Keys{\colorbox{TealBlue!20}{[\rmit{keys}]}\kern1pt} +\def\Arrows{\colorbox{TealBlue!20}{\{\rmit{arrows}\}}\kern1pt} +\def\Angle{\colorbox{TealBlue!20}{\{\rmit{angle}\}}\kern1pt} +\def\Coor{\@ifstar{(\rmit{coor})\xspace}{(\rmit{coor})}} +\def\Node{\@ifstar{\rmit{node}\xspace}{\{\rmit{node}\}}} +\def\Stuff{\@ifstar{\rmit{stuff}\xspace}{\{\rmit{stuff}\}}} +\def\List{\@ifstar{\rmit{list}\xspace}{\{\rmit{list}\}}} +% +%%--- syntax -------------------- \newsavebox{\syntaxbox} \newenvironment{syntax}{% \begin{lrbox}{\syntaxbox}% @@ -61,11 +127,13 @@ pdftitle={The pst-sigsys Package},pdfauthor={Farshid Delgosha}} \noindent\fbox{\usebox{\syntaxbox}}% \vspace{.5\baselineskip}% \par} +%%--- end syntax ---------------- % +%%--- keytable ------------------ \newenvironment{keytable}[1]{ -\rowcolors{1}{}{orange!30} +\rowcolors{2}{TealBlue!20}{} \begin{tabular}{>{\ttfamily}l >{\itshape}c c p{#1}} -\hline +\hline\rowcolor[RGB]{244,176,108} \rmit{Key} & \rmit{Value} & \rmit{Default} & \rmit{Description} \\ \hline } @@ -73,11 +141,46 @@ pdftitle={The pst-sigsys Package},pdfauthor={Farshid Delgosha}} \end{tabular} \rowcolors{1}{}{} } +%%--- end keytable -------------- +% +%%--- MarkDistInner ------------- +\def\MarkDistInner{\def\pst@par{}\pst@object{MarkDistInner}} +\def\MarkDistInner@i{\@ifnextchar({\MarkDistInner@ii{0}}{\MarkDistInner@ii}} +\def\MarkDistInner@ii#1(#2)#3[#4]#5{{% +\use@par% +\rput(#2){\pnode(-#3;#1){MD@A}}% +\rput(#2){\pnode(#3;#1){MD@B}}% +\ncline{|<*->|*}{MD@A}{MD@B}% +\ifx#4a\relax% +\naput[nrot=:U]{#5}% +\else +\nbput[nrot=:U]{#5}% +\fi% +}\ignorespaces} +%%--- end MarkDistInner --------- +% +%%--- MarkDistOuter ------------- +\def\MD@temp{} +\def\MarkDistOuter{\def\pst@par{}\pst@object{MarkDistOuter}} +\def\MarkDistOuter@i{\@ifnextchar({\MarkDistOuter@ii{0}}{\MarkDistOuter@ii}} +\def\MarkDistOuter@ii#1(#2)#3[#4]#5{{% +\use@par% +\rput{#1}(#2){\rput(#3,0){\psline{|<*-}(.5,0)}}% +\rput{#1}(#2){\rput(-#3,0){\psline{|<*-}(-.5,0)}}% +\ifx#4a\relax% +\ss@addnum{#1}{90}\MD@temp% +\else% +\ss@addnum{#1}{-90}\MD@temp% +\fi% +\uput[\MD@temp]{#1}(#2){#5}% +}\ignorespaces} +%%--- end MarkDistOuter --------- % \def\@choice{} \newif\if@lineA \newif\if@lineB % +%%--- xdashline ----------------- \define@choicekey*{xdashline}{lines}[\val\@choice]{t,b,tb}{% \ifcase\@choice\relax \@lineAtrue\@lineBfalse @@ -92,17 +195,18 @@ pdftitle={The pst-sigsys Package},pdfauthor={Farshid Delgosha}} \setkeys{xdashline}{#1}% \psset{linecolor=#6}% \if@lineA% -\rput(#2,#3){\psline[linestyle=dashed,linewidth=.5pt](-#5,0)}% +\rput(#2,#3){\psline[style=Dash,linewidth=.5pt](-#5,0)}% \fi% \if@lineB% -\rput(#2,#4){\psline[linestyle=dashed,linewidth=.5pt](-#5,0)}% +\rput(#2,#4){\psline[style=Dash,linewidth=.5pt](-#5,0)}% \fi% \rput(#2,#3){\psline[arrows=|<-](0,.5)}% \rput(#2,#4){\psline[arrows=|<-](0,-.5)}% \rput(#2,#3){\rput[l]{90}(0,.65){\textcolor{#6}{\texttt{#7}}}}% }\ignorespaces} +%%--- end xdashline ------------- % -% +%%--- ydashline ----------------- \define@choicekey*{ydashline}{lines}[\val\@choice]{l,r,lr}{% \ifcase\@choice\relax \@lineAtrue\@lineBfalse @@ -117,34 +221,38 @@ pdftitle={The pst-sigsys Package},pdfauthor={Farshid Delgosha}} \setkeys{ydashline}{#1}% \psset{linecolor=#6}% \if@lineA% -\rput(#2,#4){\psline[linestyle=dashed,linewidth=.5pt](0,-#5)}% +\rput(#2,#4){\psline[style=Dash,linewidth=.5pt](0,-#5)}% \fi% \if@lineB% -\rput(#3,#4){\psline[linestyle=dashed,linewidth=.5pt](0,-#5)}% +\rput(#3,#4){\psline[style=Dash,linewidth=.5pt](0,-#5)}% \fi% \rput(#2,#4){\psline[arrows=|<-](-.5,0)}% \rput(#3,#4){\psline[arrows=|<-](0,0)(.5,0)}% \rput(#3,#4){\rput[l](.65,0){\textcolor{#6}{\texttt{#7}}}}% }\ignorespaces} +%%--- end ydashline ------------- % +%%--- Example ------------------- \newcount\example@cnt \example@cnt=0 \def\Example#1{% \advance\example@cnt\@ne% -\ifx\empty#1\empty% -\noindent\textbf{Example \the\example@cnt.}\hspace{.5em} +\ifx\@empty#1\@empty% +\noindent\textbf{Example \the\example@cnt.}\hspace{.5em}% \else% -\noindent\textbf{Example \the\example@cnt.{\normalfont\footnotesize\ttfamily({\normalfont use} #1)}}\hspace{.5em}% +\noindent\textbf{Example \the\example@cnt.}{{\normalfont\footnotesize(#1)}}\hspace{.5em}% \fi} -%=================================================================== +%%--- end Example --------------- +%%=================================================================== \makeatother -\title{The \package Package \\ {\large (version 1.1)}} -\author{Farshid Delgosha \\ \texttt{fdelgosha@gmail.com}} -\date{April 1, 2009} - +\title{The \PSTSigSys Package} +\author{Farshid Delgosha} +\email{fdelgosha@gmail.com} +\date{January 15, 2010} +\thispagestyle{plain} \begin{document} @@ -154,7 +262,7 @@ pdftitle={The pst-sigsys Package},pdfauthor={Farshid Delgosha}} \begin{abstract} -This package is a collection of useful macros for disciplines related to signal processing. It defines macros for plotting a sequence of numbers, drawing the pole-zero diagram of a system, shading the region of convergence, creating an adder or a multiplier node, placing a framed node at a given coordinate, creating an up-sampler or a down-sampler node, and connecting a list of nodes using any node-connecting macro. I welcome all comments for further improvements of this package and suggestions for adding new macros or features. +This package is a collection of useful macros for disciplines related to signal processing. It defines macros for plotting a sequence of numbers, drawing the pole-zero diagram of a system, shading the region of convergence, creating an adder or a multiplier node, placing a framed node at a given coordinate, creating an up-sampler or a down-sampler node, sequentially connecting a list of nodes, and connecting a list of nodes to one node using any node-connecting macro. The author welcomes all comments for further improvements of this package and suggestions for adding new macros or features. \end{abstract} @@ -166,130 +274,43 @@ This package is a collection of useful macros for disciplines related to signal \section{Introduction} -To use the \package package, add the following command to the preamble of your document. -\begin{verbatim} - \usepackage{pst-sigsys} -\end{verbatim} -It loads \texttt{pstricks} \cite{pstricks}, \texttt{pst-node} \cite{pst-node}, and \texttt{pst-xkey} \cite{pst-xkey} packages. Moreover, it activates polar coordinates through the \CMD{SpecialCoor} macro defined by the \texttt{pstricks} package. Hence, all macros support polar coordinates. - -The \package provides the following options. -\begin{itemize}[label=$\scriptscriptstyle\blacksquare$,topsep=0pt,leftmargin=*] -\item \textbf{notelegant:} When drawing block diagrams, I have found it more elegant to have round corner frames and line breaks. Hence, the \package package sets the following PSTricks keys when loaded. -\begin{verbatim} - framesep=0.125 - framearc=0.25 - linearc=0.1 -\end{verbatim} -To disable them, load the package with the \texttt{notelegant} option. - -\item \textbf{pstadd:} The \package defines some PSTricks styles that can be used only with the \texttt{pstricks-add} package \cite{pstricks-add}. Use this option to define those styles that are introduced in Section~\ref{sec:styles}. -\end{itemize} - - - - -\section{What's New?} - -In version 1.1, four new macros \CMD{pshtick}, \CMD{psvtick}, \CMD{pshTick}, and \CMD{psvTick} are added. The codes of macros \CMD{psusampler} and \CMD{psdsampler} are updated. However, there is no change in their user interface. - - - - -\section{Styles Defined by \package} -\label{sec:styles} - -The \package package defines a few useful PSTricks styles for drawling arrows and dashed lines as shown in Figure~\ref{fig:styles}. (New styles are in green.) Some of these styles, which are shown in Figure~\ref{subfig:pstricks-add styles}, can be used only with the \texttt{pstricks-add} package. The usage of these styles is shown in Section~\ref{sec:examples} with many examples. -%%======================================================================= -\begin{figure}[ht!] -\centering -\subfloat[\texttt{pstricks} style\label{subfig:pstricks styles}]{% -\begin{pspicture}[showgrid=false](0,-.5)(5,5) -% -\rput[l](0,4.5){Default arrow} -\rput[l](2.5,4.5){\psline{->}(2,0)} -% -\rput[l](0,3.75){{\bfseries\color{green!50!black}Arrow}} -\rput[l](2.5,3.75){\psline[style=Arrow](2,0)} -% -\rput[l](0,3){Default dash} -\rput[l](2.5,3){\psline[linestyle=dashed](2,0)} -% -\rput[l](0,2.25){{\bfseries\color{green!50!black}Dash}} -\rput[l](2.5,2.25){\psline[style=Dash](2,0)} -% -\rput[l](0,1.5){Default line} -\rput[l](2.5,1.5){\psline(2,0)} -% -\rput[l](0,.75){{\bfseries\color{green!50!black}Graph}} -\rput[l](2.5,.75){\psline[style=Graph](2,0)} -% -\rput[l](0,0){{\bfseries\color{green!50!black}Stem}} -\rput[l](2.5,0){\psline[style=Stem]{-*}(2,0)} -% -\end{pspicture}} -% -\hspace{1cm} -% -\subfloat[\texttt{pstricks-add} styles\label{subfig:pstricks-add styles}]{% -\begin{pspicture}[showgrid=false](0,-.5)(5,5) -% -\rput[l](0,.75){{\bfseries\color{green!50!black}ArrowIn}} -\rput[l](2.5,.75){\psline[style=ArrowIn](2,0)} -% -\rput[l](0,0){{\bfseries\color{green!50!black}DashDot}} -\rput[l](2.5,0){\psline[style=DashDot](2,0)} -% -\end{pspicture}} -% -\caption{New styles} -\label{fig:styles} -\end{figure} -%%======================================================================= - -In addition, the \package package defines the four styles \texttt{BraceUp}, \texttt{BraceDown}, \texttt{BraceRight}, and \texttt{BraceLeft} in conjunction with the \texttt{psbrace} macro define by the \texttt{pstricks-add} package. In these styles, the distance of the text from the brace is controlled by the \texttt{labelsep} key. Note that the new assignment for the \texttt{labelsep} key must precede the usage of any one of the \texttt{Brace} styles for the distance to take effect. The usage of these styles is shown by the following example. +To use the \PSTSigSys package, add the command \CMD{usepackage\{pst-sigsys\}} to the preamble of the document. This package loads \texttt{pstricks} \cite{pstricks}, \texttt{pst-node} \cite{pst-node}, and \texttt{pst-xkey} \cite{pst-xkey} packages. Moreover, it activates polar coordinates through the \CMD{SpecialCoor} macro defined by the \texttt{pstricks} package. Hence, all macros support polar coordinates. -\begin{LTXexample} -\begin{pspicture}[showgrid=true](5,3) - \psframe(1,1)(4,2) - \psset{linecolor=red} - \psbrace*[labelsep=5mm,style=BraceUp]% - (4,2)(1,2){Up} - \psbrace*[style=BraceDown](1,1)(4,1){Down} - \psbrace*[style=BraceRight](4,1)(4,2){Right} - \psbrace*[style=BraceLeft](1,2)(1,1){Left} -\end{pspicture} -\end{LTXexample} +Section~\ref{sec:change log} keeps a change log from previous versions of the package. All macros defined by the \PSTSigSys package are introduced in Section~\ref{sec:macros}. The extra functionalities of the package are introduced in Section~\ref{sec:extras}. Many practical examples are provided in Section~\ref{sec:examples} that illustrate the applications of the introduced macros. +\section{Change Log} +\label{sec:change log} -\section{Simples Macros} +\begin{itemize}[label=$\scriptscriptstyle\blacksquare$] +\item \textbf{version 1.2 (01/15/2010):} Five new macros \CMD{pstick}, \CMD{psTick}, \CMD{pssignal}, \CMD{ldotsnode}, and \CMD{ncstar} are added. The macros \CMD{pshtick}, \CMD{psvtick}, \CMD{pshTick}, and \CMD{psvTick} are not available any longer since their functionalities are carried out by the newly defined macros \CMD{pstick} and \CMD{psTick}. Codes for the macros \CMD{pscircleop}, \CMD{psframeop}, \CMD{psldots}, and \CMD{nclist} are updated. Four new keys \texttt{gratioWh}, \texttt{gratioWv}, \texttt{gratioHh}, and \texttt{gratioHv} are added that allow frames with edges proportional by the golden ratio. The global round-cornering settings are removed because of their undesired effects in other packages. Hence, the option \texttt{notelegant} is not available any longer. Instead, the new style \texttt{RoundCorners} is introduced. The styles \texttt{BraceUp}, \texttt{BraceDown}, \texttt{BraceLeft}, and \texttt{BraceRight} are not avaiable any longer. Instead, the macros \CMD{psBraceUp}, \CMD{psBraceDown}, \CMD{psBraceLeft}, and \CMD{psBraceRight} are defined. The option \texttt{pstadd} is not available any longer. If the package \texttt{pstricks-add} is loaded, the relevant styles are automatically defined. The macros \CMD{RE}, \CMD{IM}, \CMD{sRE}, and \CMD{sIM} are not available any longer because of their irrelevance to the objectives of the package. -The \package package defines four macros \CMD{RE}, \CMD{sRE}, \CMD{IM}, and \CMD{sIM} that generate the symbols \RE, \sRE, \IM, and \sIM, respectively. (The small symbols are in script size.) These symbols can be used to refer to the real and imaginary parts of a complex number. All four macros can be used both inside and outside the math mode. +\item \textbf{version 1.1 (04/01/2009):} Four new macros \CMD{pshtick}, \CMD{psvtick}, \CMD{pshTick}, and \CMD{psvTick} are added. The codes of macros \CMD{psusampler} and \CMD{psdsampler} are updated. However, there is no change in their user interface. + +\item \textbf{version 1.0 (01/15/2009):} The fist version of the package. +\end{itemize} -\begin{LTXexample} -The real part of the complex number $c=a+jb$ -is $a = \RE(c)$ and its imaginary part -is $b = \IM(c)$. -\end{LTXexample} -\section{Graphical Macros} -\label{sec:graphical macros} +\section{Macros} +\label{sec:macros} -In this section, we introduce all the graphical macros defined by the \package package. Every macro has some keys that can be assigned either directly inside optional brackets right after the macro name or through the \CMD{psset} macro provided by the \texttt{pstricks} package. Unless directly stated, all coordinate inputs specified by \rmit{coor} could be either in cartesian form $(x, y)$ or polar form $(\rho; \theta)$. (Recall that \package activates the polar coordinates on loading. Hence, there is no need to use the \CMD{SpecialCoor} macro.) After the introduction of every macro, some examples are provided to illustrate the usage of that macro. +In this section, we introduce all the macros defined by the \PSTSigSys package. Every macro has some optional keys that can be assigned either directly inside brackets right after the macro name or through the \CMD{psset} macro provided by the \texttt{pstricks} package. In the syntax of every macro, the optional portions are identified by the shaded background. Unless directly stated, all coordinates specified by \Coor* could be either in the cartesian format $(x, y)$ or the polar format $(\rho; \theta)$\footnote{Recall that \PSTSigSys activates the polar coordinates on loading. Hence, there is no need to use the \CMD{SpecialCoor} macro.}. After the introduction of every macro, some examples are provided to illustrate the usage of that macro. \subsection{psaxeslabels} \begin{syntax} -\CMD{psaxeslabels}\keys\{\rmit{arrows}\}($x_0, y_0$)($x_1, y_1$)($x_2, y_2$)\{\rmit{x-label}\}\{\rmit{y-label}\} +\CMD{psaxeslabels}\Keys\Arrows($x_0, y_0$)($x_1, y_1$)($x_2, y_2$)\{\rmit{x-label}\}\{\rmit{y-label}\} \end{syntax} -This macro is a simplified version of the \CMD{psaxes} macro defined by the \texttt{pst-plot} package \cite{pst-plot}. As depicted in Figure~\ref{fig:psaxeslabels}, the \CMD{psaxeslabels} draws two straight lines, one vertical and one horizontal, that intersect at the point ($x_0, y_0$). + +This macro is a simplified version of the \CMD{psaxes} macro defined by the \texttt{pst-plot} package \cite{pst-plot}. As depicted in Figure~\ref{fig:psaxeslabels}, the \CMD{psaxeslabels} draws two straight lines, one vertical and one horizontal, that intersect at the point ($x_0, y_0$). These lines are enclosed by a virtual rectangular box with the lower left corner at ($x_1, y_1$) and the upper right corners at ($x_2, y_2$). The two lines are labeled by \rmit{x-label} and \rmit{y-label}, respectively. Similar to the \CMD{psaxes} macro, the use of \rmit{arrows} is optional. The keys specific to the \CMD{psaxeslabels} are summarized in Table~\ref{tab:psaxeslabels}. + %%======================================================================= \begin{figure}[ht!] \centering @@ -304,35 +325,33 @@ This macro is a simplified version of the \CMD{psaxes} macro defined by the \tex \nput{45}{org}{\textcolor{red}{$(x_0, y_0)$}} \nput{45}{xy1}{\textcolor{red}{$(x_1, y_1)$}} \nput{225}{xy2}{\textcolor{red}{$(x_2, y_2)$}} -\xdashline(3.35,0,-\pslabelsep){1.5}{purple}{labelsep} -\ydashline(0,\pslabelsep,2.35){1.5}{purple}{labelsep} +\xdashline(3.35,0,-\pslabelsep){1.5}{TealBlue}{\footnotesize labelsep} +\ydashline(0,\pslabelsep,2.35){1.5}{TealBlue}{\footnotesize labelsep} % \end{pspicture} \caption{\CMD{psaxeslabels} macro} \label{fig:psaxeslabels} \end{figure} %%======================================================================= -These lines are enclosed by a virtual rectangular box with the lower left and upper right corners at ($x_1, y_1$) and ($x_2, y_2$), respectively. The two lines are labeled by \rmit{x-label} and \rmit{y-label}, respectively. Similar to \CMD{psaxes} macro, the use of \rmit{arrows} is optional. The keys employed by the \CMD{psaxeslabels} are summarized in Table~\ref{tab:psaxeslabels}. -%%======================================================================= \begin{table}[ht!] \centering -\caption{\CMD{psaxeslabels} Keys} +\caption{\CMD{psaxeslabels} keys} \label{tab:psaxeslabels} -\begin{keytable}{2.8in} +\begin{keytable}{3.2in} xlpos & {\normalfont\ttfamily t | b} & \texttt{b} & Position of the $x$-label along the horizontal axis \\ -ylpos & {\normalfont\ttfamily l | r} & \texttt{r} & Position of the $y$-label along the vertical axis \\ +ylpos & {\normalfont\ttfamily l | r} & \texttt{r} & Position of the $y$-label along the vertical axis \\ \end{keytable} \end{table} %%======================================================================= -\begin{LTXexample} +\begin{LTXexample}[width=7cm] \begin{pspicture}[showgrid=true](-2,-1)(2,1) - \psaxeslabels(0,0)(-2,-1)(2,1){\RE}{\IM} + \psaxeslabels(0,0)(-2,-1)(2,1){$\Re$}{$\Im$} \end{pspicture} \end{LTXexample} -\begin{LTXexample} +\begin{LTXexample}[width=7cm] \begin{pspicture}[showgrid=true](-2,-1)(2,2) \psset{linecolor=blue,xlpos=t,ylpos=l} \psaxeslabels{->}(-1,0)(-2,-1)(2,2){$x$}{$y$} @@ -342,138 +361,149 @@ ylpos & {\normalfont\ttfamily l | r} & \texttt{r} & Position of the $y$-l -\subsection{pshtick} + +\subsection{pstick} \begin{syntax} -\CMD{pshtick}\keys(\rmit{coor})\{\rmit{ticklength}\} +\CMD{pstick}\Keys\Angle\Coor\{\rmit{ticklength}\} \end{syntax} -As depicted in Figure~\ref{fig:pshtick}, the \CMD{pshtick} macro draws a horizontal line centered at \rmit{coor} with length $2\rmit{ticklength}$. This could be used for adding a tick line to coordinate axes. +As depicted in Figure~\ref{fig:pstick}, the \CMD{pstick} macro draws a straight line with length $2\rmit{ticklength}$ centered at \Coor* and angled \rmit{angle} with respect to the horizontal axis. If the optional parameter \rmit{angle} is absent, then it is assumed zero, i.e., the line becomes horizontal. This macro could be used for adding tick lines to coordinate axes in addition to many other usages. + %%======================================================================= \begin{figure}[ht!] \centering -\begin{pspicture}[showgrid=false](-2,-1)(2,.5) +\begin{pspicture}[showgrid=false](-2,-1)(2,1.5) % -\pnode(0,0){org} -\rput(0,-1){\rnode{coor}{\textcolor{red}{(\rmit{coor})}}} -\ncline[linecolor=red,nodesepA=.15]{->}{coor}{org} +\pstick[style=Dash,linecolor=gray](0,0){2} +\pstick{30}(0,0){2} +% +\dotnode[linecolor=red](0,0){org} +\pssignal(0,-1){coor}{\textcolor{red}{\Coor}} +\ncline[linecolor=red]{->}{coor}{org} % -\pshtick(0,0){2} +\psarc[linecolor=gray](0,0){1}{0}{30} +\rput[l](1.15;15){{\footnotesize\ttfamily\color{gray}angle}} % -\psbrace[style=BraceUp,linecolor=purple,fillstyle=solid,fillcolor=purple]% -(2,0)(0,0){{\ttfamily\footnotesize\color{purple}ticklength}} +\psBraceUp*[linecolor=TealBlue]% +(2;30)(0,0){{\ttfamily\footnotesize\color{TealBlue}ticklength}} % -\psbrace[style=BraceUp,linecolor=purple,fillstyle=solid,fillcolor=purple]% -(0,0)(-2,0){{\ttfamily\footnotesize\color{purple}ticklength}} +\psBraceUp*[linecolor=TealBlue]% +(0,0)(-2;30){{\ttfamily\footnotesize\color{TealBlue}ticklength}} % \end{pspicture} -\caption{\CMD{pshtick} macro} -\label{fig:pshtick} +\caption{\CMD{pstick} macro} +\label{fig:pstick} \end{figure} %%======================================================================= -\begin{LTXexample} -\begin{pspicture}[showgrid=true](-3,0)(3,2) - \psaxeslabels(0,0)(-3,0)(3,2){$x$}{$y$} - \pshtick[linecolor=red](0,.5){.1} - \pshtick[linecolor=blue](0,1.25){.25} +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}[showgrid=true](-2,-1)(3,2) + \psaxeslabels(0,0)(-2,-1)(3,2){$x$}{$y$} + \pstick[linecolor=red](0,1){.2} + \pstick[linecolor=blue]{90}(1,0){.2} + \pstick[linecolor=green]{45}(2,0){.3} + \pstick[arrows=|-|]{90}(-1,0){.3} \end{pspicture} \end{LTXexample} -\subsection{psvtick} +\subsection{psTick} \begin{syntax} -\CMD{psvtick}\keys(\rmit{coor})\{\rmit{ticklength}\} +\CMD{psTick}\Keys\Angle\Coor \end{syntax} -Similar to the previous macro, the \CMD{psvtick} macro draws a vertical line centered at \rmit{coor} with length $2\rmit{ticklength}$ (Figure~\ref{fig:psvtick}). This could be used for adding a tick line to coordinate axes. +Similar to \CMD{pstick}, the \CMD{psTick} macro draws a straight line centered at \Coor* and angled \rmit{angle} with respect to the horizontal axis. The only difference is that the tick length is specified by the \texttt{ticklength} key (Table~\ref{tab:psTick}). This macro is useful when multiple ticks are drawn all with the same length. + %%======================================================================= -\begin{figure}[ht!] +\begin{table}[ht!] \centering -\begin{pspicture}[showgrid=false](-1.5,-2)(.5,2) -% -\pnode(0,0){org} -\rput(-1.5,0){\rnode{coor}{\textcolor{red}{(\rmit{coor})}}} -\ncline[linecolor=red,nodesepA=.15]{->}{coor}{org} -% -\psvtick(0,0){2} -% -\psbrace[style=BraceRight,linecolor=purple,fillstyle=solid,fillcolor=purple]% -(0,0)(0,2){{\ttfamily\footnotesize\color{purple}ticklength}} -% -\psbrace[style=BraceRight,linecolor=purple,fillstyle=solid,fillcolor=purple]% -(0,-2)(0,0){{\ttfamily\footnotesize\color{purple}ticklength}} -% -\end{pspicture} -\caption{\CMD{psvtick} macro} -\label{fig:psvtick} -\end{figure} +\caption{\CMD{psTick} keys} +\label{tab:psTick} +\begin{keytable}{.85in} +ticklength & num[dimen] & 0.075 & Tick length \\ +\end{keytable} +\end{table} %%======================================================================= -\begin{LTXexample} -\begin{pspicture}[showgrid=true](-3,-1)(3,1) - \psaxeslabels(0,0)(-3,-1)(3,1){$x$}{$y$} - \psvtick[linecolor=red](1,0){.1} - \psvtick[linecolor=blue](2,0){.25} +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}[showgrid=true](-2,-1)(3,2) + \psaxeslabels(0,0)(-2,-1)(3,2){$x$}{$y$} + \psset{ticklength=.15} + \psTick[linecolor=red](0,1) + \psTick[linecolor=blue]{90}(1,0) + \psTick[linecolor=green]{45}(2,0) + \psTick[arrows=|-|]{90}(-1,0) \end{pspicture} \end{LTXexample} -\subsection{pshTick} + +\subsection{pssignal} \begin{syntax} -\CMD{pshTick}\keys(\rmit{coor}) +\CMD{pssignal}\Keys\Coor\Node\Stuff \end{syntax} -Similar to \CMD{pshtick}, the \CMD{pshTick} macro draws a horizontal line centered at \rmit{coor}. The only difference is that the tick length is specified by the \texttt{ticklength} key. This is useful when multiple ticks are drawn all with the same length. +This macro places \Stuff* inside an invisible frame centered at \Coor* and makes that a node labeled \Node* (Figure~\ref{fig:pssignal}). The separation of the frame and the \Stuff* is determined by the key \texttt{signalsep} (Table~\ref{tab:pssignal}). -\begin{LTXexample} -\begin{pspicture}[showgrid=true](-2,0)(2,2) - \psaxeslabels(0,0)(-2,0)(2,2){$x$}{$y$} - \psset{ticklength=.1,linecolor=red} - \pshTick(0,.5) - \pshTick(0,1) - \pshTick(0,1.5) +%%======================================================================= +\begin{figure}[ht!] +\centering +\begin{pspicture}[showgrid=false](-2,-2)(2,1) +% +\rput(0,0){% +\psframebox[framesep=.5,linecolor=gray]{% +\psframebox[framesep=0,linecolor=gray]{{\LARGE\color{gray}\Stuff*}}% +}} +\dotnode[linecolor=red](0,0){org} +\pssignal(0,-1.5){coor}{\textcolor{red}{\Coor}} +\ncline[linecolor=red]{->}{coor}{org} +% +\MarkDistOuter[linecolor=TealBlue](.95,.4){.25}[a]{\ttfamily\footnotesize\color{TealBlue}signalsep} +% \end{pspicture} -\end{LTXexample} - - - - -\subsection{psvTick} - -\begin{syntax} -\CMD{psvTick}\keys(\rmit{coor}) -\end{syntax} +\caption{\CMD{pssignal} macro} +\label{fig:pssignal} +\end{figure} +%%======================================================================= +\begin{table}[ht!] +\centering +\caption{\CMD{pssignal} keys} +\label{tab:pssignal} +\begin{keytable}{1.25in} +signalsep & num[dimen] & $5$pt & Frame separation \\ +\end{keytable} +\end{table} +%%======================================================================= -Similar to \CMD{psvtick}, the \CMD{psvTick} macro draws a vertical line centered at \rmit{coor}. The only difference is that the tick length is specified by the \texttt{ticklength} key. This is useful when multiple ticks are drawn all with the same length. -\begin{LTXexample} +\begin{LTXexample}[width=7.5cm] \begin{pspicture}[showgrid=true](-2,-1)(2,1) - \psaxeslabels(0,0)(-2,-1)(2,1){$x$}{$y$} - \psset{ticklength=.1,linecolor=red} - \psvTick(.5,0) - \psvTick(1,0) - \psvTick(1.5,0) + \pssignal(-1.5,.5){x}{$x[n]$} + \pssignal[signalsep=.5](1.5,-.5){y}{$y[n]$} + \ncline{x}{y} \end{pspicture} \end{LTXexample} + \subsection{psstem} \begin{syntax} -\CMD{psstem}\keys($x_0, \Delta$)\{\rmit{list}\} \\ -\CMD{psstem}\keys\{\rmit{list}\} +\CMD{psstem}\Keys($x_0, \Delta$)\List \\ +\CMD{psstem}\Keys\List \end{syntax} -The \CMD{psstem} macro plots the sequence defined by \rmit{list} that is a comma-separated list of real or integer~numbers. As shown in Figure~\ref{subfig:psstem:sample}, if $\rmit{list} = n_1, n_2, n_3, \dotsc$, then \CMD{psstem} draws vertical lines (stems) at $x_0, x_0 + \Delta, x_0 + 2\Delta, \dotsc$ on the horizontal axis ($y = 0$) with heights $n_1, n_2, n_3, \dotsc$, respectively. \emph{Note that both $x_0$ and $\Delta$ must be integers.} In case their values are not explicitly given, they are assumed $x_0 = 0$ and $\Delta = 1$. The \CMD{psstem} macro is also capable of numerically tagging the stems. As depicted in Figure~\ref{subfig:psstem:tag}, the tag of every stem is place either below or above it depending on whether the corresponding number in the sequence is nonnegative (positive or zero) or negative, respectively. The distance of tags to stems is determined by the \texttt{labelsep} key. The keys employed by the \CMD{psstem} macro are summarized in Table~\ref{tab:psstem}. +The \CMD{psstem} macro plots the sequence defined by \List* that is a comma-separated list of numbers. As shown in Figure~\ref{subfig:psstem:sample}, if $\List* = n_1, n_2, n_3, \dotsc$, then \CMD{psstem} draws vertical lines (stems) at $x_0, x_0 + \Delta, x_0 + 2\Delta, \dotsc$ on the horizontal axis with heights $n_1, n_2, n_3, \dotsc$, respectively. \emph{It is important to remember that both $x_0$ and $\Delta$ must be integers.} In case their values are not explicitly given, they are assumed $x_0 = 0$ and $\Delta = 1$. The \CMD{psstem} macro is also capable of numerically tagging the stems. As depicted in Figure~\ref{subfig:psstem:tag}, the tag of every stem is place either below or above it depending on whether the corresponding number in the sequence is nonnegative (positive or zero) or negative, respectively. The distance of tags to stems is determined by the \texttt{labelsep} key. The keys specific to the \CMD{psstem} macro are summarized in Table~\ref{tab:psstem}. + %%======================================================================= \begin{figure}[ht!] \centering @@ -481,9 +511,9 @@ The \CMD{psstem} macro plots the sequence defined by \rmit{list} that is a comma % Sample %------------------------------------------------------- \subfloat[Sample sequence]{\label{subfig:psstem:sample} -\begin{pspicture}[showgrid=false](-1,-1)(4,3) +\begin{pspicture}[showgrid=flase](-1,-1)(4.5,3) % -\psgrid[griddots=10,subgriddiv=1,gridlabels=0pt](3,2) +\psgrid[griddots=10,subgriddiv=1,gridlabels=0pt](4,2) % \pnode(0,0){a} \pnode(0,2){b} @@ -492,15 +522,15 @@ The \CMD{psstem} macro plots the sequence defined by \rmit{list} that is a comma \ncline[offset=.35,linecolor=gray]{|*-|*}{a}{b} \ncput*{$n_1$} % -\pnode(1.5,0){a} -\pnode(1.5,1){b} +\pnode(2,0){a} +\pnode(2,1){b} \ncline{-*}{a}{b} \nput{-90}{a}{$x_0+\Delta$} \ncline[offset=.35,linecolor=gray]{|*-|*}{a}{b} \ncput*{$n_2$} % -\pnode(3,0){a} -\pnode(3,1.5){b} +\pnode(4,0){a} +\pnode(4,1.5){b} \ncline{-*}{a}{b} \nput{-90}{a}{$x_0+2\Delta$} \ncline[offset=.35,linecolor=gray]{|*-|*}{a}{b} @@ -508,7 +538,7 @@ The \CMD{psstem} macro plots the sequence defined by \rmit{list} that is a comma % \end{pspicture}} % -\hspace{2cm} +\hspace{1.5cm} % %------------------------------------------------------- % Tag @@ -522,11 +552,11 @@ The \CMD{psstem} macro plots the sequence defined by \rmit{list} that is a comma % \psline{-*}(0,0)(0,2) \rput[t](0,-\pslabelsep){$x_i$} -\xdashline[lines=tb](.5,0,-\pslabelsep){1}{purple}{labelsep} +\xdashline[lines=tb](.5,0,-\pslabelsep){1}{TealBlue}{\footnotesize labelsep} % \psline{-*}(2.5,0)(2.5,-1) \rput[b](2.5,\pslabelsep){$x_j$} -\xdashline[lines=tb](3,\pslabelsep,0){1}{purple}{labelsep} +\xdashline[lines=tb](3,\pslabelsep,0){1}{TealBlue}{\footnotesize labelsep} % \end{pspicture}} % @@ -536,9 +566,9 @@ The \CMD{psstem} macro plots the sequence defined by \rmit{list} that is a comma %%======================================================================= \begin{table}[ht!] \centering -\caption{\CMD{psstem} Keys} +\caption{\CMD{psstem} keys} \label{tab:psstem} -\begin{keytable}{2.5in} +\begin{keytable}{2.75in} stemhead & style & * & Stem head. Possible choices are \texttt{*}, \texttt{o}, \texttt{>}, \texttt{<}, \texttt{>\kern.5pt>}, \texttt{<\kern.5pt<}, \texttt{|}, \texttt{)}, \texttt{(}, \texttt{>|}, and \texttt{<|}. \\ stemtag & Boolean & \texttt{false} & Tagging the stems \\ stemtagformat & format & \CMD{scriptstyle} & Tag format \\ @@ -547,20 +577,21 @@ stemtagformat & format & \CMD{scriptstyle} & Tag format \\ %%======================================================================= -\begin{LTXexample} +\begin{LTXexample}[width=7.75cm] \begin{pspicture}[showgrid=true](0,-1)(6,2) \psstem[style=Stem]{0,.5,1,-1,2} \end{pspicture} \end{LTXexample} -\begin{LTXexample} +\begin{LTXexample}[width=7.75cm] \begin{pspicture}[showgrid=true](0,-1)(6,2) - \psset{style=Stem,linecolor=red} + \psset{style=Stem,linecolor=blue,% + stemtagformat=\color{red}\scriptstyle} \psstem[stemhead=>,stemtag](1,2){-1,1,2} \end{pspicture} \end{LTXexample} -\begin{LTXexample} +\begin{LTXexample}[width=7.75cm] \begin{pspicture}[showgrid=true](0,-1)(6,2) \psset{style=Stem,stemtag} \psstem[linecolor=red](0,2){1,-.75,1} @@ -570,7 +601,7 @@ stemtagformat & format & \CMD{scriptstyle} & Tag format \\ \end{LTXexample} -\begin{LTXexample} +\begin{LTXexample}[width=7.75cm] \begin{pspicture}[showgrid=true](5,3) \psstem[stemhead=*](0,1){1} \psstem[stemhead=o](1,1){1} @@ -596,42 +627,40 @@ stemtagformat & format & \CMD{scriptstyle} & Tag format \\ \subsection{pszero} \begin{syntax} -\CMD{pszero}\keys(\rmit{coor})\{\rmit{node}\} +\CMD{pszero}\Keys\Coor\Node \end{syntax} -This macro is used to generate a circle node centered at \rmit{coor} and labeled \rmit{node} that represents a zero of a system. It could also be used to generate several circles, all centered at \rmit{coor}, representing high order zeros. As shown in Figure~\ref{fig:pszero}, the radius of innermost circle is \texttt{zeroradius} and it is incremented by \texttt{zeroradiusinc} for high order zeros. + +This macro is used to generate a circle node centered at \Coor* and labeled \Node* that represents a zero of a system. It could also be used to generate several circles, all centered at \Coor*, representing high order zeros as shown in Figure~\ref{fig:pszero}. The radius of innermost circle is \texttt{zeroradius} and it is incremented by \texttt{zeroradiusinc} for high order zeros. The line-width of all circles is determined by the \texttt{zerowidth} key. The key \texttt{order} determines the order of the zero. The key \texttt{scale} can be used to scale up or down the radius of the innermost circle (\texttt{zeroradius}), the radius increment (\texttt{zeroradiusinc}), and the line-width of all circles (\texttt{zerowidth}). Table~\ref{tab:pszero} summarizes keys corresponding to \CMD{pszero} and their default values. + %%======================================================================= \begin{figure}[ht!] \centering \begin{pspicture}[showgrid=false](-2.5,-2.5)(2.5,2.5) % \dotnode[linecolor=red](0,0){org} -\nput[labelsep=.1]{-90}{org}{\textcolor{red}{(\rmit{coor})}} +\nput[labelsep=.1]{-90}{org}{\textcolor{red}{\Coor}} % \pscircle(0,0){1.25} \pscircle(0,0){1.65} -\rput(2,0){\psldots} +\psldots(2,0) \pscircle(0,0){2.35} % \pnode(1.25;45){rad} -\ncline[linecolor=purple]{->}{org}{rad} \naput[nrot=:U]{{\ttfamily\scriptsize\color{purple}zeroradius}} +\ncline[linecolor=TealBlue]{->}{org}{rad} +\naput[nrot=:U]{{\ttfamily\scriptsize\color{TealBlue}zeroradius}} % -\rput(1.25;-45){\psline[arrows=|<-,linecolor=teal](.5;135)} -\rput(1.65;-45){\psline[arrows=|<-,linecolor=teal](.5;-45)} -\pnode(1.45;-45){inc} -\nput[rot=-45]{45}{inc}{{\ttfamily\scriptsize\color{teal}zeroradiusinc}} +\MarkDistOuter[linecolor=Salmon]{-20}(1.45;-20){.2}[a]{\ttfamily\scriptsize\color{Salmon}zeroradiusinc} % \end{pspicture} \caption{\CMD{pszero} macro} \label{fig:pszero} \end{figure} %%======================================================================= -The line-width of all circles is determined by the \texttt{zerowidth} key. The key \texttt{order} determines the order of the zero. The key \texttt{scale} can be used to scale up or down the radius of innermost circle (\texttt{zeroradius}), the radius increment (\texttt{zeroradiusinc}), and the line-width of all circles (\texttt{zerowidth}). Table~\ref{tab:pszero} summarizes keys corresponding to \CMD{pszero} and their default values. -%%======================================================================= \begin{table}[ht!] \centering -\caption{\CMD{pszero} Keys} +\caption{\CMD{pszero} keys} \label{tab:pszero} -\begin{keytable}{1.85in} +\begin{keytable}{2.1in} zerowidth & num[dimen] & $0.7$pt & Line-width of all circles \\ zeroradius & num[dimen] & $0.08$ & Radius of the innermost circle \\ zeroradiusinc & num[dimen] & $0.07$ & Radius increment \\ @@ -641,46 +670,49 @@ scale & num & $1$ & Scale factor \\ \end{table} %%======================================================================= -\begin{LTXexample} +\begin{LTXexample}[width=7cm] \begin{pspicture}[showgrid=true](6,2) \pszero(0,1){z1} \nput{-90}{z1}{$z_1$} - \pszero[linecolor=red](1,1){z2} - \pszero[zerowidth=2pt](2,1){z3} - \pszero[zeroradius=.25](3,1){z4} - \pszero[order=3](4,1){z5} + \pszero[linecolor=red](.75,1){z2} + \pszero[zerowidth=2pt](1.5,1){z3} + \pszero[zeroradius=.25](2.5,1){z4} + \pszero[order=3](3.5,1){z5} \nput{-90}{z5}{$z_5$} - \pszero[zeroradiusinc=.15,order=2](5,1){z6} - \pszero[scale=3](6,1){z7} + \pszero[zeroradiusinc=.15,order=2](4.5,1){z6} + \pszero[scale=3](5.5,1){z7} \end{pspicture} \end{LTXexample} + + \subsection{pspole} \begin{syntax} -\CMD{pspole}\keys(\rmit{coor})\{\rmit{node}\} +\CMD{pspole}\Keys\Coor\Node \end{syntax} -This macro is used to generate a cross node, as shown in Figure~\ref{fig:pspole}, centered at \rmit{coor} and labeled \rmit{node} that represents the pole of a system. The key \texttt{scale} can be used to scale up or down the pole line-width (\texttt{polewidth}) and pole length (\texttt{polelength}). The keys corresponding to the \CMD{pspole} macro are summarized in Table~\ref{tab:pspole}. +This macro is used to generate a cross node, as shown in Figure~\ref{fig:pspole}, centered at \Coor* and labeled \Node* that represents the pole of a system. The key \texttt{scale} can be used to scale up or down the pole line-width (\texttt{polewidth}) and the pole length (\texttt{polelength}). The keys corresponding to the \CMD{pspole} macro are summarized in Table~\ref{tab:pspole}. + %%======================================================================= \begin{figure}[ht!] \centering \begin{pspicture}[showgrid=false](-2,-1.5)(2,1.5) % \pnode(0,0){org} -\rput(0,-1){\rnode{coor}{\textcolor{red}{(\rmit{coor})}}} -\ncline[linecolor=red,nodesepA=.15]{->}{coor}{org} +\pssignal(0,-1){coor}{\textcolor{red}{\Coor}} +\ncline[linecolor=red]{->}{coor}{org} % -\psline[linestyle=dashed,linecolor=gray](-2,0)(2,0) +\pstick[style=Dash,linecolor=gray](0,0){2} \psarc[linecolor=gray](0,0){1}{0}{45} -\rput(1.35;22.5){\textcolor{gray}{$45^\circ$}} +\rput[l](1.15;22.5){\textcolor{gray}{$45^\circ$}} % \pspole[polelength=2,linewidth=1pt](0,0){p} % -\psbrace[style=Brace,rot=-90,nodesepA=-.15,nodesepB=-.15,linecolor=purple,fillstyle=solid,fillcolor=purple]% -(2;45)(0,0){{\ttfamily\footnotesize\color{purple}polelength}} +\psBraceUp*[linecolor=TealBlue]% +(2;45)(0,0){{\ttfamily\footnotesize\color{TealBlue}polelength}} % \end{pspicture} \caption{\CMD{pspole} macro} @@ -689,9 +721,9 @@ This macro is used to generate a cross node, as shown in Figure~\ref{fig:pspole} %%======================================================================= \begin{table}[ht!] \centering -\caption{\CMD{pspole} Keys} +\caption{\CMD{pspole} keys} \label{tab:pspole} -\begin{keytable}{1in} +\begin{keytable}{1.125in} polewidth & num[dimen] & $0.7$pt & Cross line-width \\ polelength & num[dimen] & $0.12$ & Cross length \\ scale & num & $1$ & Scale factor \\ @@ -699,10 +731,10 @@ scale & num & $1$ & Scale factor \\ \end{table} %%======================================================================= -\begin{LTXexample} +\begin{LTXexample}[width=8cm] \begin{pspicture}[showgrid=true](6,2) \pspole(1,1){p1} \nput{-90}{p1}{$p_1$} - \pspole[linecolor=red](2,1){p2} + \pspole[linecolor=blue](2,1){p2} \pspole[polewidth=2pt](3,1){p3} \pspole[polelength=.5](4,1){p4} \pspole[scale=3](5,1){p5} @@ -716,33 +748,32 @@ scale & num & $1$ & Scale factor \\ \subsection{pscircleop} \begin{syntax} -\CMD{pscircleop}\keys(\rmit{coor})\{\rmit{node}\} +\CMD{pscircleop}\Keys\Coor\Node \end{syntax} -This macro draws a cross inside a circle that are both centered at \rmit{coor} and labeled \rmit{node} as shown in Figure~\ref{fig:pscircleop}. The length of the cross and its line-width are controlled by the \texttt{oplength} and \texttt{opwidth} keys, respectively. Note that the line-width of the enclosing circle is separately controlled by the \texttt{linewidth} key. The distance between the circle and the cross is determined by the key \texttt{opsep}. The type of the operation (whether plus or times) is controlled by the key \texttt{operation}. Another way of determining the operation inside the circle is through the key \texttt{angle} that determines the angle of the cross. The key \texttt{scale} can be used to scale up or down the cross line-width (\texttt{opwidth}), the cross length (\texttt{oplength}), the separation between the cross and the circle (\texttt{opsep}), and the circle line-width (\texttt{linewidth}). The keys corresponding to the \CMD{pscircleop} macro are summarized in Table~\ref{tab:pscircleop}. +This macro draws a cross inside a circle that are both centered at \Coor*. Then, it turns the circle into a node labeled \Node* as shown in Figure~\ref{fig:pscircleop}. The length of the cross and its line-width are controlled by the \texttt{oplength} and \texttt{opwidth} keys, respectively. The line-width of the enclosing circle is separately controlled by the \texttt{linewidth} key. The distance between the circle and the cross is determined by the key \texttt{opsep}. The type of operation (whether plus or times) is controlled by the key \texttt{operation}. Another way of determining the operation inside the circle is through the key \texttt{angle} that determines the angle of the cross. The key \texttt{scale} can be used to scale up or down the cross line-width (\texttt{opwidth}), the cross length (\texttt{oplength}), the separation between the cross and the circle (\texttt{opsep}), and the circle line-width (\texttt{linewidth}). The keys corresponding to the \CMD{pscircleop} macro are summarized in Table~\ref{tab:pscircleop and psframeop}. + %%======================================================================= \begin{figure}[ht!] \centering \begin{pspicture}[showgrid=false](-2,-2)(2,2) % \pnode(0,0){org} -\rput(1;-105){\rnode{coor}{\textcolor{red}{(\rmit{coor})}}} -\ncline[linecolor=red,nodesepA=.15]{->}{coor}{org} +\pssignal(1;-105){coor}{\textcolor{red}{\Coor}} +\ncline[linecolor=red]{->}{coor}{org} % -\psline[linestyle=dashed,linecolor=gray](-1.5,0)(1.5,0) -\psarc[linecolor=gray](0,0){1}{0}{30} -\rput[l](1.1;15){{\ttfamily\footnotesize\color{gray}angle}} +\pstick[style=Dash,linecolor=gray](0,0){1.5} +\psarc[linecolor=orange](0,0){.9}{0}{30} +\rput[l](1.05;15){{\ttfamily\footnotesize\color{orange}angle}} % \pscircleop[oplength=1.5,opsep=.5,angle=30](0,0){op} % -\psbrace[style=Brace,rot=-90,nodesepA=-.15,nodesepB=-.15,linecolor=purple,fillstyle=solid,fillcolor=purple]% -(1.5;30)(0,0){{\ttfamily\footnotesize\color{purple}oplength}} +\psBraceUp*[linecolor=TealBlue]% +(1.5;30)(0,0){{\ttfamily\footnotesize\color{TealBlue}oplength}} +% +\pscircle[style=Dash,linecolor=gray]{1.5} +\rput(1.75;150){\MarkDistOuter[linecolor=Salmon]{-30}(0,0){.25}[a]{\ttfamily\scriptsize\color{Salmon}opsep}} % -\pscircle[linestyle=dashed,linecolor=gray]{1.5} -\rput(2;150){\psline[arrows=|<-,linecolor=teal](.5;150)} -\rput(1.5;150){\psline[arrows=|<-,linecolor=teal](.5;-30)} -\pnode(1.75;150){sep} -\nput[rot=-30]{60}{sep}{{\ttfamily\scriptsize\color{teal}opsep}} \end{pspicture} \caption{\CMD{pscircleop} macro} \label{fig:pscircleop} @@ -750,9 +781,9 @@ This macro draws a cross inside a circle that are both centered at \rmit{coor} a %%======================================================================= \begin{table}[ht!] \centering -\caption{\CMD{pscircleop} Keys} -\label{tab:pscircleop} -\begin{keytable}{2.75in} +\caption{\CMD{pscircleop} and \CMD{psframeop} keys} +\label{tab:pscircleop and psframeop} +\begin{keytable}{3.1in} opwidth & num[dimen] & $0.7$pt & Cross line-width \\ oplength & num[dimen] & $0.125$ & Cross length \\ opsep & num[dimen] & $0.1$ & Separation between the cross and the frame \\ @@ -764,7 +795,7 @@ scale & num & $1$ & Scale fact %%======================================================================= -\begin{LTXexample} +\begin{LTXexample}[width=8cm] \begin{pspicture}[showgrid=true](6,2) \pscircleop(.5,1){op1} \pscircleop[opwidth=2pt](1.25,1){op2} @@ -772,6 +803,7 @@ scale & num & $1$ & Scale fact \pscircleop[opsep=0](2.75,1){op4} \pscircleop[operation=times](3.5,1){op5} \pscircleop[angle=20](4.25,1){op6} + \psset{fillstyle=solid,fillcolor=gray!50} \pscircleop[scale=2.5](5.5,1){op7} \end{pspicture} \end{LTXexample} @@ -782,13 +814,13 @@ scale & num & $1$ & Scale fact \subsection{psframeop} \begin{syntax} -\CMD{psframeop}\keys(\rmit{coor})\{\rmit{node}\} +\CMD{psframeop}\Keys\Coor\Node \end{syntax} -This macro is very similar to the \CMD{pscircleop} macro. The only difference is that the operation is enclosed inside a square frame rather than a circular one. +This macro is very similar to the \CMD{pscircleop} macro with the same keys as in Table~\ref{tab:pscircleop and psframeop}. The only difference is that the operation is enclosed in a square frame rather than a circular one. -\begin{LTXexample} +\begin{LTXexample}[width=8cm] \begin{pspicture}[showgrid=true](6,2) \psframeop(.5,1){op1} \psframeop[opwidth=2pt](1.25,1){op2} @@ -796,6 +828,7 @@ This macro is very similar to the \CMD{pscircleop} macro. The only difference is \psframeop[opsep=0](2.75,1){op4} \psframeop[operation=times](3.5,1){op5} \psframeop[angle=20](4.25,1){op6} + \psset{fillstyle=solid,fillcolor=blue!20} \psframeop[scale=2.5](5.5,1){op7} \end{pspicture} \end{LTXexample} @@ -806,22 +839,23 @@ This macro is very similar to the \CMD{pscircleop} macro. The only difference is \subsection{psdisk} \begin{syntax} -\CMD{psdisk}\keys(\rmit{coor})\{\rmit{radius}\} +\CMD{psdisk}\Keys\Coor\{\rmit{radius}\} \end{syntax} -It draws a solid disk centered at \rmit{coor} with radius \rmit{radius} as depicted in Figure~\ref{fig:psdisk}. The fill color is specified by the \texttt{fillcolor} key. This macro is used to shade the region of convergence of a system in the $z$ plane. +This macro draws a solid disk centered at \Coor* with radius \rmit{radius} as depicted in Figure~\ref{fig:psdisk}. The fill color is specified by the \texttt{fillcolor} key. This macro is used to shade the region of convergence of a system in the $z$ plane. + %%======================================================================= \begin{figure}[ht!] \centering \begin{pspicture}[showgrid=false](-1.5,-1.5)(1.5,1.5) % -\psdisk[fillcolor=blue!20](0,0){1.5} +\psdisk[fillcolor=orange!20](0,0){1.5} % \dotnode[linecolor=red](0,0){org} -\nput{-90}{org}{\textcolor{red}{\rmit{coor}}} +\nput{-90}{org}{\textcolor{red}{\Coor}} \pnode(1.5;45){rad} -\ncline{->}{org}{rad} -\naput[nrot=:U]{\rmit{radius}} +\ncline[linecolor=TealBlue]{->}{org}{rad} +\naput[nrot=:U]{\textcolor{TealBlue}{\rmit{radius}}} % \end{pspicture} \caption{\CMD{psdisk} macro} @@ -830,7 +864,7 @@ It draws a solid disk centered at \rmit{coor} with radius \rmit{radius} as depic %%======================================================================= -\begin{LTXexample} +\begin{LTXexample}[width=8cm] \begin{pspicture}[showgrid=true](5,2) \psdisk[fillcolor=red](1,1){.5} \psdisk[fillcolor=blue](3,1){1} @@ -843,23 +877,25 @@ It draws a solid disk centered at \rmit{coor} with radius \rmit{radius} as depic \subsection{psring} \begin{syntax} -\CMD{psring}\keys(\rmit{coor})\{\rmit{inner-radius}\}\{\rmit{outer-radius}\} +\CMD{psring}\Keys\Coor\{\rmit{inner-radius}\}\{\rmit{outer-radius}\} \end{syntax} -This macro draws a solid ring centered at \rmit{coor} with inner radius \rmit{inner-radius} and outer radius \rmit{outer-radius} as shown in Figure~\ref{fig:psring}. The fill color is specified by the \texttt{fillcolor} key. This macro is used to shade the region of convergence of a system in the $z$ plane. +This macro draws a solid ring centered at \Coor* with inner radius \rmit{inner-radius} and outer radius \rmit{outer-radius} as shown in Figure~\ref{fig:psring}. The fill color is specified by the \texttt{fillcolor} key. This macro is used to shade the region of convergence of a system in the $z$ plane. + %%======================================================================= \begin{figure}[ht!] \centering \begin{pspicture}[showgrid=false](-2,-2)(2,2) % -\psring[fillcolor=blue!20](0,0){1}{2} +\psring[fillcolor=orange!20](0,0){1}{2} % \dotnode[linecolor=red](0,0){org} -\nput{-90}{org}{\textcolor{red}{\rmit{coor}}} +\nput{-90}{org}{\textcolor{red}{\Coor}} \pnode(1;0){rad1} -\pnode(2;50){rad2} -\ncline{->}{org}{rad1} \naput[nrot=:U,npos=1.25]{{\footnotesize\rmit{inner-radius}}} -\ncline{->}{org}{rad2} \naput[nrot=:U]{{\footnotesize\rmit{outer-radius}}} +\pnode(2;60){rad2} +\psset{linecolor=TealBlue} +\ncline{->}{org}{rad1} \naput[nrot=:U,npos=1.25]{{\footnotesize\color{TealBlue}\rmit{inner-radius}}} +\ncline{->}{org}{rad2} \naput[nrot=:U]{{\footnotesize\color{TealBlue}\rmit{outer-radius}}} % \end{pspicture} \caption{\CMD{psring} macro} @@ -868,9 +904,7 @@ This macro draws a solid ring centered at \rmit{coor} with inner radius \rmit{in %%======================================================================= - - -\begin{LTXexample} +\begin{LTXexample}[width=8cm] \begin{pspicture}[showgrid=true](5,2) \psring[fillcolor=red](1,1){.5}{1} \psring[fillcolor=green](3,1){.25}{.5} @@ -883,30 +917,31 @@ This macro draws a solid ring centered at \rmit{coor} with inner radius \rmit{in \subsection{psdiskc} \begin{syntax} -\CMD{psdiskc}\keys(\rmit{coor})($x_0, y_0$)\{\rmit{radius}\} +\CMD{psdiskc}\Keys\Coor($x_0, y_0$)\{\rmit{radius}\} \end{syntax} -As shown in Figure~\ref{fig:psdiskc}, this macro shades the area confined between a circle centered at \rmit{coor} with radius \rmit{radius} and a rectangle centered at \rmit{coor} and side lengths $2x_0$ and $2y_0$. The fill color is specified by the \texttt{fillcolor} key. This macro is used to shade the region of convergence of a system in the $z$ plane. +As shown in Figure~\ref{fig:psdiskc}, this macro shades the area confined between a circle centered at \Coor* with radius \rmit{radius} and a rectangle centered at \Coor* with width $2x_0$ and height $2y_0$. The fill color is specified by the \texttt{fillcolor} key. This macro is used to shade the region of convergence of a system in the $z$ plane. + %%======================================================================= \begin{figure}[ht!] \centering \begin{pspicture}[showgrid=false](-4,-2)(3,2.15) % -\psdiskc[fillcolor=blue!20,framearc=0](0,0)(2,1.5){1} +\psdiskc[fillcolor=orange!20,framearc=0](0,0)(2,1.5){1} % \dotnode[linecolor=red](0,0){org} -\nput{-90}{org}{\textcolor{red}{\rmit{coor}}} +\nput{-90}{org}{\textcolor{red}{\Coor}} \pnode(1;45){rad} -\ncline{->}{org}{rad} \naput[nrot=:U]{{\small\rmit{radius}}} +\ncline[linecolor=TealBlue]{->}{org}{rad} \naput[nrot=:U]{{\small\color{TealBlue}\rmit{radius}}} \dotnode(2,1.5){a} \nput{45}{a}{$(x_0, y_0)$} \dotnode(-2,-1.5){b} \nput{225}{b}{$(-x_0, -y_0)$} % \rput(0,2){% -\psline{|<->|}(-2,0)(2,0) +\pstick[arrows=|<->|](0,0){2}% \rput*(0,0){$2x_0$}} % \rput(-2.5,0){% -\psline{|<->|}(0,-1.5)(0,1.5) +\pstick[arrows=|<->|]{90}(0,0){1.5}% \rput*{90}(0,0){$2y_0$}} % \end{pspicture} @@ -915,7 +950,7 @@ As shown in Figure~\ref{fig:psdiskc}, this macro shades the area confined betwee \end{figure} %%======================================================================= -\begin{LTXexample} +\begin{LTXexample}[width=7.5cm] \begin{pspicture}[showgrid=true](6,2) \psdiskc[fillcolor=red](1.5,1)(1.5,1){.5} \psdiskc[fillcolor=blue](4.5,1)(.5,1){.15} @@ -928,20 +963,21 @@ As shown in Figure~\ref{fig:psdiskc}, this macro shades the area confined betwee \subsection{psldots} \begin{syntax} -\CMD{psldots}\keys +\CMD{psldots}\Keys\Coor \end{syntax} -As depicted in Figure~\ref{fig:psldots}, this macro draws three dots each with diameter \texttt{ldotssize} on the same straight line. Every two consecutive dots are separated by \texttt{ldotssep}. The angle of the line on which the dots lie with the horizontal axis is controlled by the key \texttt{angle}. The key \texttt{scale} can be used to scale up or down the dot diameter (\texttt{ldotssize}) and the dot separation (\texttt{ldotssep}). The keys corresponding to \CMD{pslodots} are summarized in Table~\ref{tab:psldots}. +As depicted in Figure~\ref{fig:psldots}, this macro draws three dots each with diameter \texttt{ldotssize} on the same straight line, where the middle one is centered at \Coor*. Every two consecutive dots are separated by \texttt{ldotssep}. The angle of the line on which the dots lie with the horizontal axis is controlled by the key \texttt{angle}. The key \texttt{scale} can be used to scale up or down the dot diameter (\texttt{ldotssize}) and the dot separation (\texttt{ldotssep}). The keys corresponding to \CMD{pslodots} are summarized in Table~\ref{tab:psldots}. + %%======================================================================= \begin{figure}[ht!] \centering \begin{pspicture}[showgrid=false](-4,-2.5)(5,1.5) % -\psset{linecolor=teal} -\psline[linestyle=dashed](-4;15)(4.5;15) -\psline[linestyle=dashed](-4,0)(4.5,0) -\psarc(0,0){4}{0}{15} -\rput{-82.5}(4.25;7.5){{\ttfamily\color{teal}angle}} +\psset{linecolor=Salmon} +\psline[style=Dash](-4;15)(4.5;15) +\psline[style=Dash](-4,0)(4.5,0) +\psarc(0,0){3.85}{0}{15} +\rput[l](4;7.5){{\footnotesize\ttfamily\color{Salmon}angle}} \pnode(-3;15){L1} \rput(L1){\pnode(1.25;-75){L2}} \pnode(0,0){O1} @@ -949,22 +985,24 @@ As depicted in Figure~\ref{fig:psldots}, this macro draws three dots each with d \pnode(3;15){R1} \rput(R1){\pnode(1.25;-75){R2}} % -\psset{linecolor=purple,linestyle=dashed,style=Dash} +\psset{linecolor=TealBlue,style=Dash} \ncline{L1}{L2} \ncline{O1}{O2} \ncline{R1}{R2} % \psset{linestyle=solid} -\ncline{|<*->|*}{L2}{O2} \nbput[nrot=:U]{{\ttfamily\color{purple}ldotssep}} -\ncline{|<*->|*}{O2}{R2} \nbput[nrot=:U]{{\ttfamily\color{purple}ldotssep}} +\ncline{|<*->|*}{L2}{O2} \nbput[nrot=:U]{{\footnotesize\ttfamily\color{TealBlue}ldotssep}} +\ncline{|<*->|*}{O2}{R2} \nbput[nrot=:U]{{\footnotesize\ttfamily\color{TealBlue}ldotssep}} +% +\psline[style=Dash](-.5,0)(-.5,1) +\psline[style=Dash](.5,0)(.5,1) +\MarkDistInner(0,1){.5}[a]{{\footnotesize\ttfamily\color{TealBlue}ldotssize}} % -\psline[linestyle=dashed](-.5,0)(-.5,1) -\psline[linestyle=dashed](.5,0)(.5,1) -\psline{|<*->|*}(-.5,1)(.5,1) -\rput(0,1.25){{\ttfamily\color{purple}ldotssize}} +\psldots[ldotssize=1,ldotssep=3,angle=15,linecolor=gray](0,0) % -\psset{linecolor=black} -\rput(0,0){\psldots[ldotssize=1,ldotssep=3,angle=15]} +\dotnode[linecolor=red](0,0){org} +\pssignal(-2.5,1){coor}{\textcolor{red}{\Coor}} +\ncline[linecolor=red]{->}{coor}{org} % \end{pspicture} \caption{\CMD{psldots} macro} @@ -973,51 +1011,111 @@ As depicted in Figure~\ref{fig:psldots}, this macro draws three dots each with d %%======================================================================= \begin{table}[ht!] \centering -\caption{\CMD{psldots} Keys} +\caption{\CMD{psldots} keys} \label{tab:psldots} -\begin{keytable}{2.15in} -ldotssize & num[dimen] & $0.05$ & Dot diameter \\ -ldotssep & num[dimen] & $0.15$ & Distance between consecutive dots \\ -angle & angle & $0$ & Dots angle \\ -scale & num & $1$ & Scale factor \\ +\begin{keytable}{2.45in} +ldotssize & num[dimen] & $0.05$ & Dot diameter \\ +ldotssep & num[dimen] & $0.15$ & Distance between consecutive dots \\ +angle & angle & $0$ & Dots angle \\ +scale & num & $1$ & Scale factor \\ \end{keytable} \end{table} %%======================================================================= -\begin{LTXexample} +\begin{LTXexample}[width=8.5cm] \begin{pspicture}[showgrid=true](6,2) - \rput(1,1){\psldots} - \rput(2,1){\psldots[angle=45]} - \rput(4,1){\psldots[angle=90,ldotssize=.1]} - \rput(3,1){\psldots[angle=90,ldotssep=.5]} - \rput(5,1){\psldots[angle=90,scale=3]} + \psldots(1,1) + \psldots[angle=45](2,1) + \psldots[angle=90,ldotssize=.1](4,1) + \psldots[angle=90,ldotssep=.5](3,1) + \psset{linecolor=blue} + \psldots[angle=90,scale=3](5,1) \end{pspicture} \end{LTXexample} + +\subsection{ldotsnode} + +\begin{syntax} +\CMD{ldotsnode}\Keys\Coor\Node +\end{syntax} + +This macro is very similar to the \CMD{psldots} macro. The only difference is that the \CMD{ldotsnode} places the dots inside an invisible frame and turns that frame into a node labeled \Node* as shown in Figure~\ref{fig:ldotsnode}. The frame is separated from the dots by half \texttt{signalsep}. + +%%======================================================================= +\begin{figure}[ht!] +\centering +\begin{pspicture}[showgrid=false](-4,-2.5)(5.5,2) +% +\psset{linecolor=Salmon} +\psline[style=Dash](-4;15)(5;15) +\psline[style=Dash](-4,0)(5,0) +\psarc(0,0){4.5}{0}{15} +\rput[l](4.65;7.5){{\footnotesize\ttfamily\color{Salmon}angle}} +% +\psldots[ldotssize=1,ldotssep=3,angle=15,linecolor=gray](0,0) +% +\dotnode[linecolor=red](0,0){org} +\pssignal(0,-1.5){coor}{\textcolor{red}{\Coor}} +\ncline[linecolor=red,nodesepA=.15]{->}{coor}{org} +% +\psset{linecolor=TealBlue!50} +\rput{15}(0,0){\psframe(-3.5,-.5)(3.5,.5)} +\rput{15}(0,0){\psframe(-4,-1)(4,1)} +% +\rput(.75;105){% +\MarkDistOuter{-75}(-1.75;15){.25}[a]{{\ttfamily\footnotesize\color{TealBlue}$0.5$signalsep}}} +% +\end{pspicture} +\caption{\CMD{ldotsnode} macro} +\label{fig:ldotsnode} +\end{figure} +%%======================================================================= + + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}[showgrid=true](-2,-2)(2,2) + \pssignal(1.5;0){a}{$a$} + \pssignal(1.5;90){b}{$b$} + \pssignal(1.5;180){c}{$c$} + \pssignal(1.5;270){d}{$d$} + \ldotsnode(0,0){dots} + %----------------- + \ncline{a}{dots} + \ncline{b}{dots} + \ncline{c}{dots} + \ncline{d}{dots} +\end{pspicture} +\end{LTXexample} + + + + + \subsection{psblock} \begin{syntax} -\CMD{psblock}\keys(\rmit{coor})\{\rmit{node}\}\{\rmit{stuff}\} +\CMD{psblock}\Keys\Coor\Node\Stuff \end{syntax} -This macro places \rmit{stuff} at coordinate \rmit{coor}, encloses it in a rectangular frame, and turns that into a node labeled \rmit{node}. The separation between the \rmit{stuff} and the frame is controlled by the \texttt{framesep} key. +This macro places \Stuff* at coordinate \Coor*, encloses it in a rectangular frame, and turns that frame into a node labeled \Node*. The separation between the \Stuff* and the frame is controlled by the \texttt{framesep} key. -\begin{LTXexample} -\begin{pspicture}[showgrid=true](6,2) - \rput(0,1){\rnode{x}{$x[n]$}} - \psblock(1.5,1){a}{$z^{-1}$} - \psblock(4,1){b}{$h[n], H(z)$} - \rput(6,1){\rnode{y}{$y[n]$}} - %----------------- - \psset{style=Arrow} - \ncline[nodesepA=.15]{x}{a} - \ncline{a}{b} - \ncline[nodesepB=.15]{b}{y} +\begin{LTXexample}[width=9cm] +\begin{pspicture}[showgrid=true](7,2) + \pssignal(0,1){x}{$x[n]$} + \psblock(2,1){a}{$z^{-1}$} + \psblock(5,1){b}{$h[n], H(z)$} + \pssignal(7,1){y}{$y[n]$} + %----------------- + \psset{arrows=->} + \ncline{x}{a} + \ncline{a}{b} + \ncline{b}{y} \end{pspicture} \end{LTXexample} @@ -1027,67 +1125,70 @@ This macro places \rmit{stuff} at coordinate \rmit{coor}, encloses it in a recta \subsection{psfblock} \begin{syntax} -\CMD{psfblock}\keys(\rmit{coor})\{\rmit{node}\}\{\rmit{stuff}\} +\CMD{psfblock}\Keys\Coor\Node\Stuff \end{syntax} -This macro is very similar to the \CMD{psblock} macro except that the size of the frame is controlled by the key \texttt{framesize}. The frame size is specified as \texttt{framesize=\rmit{num1[dimen]} \rmit{num2[dimen]}}. Note that \rmit{num1} and \rmit{num2} are separated by a space, not by comma. If \rmit{num2} is absent, then a square frame is created. - +This macro is very similar to the \CMD{psblock} macro except that the size of the frame is controlled by the key \texttt{framesize}. The frame size is specified as \texttt{framesize=\rmit{num1[dimen]} \rmit{num2[dimen]}} in which \rmit{num1} and \rmit{num2} are separated by a space, not by a comma. If \rmit{num2} is absent, then a square frame is created. -\begin{LTXexample} +\begin{LTXexample}[width=7.5cm] \begin{pspicture}[showgrid=true](6,2) - \rput(0,1){\rnode{x}{$x[n]$}} + \pssignal(0,1){x}{$x[n]$} \psfblock[framesize=.75 .5](2,1){a}{$H_1$} \psfblock[framesize=1.5 1](4,1){b}{$H_2$} - \rput(6,1){\rnode{y}{$y[n]$}} + \pssignal(6,1){y}{$y[n]$} %----------------- - \psset{style=Arrow} - \ncline[nodesepA=.15]{x}{a} + \psset{arrows=->} + \ncline{x}{a} \ncline{a}{b} - \ncline[nodesepB=.15]{b}{y} + \ncline{b}{y} \end{pspicture} \end{LTXexample} + + \subsection{psusampler} \begin{syntax} -\CMD{psusampler}\keys(\rmit{coor})\{\rmit{node}\}\{\rmit{stuff}\} +\CMD{psusampler}\Keys\Coor\Node\Stuff \end{syntax} -This macro is similar to the \CMD{psfblock} except that \rmit{stuff} is placed next to an up-arrow in math mode representing an up-sampler. \emph{Notice that \rmit{stuff} must be in text mode, not in the math mode, i.e., do not put \$ around \rmit{stuff}.} +This macro is similar to the \CMD{psfblock} except that \Stuff* is placed next to an up-arrow in the math mode representing an up-sampler. \emph{It is important to remember that \Stuff* must be in the text mode, not in the math mode, i.e., do not put \$ around \Stuff*.} -\begin{LTXexample} +\begin{LTXexample}[width=8cm] \begin{pspicture}[showgrid=true](6,2) - \rput(0,1){\rnode{x}{$x[n]$}} + \pssignal(0,1){x}{$x[n]$} \psusampler[framesize=1 .75](3,1){a}{2} - \rput(6,1){\rnode{y}{$y[n]$}} + \pssignal(6,1){y}{$y[n]$} %----------------- - \psset{style=Arrow} - \ncline[nodesepA=.15]{x}{a} - \ncline[nodesepB=.15]{a}{y} + \psset{arrows=->} + \ncline{x}{a} + \ncline{a}{y} \end{pspicture} \end{LTXexample} + + \subsection{psdsampler} \begin{syntax} -\CMD{psdsampler}\keys(\rmit{coor})\{\rmit{node}\}\{\rmit{stuff}\} +\CMD{psdsampler}\Keys\Coor\Node\Stuff \end{syntax} -This macro is similar to the \CMD{psfblock} except that \rmit{stuff} is placed next to a down-arrow in math mode representing a down-sampler. \emph{Notice that \rmit{stuff} must be in text mode, not in the math mode, i.e., do not put \$ around \rmit{stuff}.} +This macro is similar to the \CMD{psfblock} except that \Stuff* is placed next to a down-arrow in the math mode representing a down-sampler. \emph{It is important to remember that \Stuff* must be in the text mode, not in the math mode, i.e., do not put \$ around \Stuff*.} -\begin{LTXexample} +\begin{LTXexample}[width=8cm] \begin{pspicture}[showgrid=true](6,2) - \rput(0,1){\rnode{x}{$x[n]$}} + \pssignal(0,1){x}{$x[n]$} \psdsampler[framesize=1 .75](3,1){a}{3} - \rput(6,1){\rnode{y}{$y[n]$}} + \pssignal(6,1){y}{$y[n]$} %----------------- - \psset{style=Arrow} - \ncline[nodesepA=.15]{x}{a} - \ncline[nodesepB=.15]{a}{y} + \psset{arrows=->} + \ncline{x}{a} + \ncline{a}{y} \end{pspicture} \end{LTXexample} @@ -1097,36 +1198,332 @@ This macro is similar to the \CMD{psfblock} except that \rmit{stuff} is placed n \subsection{nclist} \begin{syntax} -\CMD{nclist}\keys\{\rmit{nc-macro}\}\{\rmit{node-list}\} +\CMD{nclist}\Keys\Arrows\{\rmit{nc-macro}\}\List \\ +\CMD{nclist}\Keys\Arrows\{\rmit{nc-macro}\}[\rmit{nc-label}]\List \end{syntax} -This macro is very useful when connecting several nodes using a single node-connecting macro. The \rmit{node-list} must be a comma-separated list of nodes. If \rmit{node-list} is $n_1, n_2, n_3, \dotsc$ is a list of nodes, then \CMD{nclist} connects $n_1$ to $n_2$, $n_2$ to $n_3$, and so forth all using the macro \rmit{nc-macro}. +This macro is very useful when sequentially connecting several nodes using a single node-connecting macro. In addition, it is capable of labeling the node connections. The \List* must be a comma-separated list of items. Possible uses of the \CMD{nclist} are summarized below. +\begin{itemize} +\item \CMD{nclist}\Keys\Arrows\{\rmit{nc-macro}\}\{$n_1, n_2, n_3, \dotsc$\} connects the node $n_{i-1}$ to the node $n_i$, for all $i = 2, 3, \dotsc$, using the macro \rmit{nc-macro}. + +\item \CMD{nclist}\Keys\Arrows\{\rmit{nc-macro}\}[\rmit{nc-label}]\{$n_1, n_2 \; l_2, n_3 \; l_3, \dotsc$\} connects the node $n_{i-1}$ to the node $n_i$, for all $i = 2, 3, \dotsc$, using the macro \rmit{nc-macro}. Moreover, it puts the label $l_i$ on the connection $n_{i-1}$--$n_i$, for all $i = 2, 3, \dotsc$, using the macro \rmit{nc-label}. It is important to remember the following. + \begin{enumerate} + \item In the list, the node $n_i$ and the label $l_i$ are separated by a space. If the label contains spaces, then it must be enclosed in double curly braces, i.e., $n_i \; \{\{l_i\}\}$. + \item The first element of the list must be a single node ($n_1$); it should not have any labels. + \end{enumerate} + +\item \CMD{nclist}\Keys\Arrows\{\rmit{nc-macro}\}[\rmit{nc-label}]\{$n_1, n_2 \; \mathtt{ncl}_2 \; l_2, n_3 \; \mathtt{ncl}_3 \; l_3, \dotsc$\} connects the node $n_{i-1}$ to the node $n_i$, for all $i = 2, 3, \dotsc$, using the macro \rmit{nc-macro}. Moreover, it puts the label $l_i$ on the connection $n_{i-1}$--$n_i$ using the macro $\mathtt{ncl}_i$ for all $i = 2, 3, \dotsc$. If for some $i$, $\mathtt{ncl}_i$ is empty, then the macro \rmit{nc-label} is used. In other words, the \rmit{nc-label} is the default macro for labeling connections when such macro is not explicitly present in the list. It is important to remember the following. + \begin{enumerate} + \item In the list, the node $n_i$, the connection-labeling macro $\mathtt{ncl}_i$, and the label $l_i$ are separated by spaces. If the label contains spaces, then it must be enclosed in double curly braces, i.e., $n_i \; \mathtt{ncl}_i \; \{\{l_i\}\}$. + \item The first element of the list must be a single node ($n_1$); it should not have any labels. + \end{enumerate} +\end{itemize} -\begin{LTXexample} + +\begin{LTXexample}[width=8.5cm] \begin{pspicture}[showgrid=true](6,2) \psblock(1,1){a}{A} \psblock(2.5,1){b}{B} \psblock(4,1){c}{C} \psblock(5.5,1){d}{D} - \nclist[style=Arrow]{ncline}{a,b,c,d} + \nclist{->}{ncline}{a,b,c,d} \end{pspicture} \end{LTXexample} -\begin{LTXexample} +\begin{LTXexample}[width=8.5cm] \begin{pspicture}[showgrid=true](6,2) \dotnode(0,1){a} \dotnode(1.5,1){b} \dotnode(3,1){c} \dotnode(4.5,1){d} \dotnode(6,1){e} - \psset{style=ArrowIn,arcangle=35} - \psset{linecolor=red} + \psset{arcangle=50,linecolor=blue} \nclist{ncarc}{a,b,c,d,e} \end{pspicture} \end{LTXexample} +\begin{LTXexample}[width=8.5cm] +\begin{pspicture}[showgrid=true](6,2) + \dotnode(.5,1){a} + \dotnode(2,1){b} + \dotnode(3.5,1){c} + \dotnode(5,1){d} + \nclist{ncline}[naput]% + {a,b $1$,c,d {{$3$ $4$}}} +\end{pspicture} +\end{LTXexample} + + +\begin{LTXexample}[width=8.5cm] +\begin{pspicture}[showgrid=true](6,2) + \dotnode(.5,1){a} + \dotnode(2,1){b} + \dotnode(3.5,1){c} + \dotnode(5,1){d} + \nclist{ncline}[naput]% + {a,b $1$,c nbput $2$,d ncput $3$} +\end{pspicture} +\end{LTXexample} + + + + + +\subsection{ncstar} + +\begin{syntax} +\CMD{ncstar}\Keys\Arrows\{\rmit{nc-macro}\}\List\{\rmit{Node}\} \\ +\CMD{ncstar}\Keys\Arrows\{\rmit{nc-macro}\}[\rmit{nc-label}]\List\{\rmit{Node}\} +\end{syntax} + +This macro is used to connect several nodes to a single node. It is also capable of labeling the node connections. The \List* must be a comma-separated list of items. Possible uses of the \CMD{ncstar} are summarized below. +\begin{itemize} +\item \CMD{ncstar}\Keys\Arrows\{\rmit{nc-macro}\}\{$n_1, n_2, \dotsc$\}\{$N$\} connects the node $n_i$ to the node $N$, for all $i = 1, 2, \dotsc$, using the macro \rmit{nc-macro}. + +\item \CMD{ncstar}\Keys\Arrows\{\rmit{nc-macro}\}[\rmit{nc-label}]\{$n_1 \; l_1, n_2 \; l_2, \dotsc$\} connects the node $n_i$ to node $N$, for all $i = 1, 2, \dotsc$, using the macro \rmit{nc-macro}. Moreover, it puts the label $l_i$ on the connection $n_i$--$N$, for all $i = 1, 2, \dotsc$, using the macro \rmit{nc-label}. It is important to remember that the node $n_i$ and the label $l_i$ are separated by a space in the list. If the label contains spaces, then it must be enclosed in double curly braces, i.e., $n_i \; \{\{l_i\}\}$. + +\item \CMD{ncstar}\Keys\Arrows\{\rmit{nc-macro}\}[\rmit{nc-label}]\{$n_1 \; \mathtt{ncl}_1 \; l_1, n_2 \; \mathtt{ncl}_2 \; l_2, \dotsc$\}\{$N$\} connects node $n_i$ to node $N$, for all $i = 1, 2, \dotsc$, using the macro \rmit{nc-macro}. Moreover, it puts the label $l_i$ on the connection $n_i$--$N$ using the macro $\mathtt{ncl}_i$ for all $i = 1, 2, \dotsc$. If for some $i$, $\mathtt{ncl}_i$ is empty, then the macro \rmit{nc-label} is used. In other words, the \rmit{nc-label} is the default macro for labeling connections when such macro is not explicitly present in the list. It is important to remember that the node $n_i$ and the label $l_i$ are separated by a space in the list. If the label contains spaces, then it must be enclosed in double curly braces, i.e., $n_i \; \mathtt{ncl}_i \; \{\{l_i\}\}$. +\end{itemize} + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}[showgrid=true](0,-2)(3,2) + \pssignal(1,1){x1}{$x_1$} + \pssignal(1,0){x2}{$x_2$} + \pssignal(1,-1){x3}{$x_3$} + \pscircleop(2.5,0){oplus} + \ncstar{->}{ncline}{x1,x2,x3}{oplus} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}[showgrid=true](-2,-1)(2,2) + \pssignal(-1.5,0){a}{$a$} + \pssignal(0,1.5){b}{$b$} + \pssignal(1.5,0){c}{$c$} + \pssignal(0,0){d}{$d$} + \ncstar{ncline}[naput]% + {a $1$,b {{$2$ $3$}},c}{d} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}[showgrid=true](0,-2)(5,2) + \psblock(1,1){a}{$a$} + \psblock(1,0){b}{$b$} + \psblock(1,-1){c}{$c$} + \pscircleop(3,0){oplus} + \pssignal(4.5,0){y}{$y$} + \psset{labelsep=.1,npos=.25} + \ncstar{->}{ncline}[naput]% + {a $x_1$,b $x_2$,c nbput $x_3$}{oplus} + \ncline{->}{oplus}{y} +\end{pspicture} +\end{LTXexample} + + + + +\section{Extras} +\label{sec:extras} + +In addition to the macros introduced in Section~\ref{sec:macros}, the \PSTSigSys package defines some extra styles and brace macros introduced in this section. Usages of these styles and macros are shown in Section~\ref{sec:examples} with some examples. + + + +\subsection{New Styles} + +The \PSTSigSys package defines a few useful PSTricks styles for drawling arrows and dashed lines as shown in Figure~\ref{fig:styles}. Some of these styles, which are shown in Figure~\ref{subfig:pstricks-add styles}, can be used only with the \texttt{pstricks-add} package. + +%%======================================================================= +\begin{figure}[ht!] +\centering +%%---------------------------------- +\subfloat[\texttt{pstricks} styles\label{subfig:pstricks styles}]{% +\begin{pspicture}[showgrid=false](0,-.5)(5,5) +% +\rput[l](0,4.5){Default arrow} +\rput[l](2.75,4.5){\psline{->}(2,0)} +% +\rput[l](0,3.75){Arrow} +\rput[l](2.75,3.75){\psline[style=Arrow](2,0)} +% +\rput[l](0,3){Default dash} +\rput[l](2.75,3){\psline[style=Dash](2,0)} +% +\rput[l](0,2.25){Dash} +\rput[l](2.75,2.25){\psline[style=Dash](2,0)} +% +\rput[l](0,1.5){Default line} +\rput[l](2.75,1.5){\psline(2,0)} +% +\rput[l](0,.75){Graph} +\rput[l](2.75,.75){\psline[style=Graph](2,0)} +% +\rput[l](0,0){Stem} +\rput[l](2.75,0){\psline[style=Stem]{-*}(2,0)} +% +\end{pspicture}} +%%---------------------------------- +\hspace{1cm} +%%---------------------------------- +\subfloat[\texttt{pstricks-add} styles\label{subfig:pstricks-add styles}]{% +\begin{pspicture}[showgrid=false](0,-.5)(5,5) +% +\rput[l](0,.75){ArrowIn} +\rput[l](2.5,.75){\psline[style=ArrowIn](2,0)} +% +\rput[l](0,0){DashDot} +\rput[l](2.5,0){\psline[style=DashDot](2,0)} +% +\end{pspicture}} +%%---------------------------------- +\caption{New styles} +\label{fig:styles} +\end{figure} +%%======================================================================= + +In addition, the \PSTSigSys package defines the style \texttt{RoundCorners} that makes the following settings. +\begin{verbatim} + framesep=0.125 + framearc=0.25 + linearc=0.1 +\end{verbatim} +The author believes that when drawing block diagrams, it is more elegant to have round corners. + + + +\subsection{Brace Macros} + +The \PSTSigSys package defines four new macros \CMD{psBraceUp}, \CMD{psBraceDown}, \CMD{psBraceRight}, and \CMD{psBraceLeft} that are derived from the \CMD{psbrace} macro (using the \CMD{newpsobject} macro) defined by the \texttt{pstricks-add} package. Their syntaxes are exactly the same as that of the \CMD{psbrace} macro. The usage of these macros is shown by the following examples. + +\begin{LTXexample}[width=8cm] +\begin{pspicture}[showgrid=true](5,3) + \psframe(1,1)(4,2) + \psset{linecolor=blue} + \psBraceUp[nodesepB=-.5](4,2)(1,2){Up} + \psBraceDown(1,1)(4,1){Down} + \psBraceRight(4,1)(4,2){Right} + \psBraceLeft(1,2)(1,1){Left} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=8cm] +\begin{pspicture}[showgrid=true](4,3) + \psset{linecolor=red} + \dotnode(1,1){a} + \dotnode(3,2){b} + + \psset{linecolor=blue} + \psBraceUp*(b)(a){up} + \psBraceDown*(a)(b){down} +\end{pspicture} +\end{LTXexample} + + + + +\subsection{Golden Ratio} + +The \PSTSigSys package defines four keys \texttt{gratioWh}, \texttt{gratioWv}, \texttt{gratioHh}, and \texttt{gratioHv} for determining the frame size by the golden ratio $\varphi$ defined as +\[ +\varphi = \frac{1 + \sqrt{5}}{2} \approx 1.61803398875\enspace. +\] +The ancient Greeks thought a rectangle is the most pleasing to the eye if its edges $a$ and $b$ were in the proportion $a \colon b = \varphi$ \cite{Rotman:00}. In the \texttt{gratio} keys, the capital letters \texttt{W} and \texttt{H} stand for the width and the height of the frame, respectively. The ending letters \texttt{h} and \texttt{v} imply whether the frame is horizontal or vertical, respectively. In a horizontal frame, the longest edge is horizontal while in a vertical one, the longest edge is vertical. + +The four aforementioned keys set one of the edges of a frame as given by the user and determine the other one by the golden ratio $\varphi$ as follows. +\begin{itemize} +\item The key assignment $\mathtt{gratioWh} = a$ sets the width of the frame to $a$ and the height to $a / \varphi$ as in Figure~\ref{subfig:gratioWh}. +\item The key assignment $\mathtt{gratioWv} = a$ sets the width of the frame to $a$ and the height to $a \varphi$ as in Figure~\ref{subfig:gratioWv}. +\item The key assignment $\mathtt{gratioHh} = a$ sets the height of the frame to $a$ and the width to $a \varphi$ as in Figure~\ref{subfig:gratioHh}. +\item The key assignment $\mathtt{gratioHv} = a$ sets the height of the frame to $a$ and the width to $a / \varphi$ as in Figure~\ref{subfig:gratioHv}. +\end{itemize} + +%%======================================================================= +\begin{figure}[ht!] +\centering +%%---------------------------------- +\subfloat[$\mathtt{gratioWh} = a$ \label{subfig:gratioWh}]{ +\begin{pspicture}[showgrid=false](-1.5,-1.5)(1.5,1.5) +% +\fnode[gratioWh=2](0,0){a} +% +\rput(0,-.918){% +\psline[linecolor=TealBlue]{|-|}(-1,0)(1,0)% +\rput*(0,0){\textcolor{TealBlue}{$\scriptstyle a$}}% +} +% +\rput(-1.3,0){% +\psline[linecolor=TealBlue]{|-|}(0,-.618)(0,.618)% +\rput*{90}(0,0){\textcolor{TealBlue}{$\scriptstyle a / \varphi$}}% +} +% +\end{pspicture}} +%%---------------------------------- +\hspace{.5cm} +%%---------------------------------- +\subfloat[$\mathtt{gratioWv} = a$ \label{subfig:gratioWv}]{ +\begin{pspicture}[showgrid=false](-1.5,-1.5)(1.5,1.5) +% +\fnode[gratioWv=1.23607](0,0){a} +% +\rput(0,-1.3){% +\psline[linecolor=TealBlue]{|-|}(-.618,0)(.618,0)% +\rput*(0,0){\textcolor{TealBlue}{$\scriptstyle a$}}% +} +% +\rput(-.918,0){% +\psline[linecolor=TealBlue]{|-|}(0,-1)(0,1)% +\rput*{90}(0,0){\textcolor{TealBlue}{$\scriptstyle a \varphi$}}% +} +% +\end{pspicture}} +%%---------------------------------- +\hspace{.5cm} +%%---------------------------------- +\subfloat[$\mathtt{gratioHh} = a$ \label{subfig:gratioHh}]{ +\begin{pspicture}[showgrid=false](-1.5,-1.5)(1.5,1.5) +% +\fnode[gratioHh=1.23607](0,0){a} +% +\rput(0,-.918){% +\psline[linecolor=TealBlue]{|-|}(-1,0)(1,0)% +\rput*(0,0){\textcolor{TealBlue}{$\scriptstyle a \varphi$}}% +} +% +\rput(-1.3,0){% +\psline[linecolor=TealBlue]{|-|}(0,-.618)(0,.618)% +\rput*{90}(0,0){\textcolor{TealBlue}{$\scriptstyle a$}}% +} +% +\end{pspicture}} +%%---------------------------------- +\hspace{.5cm} +%%---------------------------------- +\subfloat[$\mathtt{gratioHv} = a$ \label{subfig:gratioHv}]{ +\begin{pspicture}[showgrid=false](-1.5,-1.5)(1.5,1.5) +% +\fnode[gratioHv=2](0,0){a} +% +\rput(0,-1.3){% +\psline[linecolor=TealBlue]{|-|}(-.618,0)(.618,0)% +\rput*(0,0){\textcolor{TealBlue}{$\scriptstyle a / \varphi$}}% +} +% +\rput(-.918,0){% +\psline[linecolor=TealBlue]{|-|}(0,-1)(0,1)% +\rput*{90}(0,0){\textcolor{TealBlue}{$\scriptstyle a$}}% +} +% +\end{pspicture}} +%%---------------------------------- +\caption{Setting the size of a frame by the golden ratio $\varphi$} +\label{fig:golden ratio} +\end{figure} +%%======================================================================= + + %%======================================================================= %% Examples @@ -1137,42 +1534,39 @@ This macro is very useful when connecting several nodes using a single node-conn \section{Examples} \label{sec:examples} -In this section, we provide some examples to illustrate the benefits and usage of macros defined in Section~\ref{sec:graphical macros}. Note that some of these examples require the use of additional packages. In that case, additional packages are mentioned next to the example number. +In this section, we provide some examples to illustrate the benefits and usages of the macros and styles defined in Sections~\ref{sec:macros} and \ref{sec:extras}. Some of these examples require the use of additional packages. In that case, additional packages are mentioned next to the example number. +\newpage \subsection{Complex Number} -%%------------------------ -%%--- example ------------ -%%------------------------ - -\Example{pstricks-add} Show the complex number $c = a + j b = \rho e^{j\theta}$ as a point in the complex plane. +\Example{use \texttt{pstricks-add}} Show the complex number $c = a + j b = \rho e^{j\theta}$ as a point in the complex plane. \bigskip \begin{LTXexample} \begin{pspicture}[showgrid=true](-1,-1)(3,3) %--- Drawing axes --- - \psaxeslabels[xlpos=t](0,0)(0,0)(3,3){\RE}{\IM} + \psaxeslabels[xlpos=t](0,0)(0,0)(3,3){$\Re$}{$\Im$} %--- Defining some useful nodes --- - \dotnode[linecolor=blue](2,2){c} + \dotnode[linecolor=purple](2,2){c} \pnode(0,0){org} \pnode(2,0){a} \pnode(0,2){b} %--- Connecting nodes --- \ncline{org}{c} - \ncline[linecolor=gray,style=Dash]{c}{a} - \ncline[linecolor=gray,style=Dash]{c}{b} + \ncline[style=Dash,linecolor=gray]{c}{a} + \ncline[style=Dash,linecolor=gray]{c}{b} %--- Labeling --- - \color{purple} - \psset{linecolor=purple,arrows=|-|,nrot=:U} - \psbrace*[style=BraceDown](org)(a){$a$} - \psbrace*[style=BraceLeft](b)(org){$b$} - \ncline[offset=.25]{org}{c} \ncput*{$\rho$} + \color{blue} + \psset{linecolor=blue,nrot=:U} + \psBraceDown*(org)(a){$a$} + \psBraceLeft*(b)(org){$b$} + \ncline[offset=.25]{|*-|*}{org}{c} \ncput*{$\rho$} \psarc[linecolor=gray](org){.75}{0}{45} \rput(1;22.5){$\theta$} \end{pspicture} @@ -1180,15 +1574,12 @@ In this section, we provide some examples to illustrate the benefits and usage o + \newpage \subsection{Plotting} -%%------------------------ -%%--- example ------------ -%%------------------------ - -\Example{pst-plot} Consider the continuous-time signal +\Example{use \texttt{pst-plot}} Draw the sampled sequence $x[n] = x_c(\pi n/4)$, where \[ x_c(t) = \begin{cases} @@ -1196,7 +1587,6 @@ x_c(t) = 0\enspace, & t < 0\enspace. \end{cases} \] -Draw the sampled sequence $x[n] = x_c(\pi n/4)$. \bigskip @@ -1206,7 +1596,7 @@ Draw the sampled sequence $x[n] = x_c(\pi n/4)$. \psaxeslabels(0,0)(-3,-2)(9,2){$n$}{$x[n]$} %--- x_c(t) --- - \psplot[style=Graph,linecolor=gray,linestyle=dashed]{0}{8}{x 45 mul sin} + \psplot[style=Graph,style=Dash,linecolor=gray]{0}{8}{x 45 mul sin} %--- x[n] --- \psset{style=Stem,linecolor=teal,stemtagformat={\color{blue}\scriptstyle}} @@ -1215,10 +1605,11 @@ Draw the sampled sequence $x[n] = x_c(\pi n/4)$. %--- Labeling the origin --- \uput[-45](0,0){$\color{blue}\scriptstyle 0$} - + %--- Horizontal ticks ---- - \pshtick[linecolor=gray](0,1){.1} - \pshtick[linecolor=gray](0,-1){.1} + \psset{ticklength=.1,linecolor=gray} + \psTick(0,1) + \psTick(0,-1) \uput[180](0,1){$\scriptstyle 1$} \uput[180](0,-1){$\scriptstyle -1$} \end{pspicture} @@ -1226,49 +1617,42 @@ Draw the sampled sequence $x[n] = x_c(\pi n/4)$. + \newpage -%%------------------------ -%%--- example ------------ -%%------------------------ +\subsection{Sampling} -\Example{pst-plot} Consider the process of sampling a continuous-time signal $x_c(t)$ with period $T$ as follows: (1) Multiply $x_c(t)$ by the impulse train $s(t) = \sum_{n=-\infty}^\infty \delta(t - nT)$ to obtain $x_s(t) = x_c(t) s(t)$, and (2) Convert every delta in $x_s(t)$ into a sequence to obtain the sampled sequence $x[n]$. Demonstrate this process for the continuous-time signal $x_c(t) = 0.5\sin(\pi t/2) + 0.5$ and $T = 1$. +\Example{use \texttt{pst-plot} and \texttt{multido}} Consider the process of sampling a continuous-time signal $x_c(t)$ with period $T$: (1) multiply $x_c(t)$ by the impulse train $s(t) = \sum_{n=-\infty}^\infty \delta(t - nT)$ to get $x_s(t) = x_c(t) s(t)$, and (2) convert every delta in $x_s(t)$ into a sequence to get the sequence $x[n]$. Demonstrate this process for the continuous-time signal $x_c(t) = 0.5\sin(\pi t/2) + 0.5$ and $T = 1$. \begin{LTXexample} \begin{pspicture}[showgrid=true](-7,-5)(7,1) - %--- Some settings and definitions --- - \psset{plotpoints=500,ylpos=l,stemtag} - \def\plotsin[#1]{\psplot[#1]{-6}{6}{x 90 mul sin .5 mul .5 add}} + \psset{plotpoints=500,stemtag} %--- x_c(t) --- \psaxeslabels(0,0)(-7,0)(7,0){$t$}{} \rput[tl](-7,1){$x_c(t)$} - \plotsin[style=Graph,linecolor=teal] - \multips(-6,0)(1,0){13}{\psline[linecolor=gray](0,-.075)(0,.075)} + \psplot[style=Graph,linecolor=blue]{-6}{6}{x 90 mul sin .5 mul .5 add} + \multirput(-6,0)(1,0){13}{\pstick[linecolor=gray]{90}(0,0){.075}} \multido{\nn=-6+1}{13}{\rput[t](\nn,-.25){$\scriptstyle\nn$}} %--- s(t) ---- - \rput(0,-1.5){% - \psaxeslabels(0,0)(-7,0)(7,0){$t$}{} - \rput[tl](-7,1){$s(t)$} - \psset{style=Stem,style=Arrow,stemhead=>,linecolor=teal} - \psstem(-6,1){1,1,1,1,1,1,1,1,1,1,1,1,1}} + \rput(0,-1.5){\psaxeslabels(0,0)(-7,0)(7,0){$t$}{} + \rput[tl](-7,1){$s(t)$} + \psset{style=Stem,style=Arrow,stemhead=>,linecolor=blue} + \psstem(-6,1){1,1,1,1,1,1,1,1,1,1,1,1,1}} %--- x_s(t) --- - \rput(0,-3){% - \psaxeslabels(0,0)(-7,0)(7,0){$t$}{} - \rput[tl](-7,1){$x_s(t)$} - \plotsin[style=Graph,linecolor=gray,linestyle=dashed] - \psset{style=Stem,style=Arrow,stemhead=>,linecolor=teal} - \psstem(-6,1){.5} \psstem(-4,1){.5,1,.5} - \psstem{.5,1,.5} \psstem(4,1){.5,1,.5}} + \rput(0,-3){\psaxeslabels(0,0)(-7,0)(7,0){$t$}{} + \rput[tl](-7,1){$x_s(t)$} + \psplot[style=Graph,style=Dash,linecolor=gray]{-6}{6}{x 90 mul sin .5 mul .5 add} + \psset{style=Stem,style=Arrow,stemhead=>,linecolor=blue} + \psstem(-6,1){.5} \psstem(-4,1){.5,1,.5} + \psstem{.5,1,.5} \psstem(4,1){.5,1,.5}} %--- x[n] ---- - \rput(0,-4.5){% - \psaxeslabels(0,0)(-7,0)(7,0){$n$}{} - \rput[tl](-7,1){$x[n]$} - \psset{style=Stem,style=Arrow,linecolor=teal} - \psstem(-6,1){.5,0,.5,1,.5,0,.5,1,.5,0,.5,1,.5}} + \rput(0,-4.5){\psaxeslabels(0,0)(-7,0)(7,0){$n$}{} + \rput[tl](-7,1){$x[n]$} \psset{style=Stem,style=Arrow,linecolor=blue} + \psstem(-6,1){.5,0,.5,1,.5,0,.5,1,.5,0,.5,1,.5}} \end{pspicture} \end{LTXexample} @@ -1278,10 +1662,6 @@ Draw the sampled sequence $x[n] = x_c(\pi n/4)$. \subsection{Pole-Zero Diagram} -%%------------------------ -%%--- example ------------ -%%------------------------ - \Example{} Draw the pole-zero diagram of a system with the following system function. \[ H(z) = \frac{z^4 - 2z^3 + 2z^2}{z^2 - 4} @@ -1290,8 +1670,8 @@ H(z) = \frac{z^4 - 2z^3 + 2z^2}{z^2 - 4} \begin{LTXexample} \begin{pspicture}[showgrid=true](-3,-2)(3,2) - %--- Drawing axes --- - \psaxeslabels(0,0)(-3,-2)(3,2){$\sRE$}{$\sIM$} + \psaxeslabels(0,0)(-3,-2)(3,2){$\Re$}{$\Im$} + \psset{linecolor=red} %--- Marking zeros --- \pszero[order=2](0,0){z1} @@ -1299,32 +1679,30 @@ H(z) = \frac{z^4 - 2z^3 + 2z^2}{z^2 - 4} \pszero(1,-1){z3} \nput{-90}{z3}{$1 - j$} %--- Marking poles --- - \psset{linecolor=red} \pspole(2,0){p1} \nput{-90}{p1}{$2$} \pspole(-2,0){p2} \nput{-90}{p2}{$-2$} \end{pspicture} \end{LTXexample} + \newpage -%%------------------------ -%%--- example ------------ -%%------------------------ +\subsection{Butterworth Filter} -\Example{multido} Draw the pole-zero diagram of a fifth-order Butterworth filter. +\Example{use \texttt{multido}} Draw the pole-zero diagram of a fifth-order Butterworth filter. \begin{LTXexample} \begin{pspicture}[showgrid=true](-3,-3)(3,3) %--- Drawing axes --- - \psaxeslabels(0,0)(-3,-3)(3,3){$\sRE$}{$\sIM$} + \psaxeslabels(0,0)(-3,-3)(3,3){$\Re$}{$\Im$} \pscircle[linecolor=gray](0,0){2} %--- Angle between poles --- \psset{linecolor=gray} - \psline[linestyle=dashed](3;108) - \psline[linestyle=dashed](3;144) - \psarc[style=Arrow,arrows=<->](0,0){2.5}{108}{144} + \psline[style=Dash](3;108) + \psline[style=Dash](3;144) + \psarc[style=Arrow]{<->}(0,0){2.5}{108}{144} \rput(2.75;126){\textcolor{gray}{$36^\circ$}} %--- Placing poles --- @@ -1335,15 +1713,12 @@ H(z) = \frac{z^4 - 2z^3 + 2z^2}{z^2 - 4} + \newpage \subsection{Region of Convergence} -%%------------------------ -%%--- example ------------ -%%------------------------ - \Example{} Shade the region of convergence (ROC) of a system with the following system function assuming it is: (1) causal, and (2) stable. \[ H(z) = \frac{1}{z^2 + z - \tfrac{3}{4}} @@ -1359,15 +1734,15 @@ Since the poles of the system are at $z = \tfrac{1}{2}$ and $z = -\tfrac{3}{2}$, \psdiskc[fillcolor=blue!30](0,0)(3.75,3){2.25} %--- Drawing axes --- - \psaxeslabels(0,0)(-4.25,-3.75)(4.75,4){$\sRE$}{$\sIM$} + \psaxeslabels(0,0)(-4.25,-3.75)(4.75,4){$\Re$}{$\Im$} %--- Marking poles --- \psset{linecolor=purple,labelsep=.05} \pscircle(0,0){1.5} \rput[b]{45}(1.68;135){{\scriptsize\color{purple}unit circle}} - \pscircle[linecolor=gray,linestyle=dashed,style=Dash](0,0){.75} + \pscircle[style=Dash,linecolor=gray](0,0){.75} \pspole(.75,0){p1} \nput{-45}{p1}{$\tfrac{1}{2}$} - \pscircle[linecolor=gray,linestyle=dashed,style=Dash](0,0){2.25} + \pscircle[style=Dash,linecolor=gray](0,0){2.25} \pspole(-2.25,0){p2} \nput{225}{p2}{$\scriptstyle-\tfrac{3}{2}$} %--- Labeling the stable and causal ROCs --- @@ -1380,14 +1755,9 @@ Since the poles of the system are at $z = \tfrac{1}{2}$ and $z = -\tfrac{3}{2}$, \newpage - \subsection{Block Diagrams} -%%------------------------ -%%--- example ------------ -%%------------------------ - -\Example{} Draw the block diagram of two systems $H_1(z)$ and $H_2(z)$ in both parallel and series combinations. +\Example{} Draw the block diagrams of two systems $H_1(z)$ and $H_2(z)$ in both parallel and series combinations. \bigskip @@ -1396,72 +1766,73 @@ Since the poles of the system are at $z = \tfrac{1}{2}$ and $z = -\tfrac{3}{2}$, % Parallel Combination %=========================== \begin{pspicture}[showgrid=true](-3,-1)(3,1) - %--- Defining blocks --- - \rput(-3,0){\rnode{x}{$x[n]$}} - \dotnode(-1.5,0){dot} - \psblock[fillstyle=solid,fillcolor=red!20](0,.75){H1}{$H_1(z)$} - \psblock[fillstyle=solid,fillcolor=blue!20](0,-.75){H2}{$H_2(z)$} - \pscircleop(1.5,0){oplus} - \rput(3,0){\rnode{y}{$y[n]$}} - - %--- Connecting blocks --- - \psset{style=Arrow} - \ncline[nodesepA=.15]{-}{x}{dot} - \ncangle[angleA=90,angleB=180]{dot}{H1} - \ncangle[angleA=-90,angleB=180]{dot}{H2} - \ncangle[angleB=90]{H1}{oplus} - \ncangle[angleB=-90]{H2}{oplus} - \ncline[nodesepB=.15]{oplus}{y} + \psset{style=RoundCorners,gratioWh=1.25} + + %--- Defining blocks --- + \pssignal(-3,0){x}{$x[n]$} + \dotnode(-1.5,0){dot} + \psfblock[fillstyle=solid,fillcolor=red!20](0,.75){H1}{$H_1(z)$} + \psfblock[fillstyle=solid,fillcolor=blue!20](0,-.75){H2}{$H_2(z)$} + \pscircleop(1.5,0){oplus} + \pssignal(3,0){y}{$y[n]$} + + %--- Connecting blocks --- + \psset{style=Arrow} + \ncline{-}{x}{dot} + \ncangle[angleA=90,angleB=180]{dot}{H1} + \ncangle[angleA=-90,angleB=180]{dot}{H2} + \ncangle[angleB=90]{H1}{oplus} + \ncangle[angleB=-90]{H2}{oplus} + \ncline{oplus}{y} \end{pspicture} -% +\hspace{1cm} %======================== % Series Combination %======================== \begin{pspicture}[showgrid=true](-3,-1)(3,1) - %--- Defining blocks --- - \rput(-3,0){\rnode{x}{$x[n]$}} - \psblock[fillstyle=solid,fillcolor=red!20](-1.25,0){H1}{$H_1(z)$} - \psblock[fillstyle=solid,fillcolor=blue!20](1.25,0){H2}{$H_2(z)$} - \rput(3,0){\rnode{y}{$y[n]$}} - - %--- Connecting blocks --- - \ncline[nodesepA=.15]{x}{H1} - \ncline{H1}{H2} - \ncline[nodesepB=.15]{H2}{y} + \psset{style=RoundCorners,gratioWh=1.25} + + %--- Defining blocks --- + \pssignal(-3,0){x}{$x[n]$} + \psfblock[fillstyle=solid,fillcolor=red!20](-1.25,0){H1}{$H_1(z)$} + \psfblock[fillstyle=solid,fillcolor=blue!20](1.25,0){H2}{$H_2(z)$} + \pssignal(3,0){y}{$y[n]$} + + %--- Connecting blocks --- + \nclist[style=Arrow]{ncline}[naput]{x,H1,H2 $v[n]$,y} \end{pspicture} \end{LTXexample} + \newpage -%%------------------------ -%%--- example ------------ -%%------------------------ +\subsection{C/D Converter} \Example{} Draw the block diagram of a continuous-to-discrete-time (C/D) converter. \bigskip \begin{LTXexample} -\begin{pspicture}[showgrid=true](-2,-2)(5.5,2) - %--- Defining blocks --- - \rput(-1.75,0){\rnode{xc}{$x_c(t)$}} - \pscircleop[operation=times](0,0){otimes} - \rput(0,1.25){\rnode{s}{$s(t)$}} - \psblock[fillstyle=solid,fillcolor=purple!20](2.75,0){conv}{\parbox[c]{2\psunit}% - {\centering Conversion from impulse train to discrete-time sequence}} - \rput(5.5,0){\rnode{x}{$x[n]$}} - - %--- Connecting blocks --- - \psset{style=Arrow} - \ncline[nodesepA=.15]{xc}{otimes} - \ncline[nodesepA=.15]{s}{otimes} - \ncline{otimes}{conv} \naput{$x_s(t)$} - \ncline[nodesepB=.15]{conv}{x} - - %--- Drawing the dashed frame --- - \psframe[linecolor=purple,linestyle=dashed,style=Dash](-.75,-1.5)(4.5,1.5) - \rput(1.875,1.75){C/D Converter} +\begin{pspicture}[showgrid=true](-2,-2)(7,2) + \psset{style=RoundCorners} + + %--- Defining blocks --- + \pssignal(-1.75,0){xc}{$x_c(t)$} + \pscircleop[operation=times](0,0){otimes} + \pssignal(0,1.25){s}{$s(t)$} + \psblock[fillstyle=solid,fillcolor=purple!20](3.25,0){conv}{\parbox[c]{3\psunit}% + {\centering Conversion from impulse train to discrete-time sequence}} + \pssignal(6.5,0){x}{$x[n]$} + + %--- Connecting blocks --- + \psset{style=Arrow} + \nclist{ncline}[naput]{xc,otimes,conv $x_s(t)$,x} + \ncline{s}{otimes} + + %--- Drawing the dashed frame --- + \fnode[style=Dash,linecolor=purple,framesize=6 3.25](2.25,0){box} + \nput{90}{box}{\textcolor{purple}{C/D Converter}} \end{pspicture} \end{LTXexample} @@ -1469,11 +1840,9 @@ Since the poles of the system are at $z = \tfrac{1}{2}$ and $z = -\tfrac{3}{2}$, \newpage -%%------------------------ -%%--- example ------------ -%%------------------------ +\subsection{Direct Form II} -\Example{multido} Draw the direct-form II block diagram of a discrete-time LTI system with the following system function. +\Example{use \texttt{multido}} Draw the direct-form II block diagram of a discrete-time LTI system with the following system function. \[ H(z) = \frac{1 - z^{-1} + 2z^{-2} + 3z^{-3}}{1 + z^{-1} - 0.5 z^{-2} + 0.75 z^{-3}} \] @@ -1481,34 +1850,29 @@ H(z) = \frac{1 - z^{-1} + 2z^{-2} + 3z^{-3}}{1 + z^{-1} - 0.5 z^{-2} + 0.75 z^{- \begin{LTXexample} \begin{pspicture}[showgrid=true](-5,-6)(5,1) - %--- Some settings --- - \psset{style=Arrow} - - %--- Defining blocks --- - \dotnode(0,0){dot1} - \multido{\nA=1+1,\nB=2+1,\ryA=-.9+-1.8,\ryB=-1.8+-1.8}{3}{% - \psblock(0,\ryA){D\nA}{$z^{-1}$} - \dotnode(0,\ryB){dot\nB}} - \multido{\nn=1+1,\ry=0+-1.8}{3}{\pscircleop(-2,\ry){oplusL\nn}} - \multido{\nn=1+1,\ry=0+-1.8}{3}{\pscircleop(2,\ry){oplusR\nn}} - \rput(-4,0){\rnode{x}{$x[n]$}} - \rput(4,0){\rnode{y}{$y[n]$}} - - %--- Connecting blocks --- - \psset{style=Arrow} - \ncline[nodesepA=.15]{x}{oplusL1} - \ncline{oplusL1}{oplusR1} - \ncline[nodesepB=.15]{oplusR1}{y} - \nclist{ncline}{dot1,D1,D2,D3} - \ncline{-}{D3}{dot4} - \nclist{ncline}{oplusL3,oplusL2,oplusL1} - \nclist{ncline}{oplusR3,oplusR2,oplusR1} - \ncline{dot2}{oplusL2} \nbput{$-1$} - \ncline{dot2}{oplusR2} \naput{$-1$} - \ncline{dot3}{oplusL3} \nbput{$0.5$} - \ncline{dot3}{oplusR3} \naput{$2$} - \ncangle[angleA=180,angleB=-90]{dot4}{oplusL3} \nbput[npos=.5]{$-0.75$} - \ncangle[angleB=-90]{dot4}{oplusR3} \naput[npos=.5]{$3$} + \psset{style=RoundCorners,style=Arrow} + + %--- Defining blocks --- + \dotnode(0,0){dot1} + \multido{\nA=1+1,\nB=2+1,\ryA=-.9+-1.8,\ryB=-1.8+-1.8}{3}{% + \psblock(0,\ryA){D\nA}{$z^{-1}$} + \dotnode(0,\ryB){dot\nB}} + \multido{\nn=1+1,\ry=0+-1.8}{3}{\pscircleop(-2,\ry){oplusL\nn}} + \multido{\nn=1+1,\ry=0+-1.8}{3}{\pscircleop(2,\ry){oplusR\nn}} + \pssignal(-4,0){x}{$x[n]$} + \pssignal(4,0){y}{$y[n]$} + + %--- Connecting blocks --- + \psset{style=Arrow} + \nclist{ncline}{x,oplusL1,oplusR1,y} + \nclist{ncline}{dot1,D1,D2,D3} + \ncline{-}{D3}{dot4} + \nclist{ncline}{oplusL3,oplusL2,oplusL1} + \nclist{ncline}{oplusR3,oplusR2,oplusR1} + \ncstar{<-}{ncline}[naput]{oplusL2 $-1$,oplusR2 nbput $-1$}{dot2} + \ncstar{<-}{ncline}[naput]{oplusL3 $0.5$,oplusR3 nbput $2$}{dot3} + \ncangle[angleA=180,angleB=-90]{dot4}{oplusL3} \nbput[npos=.5]{$-0.75$} + \ncangle[angleB=-90]{dot4}{oplusR3} \naput[npos=.5]{$3$} \end{pspicture} \end{LTXexample} @@ -1516,64 +1880,91 @@ H(z) = \frac{1 - z^{-1} + 2z^{-2} + 3z^{-3}}{1 + z^{-1} - 0.5 z^{-2} + 0.75 z^{- \newpage -%%------------------------ -%%--- example ------------ -%%------------------------ +\subsection{Filter Bank} -\Example{pstricks-add} Draw the block diagram of an $M$-channel maximally decimated filter bank. +\Example{use \texttt{pstricks-add}} Draw the block diagram of an $M$-channel filter bank. \begin{LTXexample} -\begin{pspicture}[showgrid=true](-6,-4)(6,.5) - \psset{framesize=1.2 .65} - \rput(-6,0){\rnode{x}{$x[n]$}} - \rput(6,0){\rnode{y}{$y[n]$}} - \dotnode(-4.5,0){dot1} - \dotnode(-4.5,-1){dot2} - \newcount\cnt - - %--- First and second channels --- - \cnt=0 - \psforeach{\ry}{0,-1}{% - \advance\cnt by 1 - \psfblock(-3,\ry){h\the\cnt}{$h_{\the\cnt}[n]$} - \psdsampler(-1,\ry){ds\the\cnt}{$M$} - \psusampler(1,\ry){us\the\cnt}{$M$} - \psfblock(3,\ry){g\the\cnt}{$g_{\the\cnt}[n]$} - \pscircleop(4.5,\ry){oplus\the\cnt}} - - %--- Placing dots --- - \cnt=0 - \psforeach{\rx}{-4.5,-3,-1,1,3,4.5}{% - \advance\cnt by 1 - \rput(\rx,-2){\rnode{dots\the\cnt}{\psldots[angle=90]}}} - - %--- M-th channel --- - \psfblock(-3,-3){hM}{$h_M[n]$} - \psdsampler(-1,-3){dsM}{$M$} - \psusampler(1,-3){usM}{$M$} - \psfblock(3,-3){gM}{$g_M[n]$} - - %--- Connecting blocks --- - \psset{style=Arrow} - \ncline[nodesepA=.15]{x}{h1} - \nclist{ncline}{h1,ds1,us1,g1,oplus1} - \ncline[nodesepB=.15]{oplus1}{y} - \nclist{ncline}{dot2,h2,ds2,us2,g2,oplus2} - \ncline[nodesepB=.35]{dot1}{dots1} - \ncangle[nodesepA=.35,angleA=-90,angleB=180]{dots1}{hM} - \nclist{ncline}{hM,dsM,usM,gM} - \ncangle[nodesepB=.35,angleB=-90]{gM}{dots6} - \ncline[nodesepA=.35]{dots6}{oplus2} - \ncline{oplus2}{oplus1} +\begin{pspicture}[showgrid=true](-6,-3.5)(6,.5) + \psset{style=RoundCorners,style=Arrow,gratioWh=1.2} + \pssignal(-6,0){x}{$x[n]$} + \pssignal(6,0){y}{$y[n]$} + \dotnode(-4.5,0){dot1} + \dotnode(-4.5,-1){dot2} + \newcount\cnt + + %--- First and second channels --- + \cnt=0 + \psforeach{\ry}{0,-1}{\advance\cnt by 1\relax + \psfblock(-3,\ry){h\the\cnt}{$h_{\the\cnt}[n]$} + \psdsampler(-1,\ry){ds\the\cnt}{M} + \psusampler(1,\ry){us\the\cnt}{M} + \psfblock(3,\ry){g\the\cnt}{$g_{\the\cnt}[n]$} + \pscircleop(4.5,\ry){oplus\the\cnt}} + + %--- Placing dots --- + \cnt=0 + \psforeach{\rx}{-4.5,-3,-1,1,3,4.5}{\advance\cnt by 1\relax + \ldotsnode[angle=90](\rx,-2){dots\the\cnt}} + + %--- M-th channel --- + \psfblock(-3,-3){hM}{$h_M[n]$} + \psdsampler(-1,-3){dsM}{M} + \psusampler(1,-3){usM}{M} + \psfblock(3,-3){gM}{$g_M[n]$} + + %--- Connecting blocks --- + \nclist{ncline}{x,h1,ds1,us1,g1,oplus1,y} + \nclist{ncline}{dot2,h2,ds2,us2,g2,oplus2} + \ncline{dot1}{dots1} + \ncangle[angleA=-90,angleB=180]{dots1}{hM} + \nclist{ncline}{hM,dsM,usM,gM} + \ncangle[angleB=-90]{gM}{dots6} + \nclist{ncline}{dots6,oplus2,oplus1} \end{pspicture} \end{LTXexample} +\newpage + +\subsection{Linear Combiner} + +\Example{use \texttt{multido}} Draw the block diagram of a linear combiner. + +\begin{LTXexample} +\begin{pspicture}[showgrid=true](-4,-6)(4,.5) + \psset{style=RoundCorners,gratioWh=1,radius=.25} + + %--- Signals --- + \pssignal(-3.25,0){x1}{$x_1[n]$} + \pssignal(-1.25,0){x2}{$x_2[n]$} + \pssignal(1.25,0){x3}{$x_{k-1}[n]$} + \pssignal(3.25,0){x4}{$x_k[n]$} + \pssignal(0,-5){y}{$y[n]$} + + %--- Gains, dots, and the adder --- + \Cnode(-3.25,-1.75){a1} \nput{180}{a1}{$a_1$} + \Cnode(-1.25,-1.75){a2} \nput{180}{a2}{$a_2$} + \Cnode(1.25,-1.75){a3} \nput{0}{a3}{$a_{k-1}$} + \Cnode(3.25,-1.75){a4} \nput{0}{a4}{$a_k$} + \psldots(0,0) \psldots(0,-1.75) + \pscircleop(0,-3.5){oplus} + + %--- Connections --- + \psset{style=Arrow} + \multido{\nn=1+1}{4}{\ncline{x\nn}{a\nn}} + \ncstar{ncline}{a1,a2,a3,a4}{oplus} + \ncline{oplus}{y} +\end{pspicture} +\end{LTXexample} + + +\newpage \bibliographystyle{plain} -\bibliography{pstricks} +\bibliography{pst-sigsys-doc} \end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/pst-sigsys/pst-sigsys.tex b/Master/texmf-dist/tex/generic/pst-sigsys/pst-sigsys.tex new file mode 100644 index 00000000000..e6d7f79b885 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pst-sigsys/pst-sigsys.tex @@ -0,0 +1,541 @@ +%% +%% This is file `pst-sigsys.tex' v 1.2. +%% +%% IMPORTANT NOTICE: +%% +%% (C) +%% Farshid Delgosha (NY - U.S.A.) <fdelgosha@gmail.com> +%% +%% v 1.0: 01/15/2009 +%% v 1.1: 04/01/2009 +%% v 1.2: 01/15/2010 +%% +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN archives +%% in directory macros/latex/base/lppl.txt. +%% +%% DESCRIPTION: +%% `pst-sigsys' is a PSTricks package for drawing block diagrams +%% related to the signal processing discipline. +%% +% +\csname PSTsigsysLoaded\endcsname +\let\PSTsigsysLoaded\endinput + +\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi +\ifx\PSTnodesLoaded\endinput\else\input pst-node.tex\fi +\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi + +\def\pstsigsysFV{1.2} +\def\pstsigsysFD{2010/01/15} +\message{`PST-SigSys' v\pstsigsysFV, \pstsigsysFD\space (fd)} + + +\SpecialCoor + + + +%--- new pstricks styles --------------------------------- +\newpsstyle{ArrowLen}{arrowsize=1.35mm,arrowlength=1.25,arrowinset=.25} +\newpsstyle{Arrow}{arrows=->,style=ArrowLen} +\newpsstyle{Dash}{linestyle=dashed,dash=.15 .08} +\newpsstyle{Graph}{linewidth=1.25pt,linearc=0} +\newpsstyle{Stem}{linewidth=1.25pt,linestyle=solid,stemhead=*} +\newpsstyle{RoundCorners}{framesep=.125,framearc=.25,linearc=.1} +%--- end new pstricks styles ----------------------------- + + +%--- new pstricks-add styles ----------------------------- +\AtBeginDocument{ +\ifx\PSTricksAddLoaded\endinput +\newpsstyle{ArrowIn}{ArrowInside=->,style=ArrowLen} +\newpsstyle{DashDot}{linestyle=dashed,dash=.15 .055 .04 .055} +\newpsstyle{Brace}{braceWidth=.02,braceWidthInner=.115,braceWidthOuter=.115,ref=C} +\newpsobject{psBraceUp}{psbrace}{style=Brace,rot=-90,nodesepB=-\pslabelsep} +\newpsobject{psBraceDown}{psbrace}{style=Brace,rot=90,nodesepB=\pslabelsep} +\newpsobject{psBraceRight}{psbrace}{style=Brace,rot=-90,nodesepA=\pslabelsep} +\newpsobject{psBraceLeft}{psbrace}{style=Brace,rot=-90,nodesepA=-\pslabelsep} +\fi +} +%--- end new pstricks-add styles ------------------------- + + +%--- internal macros ------------------------------------- +\newdimen\ss@ticklength +\newdimen\ss@signalsep +\newdimen\ss@zerowidth +\newdimen\ss@zeroradius +\newdimen\ss@zeroradiusinc +\newdimen\ss@polewidth +\newdimen\ss@polelength +\newdimen\ss@oplength +\newdimen\ss@opwidth +\newdimen\ss@opsep +\newdimen\ss@ldotssep +\newdimen\ss@ldotssize +% +\newdimen\ss@temp@dimA +\newdimen\ss@temp@dimB +\newdimen\ss@temp@dimC +\newcount\ss@temp@cnt +\def\ss@temp{} +\def\ss@temp@choice{} +% +%%% Adds two numbers. %%% +\newdimen\ss@calc@dim +\def\ss@calc{} +\def\ss@addnum#1#2#3{% +\ss@calc@dim=#1pt% +\advance\ss@calc@dim #2pt% +\pst@divide{\ss@calc@dim}{1pt}\ss@calc% +\let#3\ss@calc% +} +% +\def\pst@scale#1{\pssetlength{#1}{\ss@scale#1}} +% +%%% Scales the line width. %%% +\def\ss@LW{} +\def\pst@scaleLW#1#2{% +\pssetlength{\ss@calc@dim}{#1\pslinewidth}% +\pst@dimtonum{\ss@calc@dim}{\ss@LW}% +\let#2\ss@LW% +} +% +%%% Draws a cross. %%% +\def\ss@cross@temp{} +\def\pst@cross(#1;#2)#3{% +\ss@addnum{#2}{90}\ss@cross@temp% +\psline[linewidth=#3,arrows=-](-#1;#2)(#1;#2)% +\psline[linewidth=#3,arrows=-](-#1;\ss@cross@temp)(#1;\ss@cross@temp)% +} +% +%%% Sets the frame width using the golden ratio. %%% +\def\pst@frame@width#1#2{% +\pssetlength{\ss@temp@dimA}{#1}% +\pssetlength{\ss@temp@dimB}{#2\ss@temp@dimA}% +\divide\ss@temp@dimA 2\relax% +\divide\ss@temp@dimB 2\relax% +\edef\psk@framewidth{\pst@number\ss@temp@dimA}% +\edef\psk@frameheight{\pst@number\ss@temp@dimB}% +} +% +%%% Sets the frame height using the golden ratio. %%% +\def\pst@frame@height#1#2{% +\pssetlength{\ss@temp@dimA}{#1}% +\pssetlength{\ss@temp@dimB}{#2\ss@temp@dimA}% +\divide\ss@temp@dimA 2\relax% +\divide\ss@temp@dimB 2\relax% +\edef\psk@frameheight{\pst@number\ss@temp@dimA}% +\edef\psk@framewidth{\pst@number\ss@temp@dimB}% +} +% +\newpsstyle{inv@frame}{fillstyle=none,linestyle=none,framearc=0} +% +%%% This is my parser. %%% +\def\ss@parse@temp{} +\def\ss@parseA{} +\def\ss@parseB{} +\def\ss@parseC{} +% +\def\ss@parse@III#1{% +\ss@parse@II{#1}{\ss@parseA}{\ss@parse@temp}% +\ss@parse@II{\ss@parse@temp}{\ss@parseB}{\ss@parseC}% +} +% +\def\ss@parse@II#1#2#3{\expandafter\ss@parse#1 \@nil#2#3} +% +\def\ss@parse#1 #2\@nil#3#4{% +\gdef#3{#1}% +\ifx\@empty#2\@empty% +\gdef#4{}% +\else% +\ss@removespace#2\@nil#4% +\fi% +} +% +\def\ss@removespace#1 \@nil#2{\gdef#2{#1}} +%--- end internal macros --------------------------------- + + +%--- keys ------------------------------------------------ +\define@key[psset]{pst-sigsys}{scale}{\def\ss@scale{#1}} +\define@choicekey*[psset]{pst-sigsys}{xlpos}[\val\ss@temp@choice]{b,t}{% +\ifcase\ss@temp@choice\relax% +\def\ss@xlpos{b}% +\or% +\def\ss@xlpos{t}% +\fi% +} +\define@choicekey*[psset]{pst-sigsys}{ylpos}[\val\ss@temp@choice]{r,l}{% +\ifcase\ss@temp@choice\relax% +\def\ss@ylpos{r}% +\or% +\def\ss@ylpos{l}% +\fi% +} +\define@key[psset]{pst-sigsys}{ticklength}{\pssetlength{\ss@ticklength}{#1}} +\define@key[psset]{pst-sigsys}{signalsep}{\pssetlength{\ss@signalsep}{#1}} +\define@key[psset]{pst-sigsys}{stemhead}[]{\def\ss@stemhead{#1}} +\define@boolkey[psset]{pst-sigsys}[ss@]{stemtag}[true]{} +\define@key[psset]{pst-sigsys}{stemtagformat}[]{\def\ss@stemtagformat{#1}} +\define@key[psset]{pst-sigsys}{order}{\def\ss@order{#1}} +\define@key[psset]{pst-sigsys}{zerowidth}{\pssetlength{\ss@zerowidth}{#1}} +\define@key[psset]{pst-sigsys}{zeroradius}{\pssetlength{\ss@zeroradius}{#1}} +\define@key[psset]{pst-sigsys}{zeroradiusinc}{\pssetlength{\ss@zeroradiusinc}{#1}} +\define@key[psset]{pst-sigsys}{polewidth}{\pssetlength{\ss@polewidth}{#1}} +\define@key[psset]{pst-sigsys}{polelength}{\pssetlength{\ss@polelength}{#1}} +\define@key[psset]{pst-sigsys}{opwidth}{\pssetlength{\ss@opwidth}{#1}} +\define@key[psset]{pst-sigsys}{oplength}{\pssetlength{\ss@oplength}{#1}} +\define@key[psset]{pst-sigsys}{opsep}{\pssetlength{\ss@opsep}{#1}} +\define@choicekey*[psset]{pst-sigsys}{operation}[\val\ss@temp@choice]{plus,times}{% +\ifcase\ss@temp@choice\relax% +\def\ss@angle{0}% +\or% +\def\ss@angle{45}% +\fi% +} +\define@key[psset]{pst-sigsys}{angle}{\def\ss@angle{#1}} +\define@key[psset]{pst-sigsys}{ldotssize}{\pssetlength{\ss@ldotssize}{#1}} +\define@key[psset]{pst-sigsys}{ldotssep}{\pssetlength{\ss@ldotssep}{#1}} +\define@key[psset]{pst-sigsys}{gratioWh}{\pst@frame@width{#1}{.6180339887}} +\define@key[psset]{pst-sigsys}{gratioWv}{\pst@frame@width{#1}{1.618033989}} +\define@key[psset]{pst-sigsys}{gratioHh}{\pst@frame@height{#1}{1.618033989}} +\define@key[psset]{pst-sigsys}{gratioHv}{\pst@frame@height{#1}{.6180339887}} +%--- end keys -------------------------------------------- + + +%--- default key values ---------------------------------- +\psset[pst-sigsys]{scale=1}% global +\psset[pst-sigsys]{xlpos=b,ylpos=r}% psaxeslabels +\psset[pst-sigsys]{ticklength=.075}% psTick +\psset[pst-sigsys]{signalsep=5pt}% pssignal +\psset[pst-sigsys]{stemhead=*,stemtag=false,stemtagformat=\scriptstyle}% psstem +\psset[pst-sigsys]{zerowidth=.7pt,zeroradius=.08,zeroradiusinc=.07,order=1}% pszero +\psset[pst-sigsys]{polewidth=.7pt,polelength=.12}% pspole +\psset[pst-sigsys]{opwidth=.7pt,oplength=.125,opsep=.1,operation=plus}% pscircleop and psframeop +\psset[pst-sigsys]{ldotssize=.05,ldotssep=.15,angle=0}% psldots +%--- end default key values ------------------------------ + +\pst@addfams{pst-sigsys} + + +%--- psaxeslabels ---------------------------------------- +\def\psaxeslabels{\def\pst@par{}\pst@object{psaxeslabels}} +\def\psaxeslabels@i{\pst@getarrows\psaxeslabels@ii} +\def\psaxeslabels@ii(#1,#2)(#3,#4)(#5,#6)#7#8{{% +\use@par% +\psline(#3,#2)(#5,#2)% +\psline(#1,#4)(#1,#6)% +% +\if\ss@xlpos t% +\rput(#5,#2){\rput[rb](0,\pslabelsep){#7}}% +\else% +\rput(#5,#2){\rput[rt](0,-\pslabelsep){#7}}% +\fi% +% +\if\ss@ylpos l% +\rput(#1,#6){\rput[tr](-\pslabelsep,0){#8}}% +\else% +\rput(#1,#6){\rput[tl](\pslabelsep,0){#8}}% +\fi% +}\ignorespaces} +%--- end psaxeslabels ------------------------------------ + + +%--- pstick ---------------------------------------------- +\def\pstick{\def\pst@par{}\pst@object{pstick}} +\def\pstick@i{\@ifnextchar({\pstick@ii{0}}{\pstick@ii}} +\def\pstick@ii#1(#2)#3{{% +\use@par% +\rput{#1}(#2){\psline(-#3,0)(#3,0)}% +}\ignorespaces} +%--- end pstick ------------------------------------------ + + +%--- psTick ---------------------------------------------- +\def\psTick{\def\pst@par{}\pst@object{psTick}} +\def\psTick@i{\@ifnextchar({\psTick@ii{0}}{\psTick@ii}} +\def\psTick@ii#1(#2){{% +\use@par% +\rput{#1}(#2){\psline(-\ss@ticklength,0)(\ss@ticklength,0)}% +}\ignorespaces} +%--- end psTick ------------------------------------------ + + +%--- pssignal -------------------------------------------- +\def\pssignal{\def\pst@par{}\pst@object{pssignal}} +\def\pssignal@i(#1)#2#3{{% +\use@par% +\rput(#1){\rnode{#2}{\psframebox[style=inv@frame,framesep=\ss@signalsep]{#3}}}% +}\ignorespaces} +%--- end pssignal ---------------------------------------- + + +%--- psstem ---------------------------------------------- +\def\psstem{\def\pst@par{}\pst@object{psstem}} +\def\psstem@i{\@ifnextchar({\psstem@ii}{\psstem@ii(0,1)}} +\def\psstem@ii(#1,#2)#3{{% +\use@par% +\ss@temp@cnt=#1% +\@for\ss@for@ind:=#3\do{% +\psline{-\ss@stemhead}(\ss@temp@cnt,0)(\ss@temp@cnt,\ss@for@ind)% +% +\ifss@stemtag% +\pssetlength{\ss@temp@dimA}{\ss@for@ind}% +\ifdim\ss@temp@dimA<\z@% +\rput[b](\ss@temp@cnt,\pslabelsep){$\ss@stemtagformat\the\ss@temp@cnt$}% +\else% +\rput[t](\ss@temp@cnt,-\pslabelsep){$\ss@stemtagformat\the\ss@temp@cnt$}% +\fi\fi% +% +\advance\ss@temp@cnt#2}% +}\ignorespaces} +%--- end psstem ------------------------------------------ + + +%--- pszero ---------------------------------------------- +\def\pszero{\def\pst@par{}\pst@object{pszero}} +\def\pszero@i(#1)#2{{% +\use@par% +\pst@scale{\ss@zerowidth}% +\pst@scale{\ss@zeroradius}% +\pst@scale{\ss@zeroradiusinc}% +\pssetlength{\ss@temp@dimA}{\ss@zeroradius}% +\ss@temp@cnt=\ss@order% +\loop% +\cnode[linewidth=\ss@zerowidth](#1){\ss@temp@dimA}{#2}% +\psaddtolength{\ss@temp@dimA}{\ss@zeroradiusinc}% +\ifnum\ss@temp@cnt>\@ne% +\advance\ss@temp@cnt-\@ne% +\repeat% +}\ignorespaces} +%--- end pszero ------------------------------------------ + + +%--- pspole ---------------------------------------------- +% The main part of this code is borrowed from pst-node +% +\def\pspole{\def\pst@par{}\pst@object{pspole}} +\def\pspole@i(#1)#2{% +\leavevmode% +\hbox{% +\use@par% +\pst@scale{\ss@polelength}% +\pst@scale{\ss@polewidth}% +\pst@@getcoor{#1}% +\pssetlength\pst@dimc{\ss@polelength}% +\pst@dimg=\psk@dimen\pslinewidth% +\advance\pst@dimc-\pst@dimg% +\advance\pst@dimc.5\pslinewidth% +\ifnodealign% +\kern\pst@dimc% +\vrule width\z@ height \pst@dimc depth \pst@dimc% +\fi% +\rput(#1){\pst@cross(\ss@polelength;45){\ss@polewidth}}% +\pst@newnode{#2}{11}{\pst@coor \pst@number\pst@dimc}{\tx@InitCnode}% +\ifnodealign\kern\pst@dimc\fi% +}\ignorespaces} +%--- end pspole ------------------------------------------ + + +%--- pscircleop ------------------------------------------ +\def\pscircleop{\def\pst@par{}\pst@object{pscircleop}} +\def\pscircleop@i(#1)#2{{% +\use@par% +\pst@scale{\ss@oplength}% +\pst@scale{\ss@opsep}% +\pst@scale{\ss@opwidth}% +\pst@scale{\pslinewidth}% +\pssetlength{\ss@temp@dimA}{\ss@oplength}% +\psaddtolength{\ss@temp@dimA}{\ss@opsep}% +\cnode(#1){\ss@temp@dimA}{#2}% +\rput(#1){\pst@cross(\ss@oplength;\ss@angle){\ss@opwidth}}% +}\ignorespaces} +%--- end pscircleop -------------------------------------- + + +%--- psframeop ------------------------------------------- +\def\psframeop{\def\pst@par{}\pst@object{psframeop}} +\def\psframeop@i(#1)#2{{% +\use@par% +\pst@scale{\ss@oplength}% +\pst@scale{\ss@opsep}% +\pst@scale{\ss@opwidth}% +\pst@scale{\pslinewidth}% +\pssetlength{\ss@temp@dimA}{2\ss@oplength}% +\psaddtolength{\ss@temp@dimA}{2\ss@opsep}% +\fnode[framesize=\ss@temp@dimA](#1){#2}% +\rput(#1){\pst@cross(\ss@oplength;\ss@angle){\ss@opwidth}}% +}\ignorespaces} +%--- end psframeop --------------------------------------- + + +%--- psdisk ---------------------------------------------- +\def\psdisk{\def\pst@par{}\pst@object{psdisk}} +\def\psdisk@i(#1)#2{{% +\use@par% +\pscircle*[linewidth=0pt,linecolor=\psfillcolor](#1){#2}% +}\ignorespaces} +%--- end psdisk ------------------------------------------ + + +%--- psring ---------------------------------------------- +\def\psring{\def\pst@par{}\pst@object{psring}} +\def\psring@i(#1)#2#3{{% +\use@par% +\pssetlength{\ss@temp@dimA}{#2}% +\pssetlength{\ss@temp@dimB}{#3}% +\psaddtolength{\ss@temp@dimB}{-\ss@temp@dimA}% +\pscircle[dimen=inner,linewidth=\ss@temp@dimB,linecolor=\psfillcolor](#1){\ss@temp@dimA}% +}\ignorespaces} +%--- end psring ------------------------------------------ + + +%--- psdiskc --------------------------------------------- +\def\psdiskc{\def\pst@par{}\pst@object{psdiskc}} +\def\psdiskc@i(#1)(#2,#3)#4{{% +\use@par% +\pssetlength{\ss@temp@dimA}{#2}% +\pssetlength{\ss@temp@dimB}{#3}% +\ifdim\ss@temp@dimA>\ss@temp@dimB% +\pssetlength{\ss@temp@dimC}{1.5\ss@temp@dimA}% +\else% +\pssetlength{\ss@temp@dimC}{1.5\ss@temp@dimB}% +\fi% +\psclip{\rput(#1){\psframe[linewidth=0pt,linecolor=\psfillcolor](-#2,-#3)(#2,#3)}}% +\psring@i(#1){#4}{\ss@temp@dimC}% +\endpsclip% +}\ignorespaces} +%--- end psdiskc ----------------------------------------- + + +%--- psldots --------------------------------------------- +\def\psldots{\def\pst@par{}\pst@object{psldots}} +\def\psldots@i(#1){{% +\use@par% +\pst@scale{\ss@ldotssep}% +\pst@scale{\ss@ldotssize}% +\rput(#1){\psdots[dotsize=\ss@ldotssize](-\ss@ldotssep;\ss@angle)(0,0)(\ss@ldotssep;\ss@angle)}% +}\ignorespaces} +%--- end psldots ----------------------------------------- + + +%--- ldotsnode ------------------------------------------- +\def\ldotsnode{\def\pst@par{}\pst@object{ldotsnode}} +\def\ldotsnode@i(#1)#2{{% +\use@par% +\ss@temp@dimC=.5\ss@signalsep% +\ss@temp@dimB=.5\ss@ldotssize% +\advance\ss@temp@dimB\ss@temp@dimC% +\ss@temp@dimA=\ss@ldotssep% +\advance\ss@temp@dimA\ss@temp@dimB% +\advance\ss@temp@dimA\ss@temp@dimC% +\edef\psk@framewidth{\pst@number\ss@temp@dimA}% +\edef\psk@frameheight{\pst@number\ss@temp@dimB}% +\rput{\ss@angle}(#1){\fnode[style=inv@frame](0,0){#2}}% +\psldots(#1)% +}\ignorespaces} +%--- end ldotsnode --------------------------------------- + + +%--- psblock --------------------------------------------- +\def\psblock{\def\pst@par{}\pst@object{psblock}} +\def\psblock@i(#1)#2#3{{% +\use@par% +\rput(#1){\rnode{#2}{\psframebox{#3}}}% +}\ignorespaces} +%--- end psblock ----------------------------------------- + + +%--- psfblock -------------------------------------------- +\def\psfblock{\def\pst@par{}\pst@object{psfblock}} +\def\psfblock@i(#1)#2#3{{% +\use@par% +\fnode(#1){#2}% +\rput(#1){#3}% +}\ignorespaces} +%--- end psfblock ---------------------------------------- + + +%--- psusampler ------------------------------------------ +\def\psusampler{\def\pst@par{}\pst@object{psusampler}} +\def\psusampler@i(#1)#2#3{{% +\use@par% +\psfblock(#1){#2}{$\mathord{\uparrow}#3$}% +}\ignorespaces} +%--- end psusampler -------------------------------------- + + +%--- psdsampler ------------------------------------------ +\def\psdsampler{\def\pst@par{}\pst@object{psdsampler}} +\def\psdsampler@i(#1)#2#3{{% +\use@par% +\psfblock(#1){#2}{$\mathord{\downarrow}#3$}% +}\ignorespaces} +%--- end psdsampler -------------------------------------- + + +%--- nclist ---------------------------------------------- +\def\nclist{\def\pst@par{}\pst@object{nclist}} +\def\nclist@i{\check@arrow{\nclist@ii}} +\def\nclist@ii#1{\@ifnextchar[{\nclist@iii{#1}}{\nclist@iv{#1}}} +% +\def\nclist@iii#1[#2]#3{{% +\use@par% +\def\ss@prevnode{}% +\@for\ss@for@ind:=#3\do{% +\ifx\@empty\ss@prevnode\@empty% +\let\ss@prevnode\ss@for@ind% +\else% +\ss@parse@III{\ss@for@ind}% +\csname#1\endcsname{\ss@prevnode}{\ss@parseA}% +\ifx\@empty\ss@parseB\@empty\else% +\ifx\@empty\ss@parseC\@empty% +\csname#2\endcsname{\ss@parseB}% +\else% +\csname\ss@parseB\endcsname{\ss@parseC}% +\fi\fi% +\let\ss@prevnode\ss@parseA% +\fi% +}% +}\ignorespaces} +% +\def\nclist@iv#1#2{{% +\use@par% +\def\ss@prevnode{}% +\@for\ss@for@ind:=#2\do{% +\ifx\@empty\ss@prevnode\@empty% +\else% +\csname#1\endcsname{\ss@prevnode}{\ss@for@ind}% +\fi% +\let\ss@prevnode\ss@for@ind% +}% +}\ignorespaces} +%--- end nclist ------------------------------------------ + + +%--- ncstar ---------------------------------------------- +\def\ncstar{\def\pst@par{}\pst@object{ncstar}} +\def\ncstar@i{\check@arrow{\ncstar@ii}} +\def\ncstar@ii#1{\@ifnextchar[{\ncstar@iii{#1}}{\ncstar@iv{#1}}} +% +\def\ncstar@iii#1[#2]#3#4{{% +\use@par% +\@for\ss@for@ind:=#3\do{% +\ss@parse@III{\ss@for@ind}% +\csname#1\endcsname{\ss@parseA}{#4}% +\ifx\@empty\ss@parseB\@empty\else% +\ifx\@empty\ss@parseC\@empty% +\csname#2\endcsname{\ss@parseB}% +\else% +\csname\ss@parseB\endcsname{\ss@parseC}% +\fi\fi% +}% +}\ignorespaces} +% +\def\ncstar@iv#1#2#3{{% +\use@par% +\@for\ss@for@ind:=#2\do{\csname#1\endcsname{\ss@for@ind}{#3}}% +}\ignorespaces} +%--- end ncstar ------------------------------------------ +\endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/pst-sigsys/pst-sigsys.sty b/Master/texmf-dist/tex/latex/pst-sigsys/pst-sigsys.sty index 732b8bedd27..0550056fe11 100644 --- a/Master/texmf-dist/tex/latex/pst-sigsys/pst-sigsys.sty +++ b/Master/texmf-dist/tex/latex/pst-sigsys/pst-sigsys.sty @@ -1,430 +1,7 @@ -%%========================================= -%% This is file 'pst-sigsys.sty' -%% It provides the pst-sigsys package. -%% ------------------------------------ -%% Author: Farshid Delgosha -%% E-mail: fdelgosha@gmail.com -%%========================================= +\RequirePackage{pstricks} +\ProvidesPackage{pst-sigsys}[2010/01/15 package wrapper for pst-sigsys.tex (fd)] +\input{pst-sigsys.tex} +\ProvidesFile{pst-sigsys.tex}[\pstsigsysFD\space v\pstsigsysFV\space `PST-sigsys' (fd)] -\ProvidesPackage{pst-sigsys}[2009/04/01 by Farshid Delgosha] +\endinput -\csname PSTsigsysLoaded\endcsname -\def\fileversion{1.1} -\def\filedate{2009/04/01} -\message{`PST-sigsys' v\fileversion, \filedate\space (Farshid Delgosha)} - -\ifx\PSTricksLoaded\endinput\else\input pstricks \fi -\ifx\PSTnodesLoaded\endinput\else\input pst-node \fi -\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi - - - -\newif\if@elegant \@eleganttrue -\newif\if@pstadd \@pstaddfalse - -\DeclareOption{notelegant}{\@elegantfalse} -\DeclareOption{pstadd}{\@pstaddtrue} - -\ExecuteOptions{} -\ProcessOptions* - -\if@elegant -\AtBeginDocument{\psset{framesep=.125,framearc=.25,linearc=.1}} -\fi - - -\SpecialCoor - - - - -%--- internal macros ------------------------------------- -\newdimen\ss@ticklength -\newdimen\ss@zerowidth -\newdimen\ss@zeroradius -\newdimen\ss@zeroradiusinc -\newdimen\ss@polewidth -\newdimen\ss@polelength -\newdimen\ss@oplength -\newdimen\ss@opwidth -\newdimen\ss@opsep -\newdimen\ss@ldotssep -\newdimen\ss@ldotssize -% -\newdimen\ss@temp@dimA -\newdimen\ss@temp@dimB -\newdimen\ss@temp@dimC -\newcount\ss@temp@cnt -\def\ss@temp{} -\def\ss@temp@choice{} -% -\def\pst@scale#1{\pssetlength{#1}{\ss@scale#1}} -% -\def\ss@LW{} -\newdimen\ss@LW@dim -\def\pst@scaleLW#1#2{% -\pssetlength{\ss@LW@dim}{#1\pslinewidth}% -\pst@dimtonum{\ss@LW@dim}{\ss@LW}% -\let#2\ss@LW% -} -% -\newdimen\ss@cross@dim -\def\ss@cross@angle{} -\def\ss@cross@temp{} -\def\pst@cross(#1;#2)#3{% -\pssetlength{\ss@cross@dim}{#2}% -\psaddtolength{\ss@cross@dim}{90}% -\pst@divide{\ss@cross@dim}{\psunit}\ss@cross@temp% -\psline[linewidth=#3,arrows=-](-#1;#2)(#1;#2)% -\psline[linewidth=#3,arrows=-](-#1;\ss@cross@temp)(#1;\ss@cross@temp)% -} -%--- end internal macros --------------------------------- - - -%--- new pstricks styles --------------------------------- -\newpsstyle{ArrowLen}{arrowsize=1.55mm,arrowlength=1.25,arrowinset=.25} -\newpsstyle{Arrow}{arrows=->,style=ArrowLen} -\newpsstyle{Dash}{linestyle=dashed,dash=.15 .08} -\newpsstyle{Graph}{linewidth=1.25pt,linearc=0} -\newpsstyle{Stem}{linewidth=1.25pt,linestyle=solid,stemhead=*} -%--- end new pstricks styles ----------------------------- - - -%--- new pstricks-add styles ----------------------------- -\if@pstadd -\newpsstyle{ArrowIn}{ArrowInside=->,style=ArrowLen} -\newpsstyle{DashDot}{linestyle=dashed,dash=.15 .055 .04 .055} -\newpsstyle{Brace}{braceWidth=.02,braceWidthInner=.115,braceWidthOuter=.115,ref=C} -\newpsstyle{BraceUp}{style=Brace,rot=-90,nodesepB=-\pslabelsep} -\newpsstyle{BraceDown}{style=Brace,rot=90,nodesepB=\pslabelsep} -\newpsstyle{BraceRight}{style=Brace,rot=-90,nodesepA=\pslabelsep} -\newpsstyle{BraceLeft}{style=Brace,rot=-90,nodesepA=-\pslabelsep} -\fi -%--- end new pstricks-add styles ------------------------- - - -%--- keys ------------------------------------------------ -\define@key[psset]{pst-sigsys}{scale}{\def\ss@scale{#1}} -\define@choicekey*[psset]{pst-sigsys}{xlpos}[\val\ss@temp@choice]{b,t}{% - \ifcase\ss@temp@choice\relax - \def\ss@xlpos{b} - \or - \def\ss@xlpos{t} - \fi -} -\define@choicekey*[psset]{pst-sigsys}{ylpos}[\val\ss@temp@choice]{r,l}{% - \ifcase\ss@temp@choice\relax - \def\ss@ylpos{r} - \or - \def\ss@ylpos{l} - \fi -} -\define@key[psset]{pst-sigsys}{ticklength}{\pssetlength{\ss@ticklength}{#1}} -\define@key[psset]{pst-sigsys}{stemhead}[]{\def\ss@stemhead{#1}} -\define@boolkey[psset]{pst-sigsys}[ss@]{stemtag}[true]{} -\define@key[psset]{pst-sigsys}{stemtagformat}[]{\def\ss@stemtagformat{#1}} -\define@key[psset]{pst-sigsys}{order}{\def\ss@order{#1}} -\define@key[psset]{pst-sigsys}{zerowidth}{\pssetlength{\ss@zerowidth}{#1}} -\define@key[psset]{pst-sigsys}{zeroradius}{\pssetlength{\ss@zeroradius}{#1}} -\define@key[psset]{pst-sigsys}{zeroradiusinc}{\pssetlength{\ss@zeroradiusinc}{#1}} -\define@key[psset]{pst-sigsys}{polewidth}{\pssetlength{\ss@polewidth}{#1}} -\define@key[psset]{pst-sigsys}{polelength}{\pssetlength{\ss@polelength}{#1}} -\define@key[psset]{pst-sigsys}{opwidth}{\pssetlength{\ss@opwidth}{#1}} -\define@key[psset]{pst-sigsys}{oplength}{\pssetlength{\ss@oplength}{#1}} -\define@key[psset]{pst-sigsys}{opsep}{\pssetlength{\ss@opsep}{#1}} -\define@choicekey*[psset]{pst-sigsys}{operation}[\val\ss@temp@choice]{plus,times}{% - \ifcase\ss@temp@choice\relax - \def\ss@angle{0} - \or - \def\ss@angle{45} - \fi -} -\define@key[psset]{pst-sigsys}{angle}{\def\ss@angle{#1}} -\define@key[psset]{pst-sigsys}{ldotssize}{\pssetlength{\ss@ldotssize}{#1}} -\define@key[psset]{pst-sigsys}{ldotssep}{\pssetlength{\ss@ldotssep}{#1}} -%--- end keys -------------------------------------------- - - -%--- default key values ---------------------------------- -\psset[pst-sigsys]{scale=1}% global -\psset[pst-sigsys]{xlpos=b,ylpos=r}% psaxeslabels -\psset[pst-sigsys]{ticklength=.075}% pshTick and psvTick -\psset[pst-sigsys]{stemhead=*,stemtag=false,stemtagformat=\scriptstyle}% psstem -\psset[pst-sigsys]{zerowidth=.7pt,zeroradius=.08,zeroradiusinc=.07,order=1}% pszero -\psset[pst-sigsys]{polewidth=.7pt,polelength=.12}% pspole -\psset[pst-sigsys]{opwidth=.7pt,oplength=.125,opsep=.1,operation=plus}% pscircleop and psframeop -\psset[pst-sigsys]{ldotssize=.05,ldotssep=.15,angle=0}% psldots -%--- end default key values ------------------------------ - -\pst@addfams{pst-sigsys} - - -%--- some new commands ----------------------------------- -\providecommand{\RE}{\ensuremath{\mathcal{R}\mathrm{e}}} -\providecommand{\IM}{\ensuremath{\mathcal{I}\mathrm{m}}} -\providecommand{\sRE}{\ensuremath{\scriptstyle\mathcal{R}\mathrm{e}}} -\providecommand{\sIM}{\ensuremath{\scriptstyle\mathcal{I}\mathrm{m}}} -%--------------------------------------------------------- - - -%--- psaxeslabels ---------------------------------------- -\def\psaxeslabels{\def\pst@par{}\pst@object{psaxeslabels}} -\def\psaxeslabels@i{\pst@getarrows\psaxeslabels@ii} -\def\psaxeslabels@ii(#1,#2)(#3,#4)(#5,#6)#7#8{{% -\use@par% -\psline(#3,#2)(#5,#2)% -\psline(#1,#4)(#1,#6)% -% -\if\ss@xlpos t% -\rput(#5,#2){\rput[rb](0,\pslabelsep){#7}}% -\else% -\rput(#5,#2){\rput[rt](0,-\pslabelsep){#7}}% -\fi% -% -\if\ss@ylpos l% -\rput(#1,#6){\rput[tr](-\pslabelsep,0){#8}}% -\else% -\rput(#1,#6){\rput[tl](\pslabelsep,0){#8}}% -\fi% -}\ignorespaces} -%--- end psaxeslabels ------------------------------------ - - -%--- pshtick --------------------------------------------- -\def\pshtick{\def\pst@par{}\pst@object{pshtick}} -\def\pshtick@i(#1)#2{{% -\use@par% -\rput(#1){\psline(-#2,0)(#2,0)}% -}\ignorespaces} -%--- end pshtick ----------------------------------------- - - -%--- psvtick --------------------------------------------- -\def\psvtick{\def\pst@par{}\pst@object{psvtick}} -\def\psvtick@i(#1)#2{{% -\use@par% -\rput(#1){\psline(0,-#2)(0,#2)}% -}\ignorespaces} -%--- end psvtick ----------------------------------------- - - -%--- pshTick --------------------------------------------- -\def\pshTick{\def\pst@par{}\pst@object{pshTick}} -\def\pshTick@i(#1){{% -\use@par% -\rput(#1){\psline(-\ss@ticklength,0)(\ss@ticklength,0)}% -}\ignorespaces} -%--- end pshTick ----------------------------------------- - - -%--- psvTick --------------------------------------------- -\def\psvTick{\def\pst@par{}\pst@object{psvTick}} -\def\psvTick@i(#1){{% -\use@par% -\rput(#1){\psline(0,-\ss@ticklength)(0,\ss@ticklength)}% -}\ignorespaces} -%--- end psvTick ----------------------------------------- - - -%--- psstem ---------------------------------------------- -\def\psstem{\def\pst@par{}\pst@object{psstem}} -\def\psstem@i{\@ifnextchar({\psstem@ii}{\psstem@ii(0,1)}} -\def\psstem@ii(#1,#2)#3{{% -\use@par% -\ss@temp@cnt=#1% -\@for\ss@for@ind:=#3\do{% -\psline{-\ss@stemhead}(\ss@temp@cnt,0)(\ss@temp@cnt,\ss@for@ind)% -% -\ifss@stemtag% -\pssetlength{\ss@temp@dimA}{\ss@for@ind}% -\ifdim\ss@temp@dimA<\z@% -\rput[b](\ss@temp@cnt,\pslabelsep){$\ss@stemtagformat\the\ss@temp@cnt$}% -\else% -\rput[t](\ss@temp@cnt,-\pslabelsep){$\ss@stemtagformat\the\ss@temp@cnt$}% -\fi\fi% -% -\advance\ss@temp@cnt#2}% -}\ignorespaces} -%--- end psstem ------------------------------------------ - - -%--- pszero ---------------------------------------------- -\def\pszero{\def\pst@par{}\pst@object{pszero}} -\def\pszero@i(#1)#2{{% -\use@par% -\pst@scale{\ss@zerowidth}% -\pst@scale{\ss@zeroradius}% -\pst@scale{\ss@zeroradiusinc}% -\pssetlength{\ss@temp@dimA}{\ss@zeroradius}% -\ss@temp@cnt=\ss@order% -\loop% -\cnode[linewidth=\ss@zerowidth](#1){\ss@temp@dimA}{#2}% -\psaddtolength{\ss@temp@dimA}{\ss@zeroradiusinc}% -\ifnum\ss@temp@cnt>\@ne% -\advance\ss@temp@cnt-\@ne% -\repeat% -}\ignorespaces} -%--- end pszero ------------------------------------------ - - -%--- pspole ---------------------------------------------- -% The main part of this code is borrowed from pst-node -% -\def\pspole{\def\pst@par{}\pst@object{pspole}} -\def\pspole@i(#1)#2{% -\leavevmode% -\hbox{% -\use@par% -\pst@scale{\ss@polelength}% -\pst@scale{\ss@polewidth}% -\pst@@getcoor{#1}% -\pssetlength\pst@dimc{\ss@polelength}% -\pst@dimg=\psk@dimen\pslinewidth% -\advance\pst@dimc-\pst@dimg% -\advance\pst@dimc.5\pslinewidth% -\ifnodealign% -\kern\pst@dimc% -\vrule width\z@ height \pst@dimc depth \pst@dimc% -\fi% -\rput(#1){\pst@cross(\ss@polelength;45){\ss@polewidth}}% -\pst@newnode{#2}{11}{\pst@coor \pst@number\pst@dimc}{\tx@InitCnode}% -\ifnodealign\kern\pst@dimc\fi% -}\ignorespaces} -%--- end pspole ------------------------------------------ - - -%--- pscircleop ------------------------------------------ -\def\pscircleop{\def\pst@par{}\pst@object{pscircleop}} -\def\pscircleop@i(#1)#2{{% -\use@par% -\pst@scale{\ss@oplength}% -\pst@scale{\ss@opsep}% -\pst@scale{\ss@opwidth}% -\pst@scale{\pslinewidth}% -\rput(#1){\pst@cross(\ss@oplength;\ss@angle){\ss@opwidth}}% -\pssetlength{\ss@temp@dimA}{\ss@oplength}% -\psaddtolength{\ss@temp@dimA}{\ss@opsep}% -\cnode(#1){\ss@temp@dimA}{#2}% -}\ignorespaces} -%--- end pscircleop -------------------------------------- - - -%--- psframeop ------------------------------------------- -\def\psframeop{\def\pst@par{}\pst@object{psframeop}} -\def\psframeop@i(#1)#2{{% -\use@par% -\pst@scale{\ss@oplength}% -\pst@scale{\ss@opsep}% -\pst@scale{\ss@opwidth}% -\pst@scale{\pslinewidth}% -\rput(#1){\pst@cross(\ss@oplength;\ss@angle){\ss@opwidth}}% -\pssetlength{\ss@temp@dimA}{2\ss@oplength}% -\psaddtolength{\ss@temp@dimA}{2\ss@opsep}% -\fnode[framesize=\ss@temp@dimA](#1){#2}% -}\ignorespaces} -%--- end psframeop --------------------------------------- - - -%--- psdisk ---------------------------------------------- -\def\psdisk{\def\pst@par{}\pst@object{psdisk}} -\def\psdisk@i(#1)#2{{% -\use@par% -\pscircle*[linewidth=0pt,linecolor=\psfillcolor](#1){#2}% -}\ignorespaces} -%--- end psdisk ------------------------------------------ - - -%--- psring ---------------------------------------------- -\def\psring{\def\pst@par{}\pst@object{psring}} -\def\psring@i(#1)#2#3{{% -\use@par% -\pssetlength{\ss@temp@dimA}{#2}% -\pssetlength{\ss@temp@dimB}{#3}% -\psaddtolength{\ss@temp@dimB}{-\ss@temp@dimA}% -\pscircle[dimen=inner,linewidth=\ss@temp@dimB,linecolor=\psfillcolor](#1){\ss@temp@dimA}% -}\ignorespaces} -%--- end psring ------------------------------------------ - - -%--- psdiskc --------------------------------------------- -\def\psdiskc{\def\pst@par{}\pst@object{psdiskc}} -\def\psdiskc@i(#1)(#2,#3)#4{{% -\use@par% -\pssetlength{\ss@temp@dimA}{#2}% -\pssetlength{\ss@temp@dimB}{#3}% -\ifdim\ss@temp@dimA>\ss@temp@dimB% -\pssetlength{\ss@temp@dimC}{1.5\ss@temp@dimA}% -\else% -\pssetlength{\ss@temp@dimC}{1.5\ss@temp@dimB}% -\fi% -\psclip{\rput(#1){\psframe[linewidth=0pt,linecolor=\psfillcolor](-#2,-#3)(#2,#3)}}% -\psring@i(#1){#4}{\ss@temp@dimC}% -\endpsclip% -}\ignorespaces} -%--- end psdiskc ----------------------------------------- - - -%--- psldots --------------------------------------------- -\def\psldots{\def\pst@par{}\pst@object{psldots}} -\def\psldots@i{{% -\use@par% -\pst@scale{\ss@ldotssep}% -\pst@scale{\ss@ldotssize}% -\psdots[dotsize=\ss@ldotssize](-\ss@ldotssep;\ss@angle)(0,0)(\ss@ldotssep;\ss@angle)% -}\ignorespaces} -%--- end psldots ----------------------------------------- - - -%--- psblock --------------------------------------------- -\def\psblock{\def\pst@par{}\pst@object{psblock}} -\def\psblock@i(#1)#2#3{{% -\use@par% -\rput(#1){\rnode{#2}{\psframebox{#3}}}% -}\ignorespaces} -%--- end psblock ----------------------------------------- - - -%--- psfblock -------------------------------------------- -\def\psfblock{\def\pst@par{}\pst@object{psfblock}} -\def\psfblock@i(#1)#2#3{{% -\use@par% -\fnode(#1){#2}% -\rput(#1){#3}% -}\ignorespaces} -%--- end psfblock ---------------------------------------- - - -%--- psusampler ------------------------------------------ -\def\psusampler{\def\pst@par{}\pst@object{psusampler}} -\def\psusampler@i(#1)#2#3{{% -\use@par% -\psfblock(#1){#2}{$\mathord{\uparrow} #3$}% -}\ignorespaces} -%--- end psusampler -------------------------------------- - - -%--- psdsampler ------------------------------------------ -\def\psdsampler{\def\pst@par{}\pst@object{psdsampler}} -\def\psdsampler@i(#1)#2#3{{% -\use@par% -\psfblock(#1){#2}{$\mathord{\downarrow} #3$}% -}\ignorespaces} -%--- end psdsampler -------------------------------------- - - -%--- nclist ---------------------------------------------- -\def\nclist{\def\pst@par{}\pst@object{nclist}} -\def\nclist@i#1#2{{% -\use@par% -\def\ss@nc{\csname #1\endcsname}% -\def\ss@prevnode{}% -\@for\ss@for@ind:=#2\do{% -\ifx\empty\ss@prevnode\empty% -\else% -\ss@nc{\ss@prevnode}{\ss@for@ind}% -\fi% -\let\ss@prevnode\ss@for@ind% -}% -}\ignorespaces} -%--- end nclist ------------------------------------------ -\endinput
\ No newline at end of file |