I recently had to draw multiple trellises for space-time block codes (first introduced in this paper; the open-access version is here). I'd like to share the code with you here, so that the work doesn't have to be done twice.
As you see, I created a new command for plotting a trellis, where you can add the number of states, the PSK order, and the x- and y-distance between points as arguments:
\documentclass[a4paper]{article} \usepackage{pst-plot,pst-sigsys} \usepackage[nomessages]{fp} \newcommand{\trellis}[4]{ \def \STATES {#1} \def \PSK {#2} \def \XDISTANCE {#3} \def \YDISTANCE {#4} \FPupn\NGROUPS{\STATES{} \PSK{} div 0 trunc} \multido{\ryA=0+-\YDISTANCE,\nA=1+1}{\STATES}{% \dotnode(0,\ryA){dotA\nA} \dotnode(\XDISTANCE,\ryA){dotB\nA} } \multido{\nG=1+1,\nOffset=1+\PSK}{\NGROUPS}{% \multido{\nStart=\nG+\NGROUPS}{\PSK}{% \multido{\nArrows=\nOffset+1}{\PSK}{% \ncline{dotA\nStart}{dotB\nArrows} } } } } \begin{document} \begin{pspicture}[showgrid=true](0,0)(12,-20) \rput(0,0){\trellis{4}{4}{1.}{1}} \rput(3,0){\trellis{16}{4}{1.5}{1}} \rput(6,0){\trellis{8}{8}{2.25}{2.25}} \end{pspicture} \end{document}