The trigram corresponding to each Taegeuk pattern determines whether we step forward or not with each technique in the pattern (at least the ones that travel along the lines).
One of my moments of personal pride was back when I was a 7th gup and figured that out on my own. I noticed that each of the three Taegeuk forms I had learned had three horizontal bars. I went over them in my head and realized that some bars have full steps east/west and some don't (that is, you have one foot in each half bar that touches the floor only at the center line). I was in class facing the Korean flag one day and it hit me that the eight trigrams might be hidden in the designs, so I looked up the movements for the other five forms in the series and discovered that, yes indeed, each one has a unique combination of stepped and unstepped bars.
My theory was then confirmed when I later came across a list of trigrams and their meanings, and I recognized that the meanings were the same as the ones we learned associated with our forms. I mentioned this on our school's mailing list (at the risk of being admonished for studying the patterns of forms I hadn't yet been given), and one of the instructors filled in some more information for me.
I'm not sure there's any theory behind the number of steps we take to get from one line to the next. Does anyone know any different?
I haven't found (or learned of) any pattern to the number or length of the steps. However, the vertical (north/south) movements are designed so that the distance between the bars within a given form will be equal and also so that the total motion north/forward will equal the south/backward motion when the stances and pivots are executed correctly (so that one starts and finishes in the exact same spot).
Something I was wondering about earlier today, though, is whether there is meaning behind the sequence in which the bars are made. (Taegeuks 1, 2, 3, 6, & 7 go Bottom-Middle-Top, 4 & 5 go B-T-M, and 8 goes M-T-B).