factor out meander spacing and pass calculations so they can be seen outside meander