&rem NARROW.SML &rem **** draw north arrow in ARCPLOTW ********************************* &rem Original version: 6/18/95 mtc &rem Revised for 3.5: 7/23/96 mtc &rem **** establish parameters **************************************** &goto usage &if &eq "x%-1" "x" &goto usage &if &eq "x%-1" "x/?" &goto usage &if &eq "x%-2" "x" &sv -7 %-1 &sv -8 %-2 &goto *TRUE_0000* &if &EQ "x%-3" "x" &goto *FALSE0000* &if &NE "x%-3" "x#" &LABEL *TRUE_0000* &sv -9 1 &goto *END__0000* &LABEL *FALSE0000* &sv -9 %-3 &LABEL *END__0000* &goto *TRUE_0002* &if &EQ "x%-4" "x" &goto *FALSE0002* &if &NE "x%-4" "x#" &LABEL *TRUE_0002* &sv -10 0 &goto *END__0002* &LABEL *FALSE0002* &sv -10 %-4 &LABEL *END__0002* UNITS PAGE &rem **** draw north arrow polygons *********************************** SHADESET COLOR255.SHD SHADESYMBOL 1 LINESET COLOR255.LIN LINESYMBOL 1 &sv -5 1 &LABEL *WHILE0004* &goto *END__0004* &if &NR %-5 -1 1 &sv -6 1 &LABEL *WHILE0005* &goto *END__0005* &if &NR %-6 -1 1 &rem **** find sin and cos of beta (alpha + xã/4) *************** &cv -1 ( ( %-10 sin ) * %-6 ) + ( ( %-10 cos ) * %-5 ) &cv -2 ( ( %-10 cos ) * %-6 ) - ( ( %-10 sin ) * %-5 ) &cv -11 %-7 + ( %-9 * 0.07 * %-2 ) &cv -12 %-8 + ( %-9 * 0.07 * %-1 ) &rem **** next angle is beta + ã/4 ****************************** &cv -13 %-7 + ( %-9 * 0.25 * ( %-2 - %-1 ) ) &cv -14 %-8 + ( %-9 * 0.25 * ( %-1 + %-2 ) ) SHADE %-7 %-8 %-11 %-12 %-13 %-14 LINE %-7 %-8 %-11 %-12 %-13 %-14 %-7 %-8 &rem **** next angle is beta + ã/2 ****************************** &cv -11 %-7 - ( %-9 * 0.07 * %-1 ) &cv -12 %-8 + ( %-9 * 0.07 * %-2 ) LINE %-7 %-8 %-11 %-12 %-13 %-14 %-7 %-8 &cv -6 %-6 - 2 &goback *WHILE0005* &LABEL *END__0005* &cv -5 %-5 - 2 &goback *WHILE0004* &LABEL *END__0004* &rem **** draw "N" **************************************************** TEXTSET PLOTTER.TXT TEXTSYMBOL 41 SHOW TEXTANGLE -3 TEXTANGLE %-10 TEXTSIZE %<%-9 * 0.1> %<%-9 * 0.125> &rem **** find beta = alpha + angle corresponding to 0.05 shift ******* &cv -1 ( ( %-10 sin ) * 0.99655 ) + ( ( %-10 cos ) * 0.08305 ) &cv -2 ( ( %-10 cos ) * 0.99655 ) - ( ( %-10 sin ) * 0.08305 ) &rem **** find beta + ã/2 ********************************************* &cv -11 %-7 - ( %-9 * 0.6 * %-1 ) &cv -12 %-8 + ( %-9 * 0.6 * %-2 ) MOVE %-11 %-12 TEXT 'N' TEXTANGLE %-3 &return &label usage &type "Usage: &r NARROW [x] [y] {width} {angle}" &type " " &type " x = midpoint x coordinate in page units" &type " y = midpoint y coordinate in page units" &type " width = width of north arrow in page units" &type " (default = 1)" &type " angle = angle of north arrow in decimal degrees" &type " (default = 0)" &return &rem ******************************************************************