NB. Plot output of "Power_law.ijs" as polar diagram NB. Usage: polar_plot Z -- where "Z" contains the angles and NB. elements of the scattering matrix output by "Power_law.ijs" polar_plot=: monad define 'adeg s11 s12 s33 s34'=. y xx=. cos ar=. (1p1%180)*adeg yy=. sin ar pxx=. 1 reflct xx*(s11-s12) pyy=. _1 reflct yy*(s11-s12) rxx=. 1 reflct xx*(s11+s12) ryy=. _1 reflct yy*(s11+s12) vxx=. 1 reflct xx*(-s12%s11) vyy=. _1 reflct yy*(-s12%s11) c=. % max=. >./ s11+|s12 options=. 'title Polar Plot of Scattering Phase Function' options=. options,';axes 0 0;grids 0 0;aspect 1.0;type line' options=. options,';frame 1;xrange _1 1;yrange _1 1; pensize 3' pd'reset' pd options pd (c*pxx);(c*pyy) pd (c*rxx);(c*ryy) pd vxx;vyy pd 'pensize 1;color black' pd (0,0);(_1,1) pd (_1,1);(0,0) pd 'show' pd 'pdf' ) reflct=: dyad : 'y, x*|.y'