def s_northarrow (expr rot) = valscal=1.2; % scale your north arrow here decl:=MagDecl; T:=identity; picture tmp_pic; tmp_pic = image ( pickup pencircle scaled .3; thfill fullcircle scaled 4cm withcolor 1white; thdraw fullcircle scaled 3.1cm; thdraw fullcircle scaled 4.05cm; pickup pencircle scaled .1; thdraw fullcircle scaled 3cm; thdraw fullcircle scaled 4cm; pickup pencircle scaled .2; thdraw (dir(45)*2.025cm)--(dir(45)*3.7cm); thdraw (dir(135)*2.025cm)--(dir(135)*3.7cm); thdraw (dir(225)*2.025cm)--(dir(225)*3.7cm); thdraw (dir(315)*2.025cm)--(dir(315)*3.7cm); pickup pencircle scaled .1; for whereto=0 step 15 until 345: thdraw dir(whereto)*.65cm--dir(whereto)*.9cm; thdraw dir(whereto)*1.4cm--dir(whereto)*1.5cm; endfor; for whereto=0 step 5 until 355: thdraw dir(whereto)*.65cm--dir(whereto)*.8cm; thdraw dir(whereto)*1.45cm--dir(whereto)*1.5cm; endfor; for whereto=0 step 1 until 359: thdraw dir(whereto)*1.94cm--dir(whereto)*2cm; endfor; pickup pencircle scaled 1; thdraw fullcircle scaled 1cm; thdraw fullcircle scaled 1.1cm; thdraw fullcircle scaled 1.3cm withpen pencircle scaled .3; vald=90-decl; texrot=0-decl; drawarrow(dir(vald)*-2cm--dir(vald)*2cm) withpen pencircle scaled .2; thdraw image(label.top(btex $mg$ etex, (0,0)) scaled .5 rotated texrot;) shifted (dir(vald)*2.04cm); thfill (1.06cm,1.06cm)--(0,.2cm)--(-1.06cm,1.06cm)--(-.2cm,0)--(-1.06cm,-1.06cm)--(0,-.2cm)--(1.06cm,-1.06cm)--(.2cm,0)--cycle; thfill (-.2cm,.2cm)--(0,2cm)--(0,0)--cycle; thfill (.2cm,-.2cm)--(0,-2cm)--(0,0)--cycle; thfill (.2cm,.2cm)--(2cm,0)--(0,0)--cycle; thfill (-.2cm,-.2cm)--(-2cm,0)--(0,0)--cycle; thfill (.2cm,.2cm)--(-0,2cm)--(0,0)--cycle withcolor 1white; thfill (.2cm,-.2cm)--(2cm,0)--(0,0)--cycle withcolor 1white; thfill (-.2cm,-.2cm)--(0,-2cm)--(0,0)--cycle withcolor 1white; thfill (-.2cm,.2cm)--(-2cm,0)--(0,0)--cycle withcolor 1white; pickup pencircle scaled .2; thdraw (-.2cm,.2cm)--(0,2cm)--(.2cm,.2cm)--(2cm,0cm)--(.2cm,-.2cm)--(0,-2cm)--(-.2cm,-.2cm)--(-2cm,0)--cycle; thfill fullcircle scaled .56cm withcolor 1white; pickup pencircle scaled .1; thdraw (.28cm,0)..(0,.28cm)..(-.28cm,0)..(0,-.28cm)..cycle; pickup pencircle scaled .4; thdraw (.2cm,0)..(0,.2cm)..(-.2cm,0)..(0,-.2cm)..cycle; label.bot(btex $N$ etex, (0,2.6cm)); label.lft(btex $E$ etex, (2.6cm,0)); label.rt(btex $W$ etex, (-2.6cm,0)); label.top(btex $S$ etex, (0,-2.6cm)); ); thdraw tmp_pic scaled valscal rotatedaround(origin, -rot); enddef;