%! % snalyze fourier % calc sin (2pi/n) / (sinpi/n) {3pi/10} / (pi/10) /pi 180 store 72 sin 36 sin div == /weak 1.000 store /strong 1.618035 store /totalsamps 10000 store /makearray { mark 500 { 0 } repeat 1000 {weak} repeat 1000 {strong} repeat 1000 {strong} repeat 1000{weak} repeat 1000 {0} repeat 1000{weak neg} repeat 1000{strong neg} repeat 1000{strong neg} repeat 1000 {weak neg} repeat 500 {0 neg} repeat ]} store makearray /arr exch store % arr == arr length == (\n\n\n) print 1 1 12 {/harm exch store 0 0 1 totalsamps 1 sub {/cur exch store cur 27.77777 div harm mul sin arr cur get mul add } for % harm 1 eq { % dup /h1 exch store % } if % h1 div % normalize 8367.28 div == } for showpage % eof