%!PS % this Postscript program displays the gear ratios for given gears %enter your gears here /rear [ 12 13 14 15 16 17 19 21 25 30 ] def /front [ 24 39 46 ] def % the rest is magic /over {1 index} def /pick {index} def /drop {pop} def /swap {exch} def 1 setlinejoin 0 0 translate %.91 .91 scale 0.3 setlinewidth %transformation /tf {swap ln 1 add 200 mul swap 100 add} def /tick {tf moveto 0 15 rlineto} def 0 front { swap 9 add swap rear {over swap div 2 pick tick} forall drop } forall drop stroke newpath /Helvetica findfont 10 scalefont setfont /ybase -2 def /str 20 string def /xjcenter {dup stringwidth pop 2 div neg 0 rmoveto} def /xtick {dup ybase tf moveto 0 -2 rlineto 0 -10 rmoveto str cvs xjcenter show} def [0.8 1 1.25 1.6 2 2.5 3.2 4] {xtick} forall stroke showpage