/* /*NORTH ARROW PLOT AML FOR DECLINATIONS BETWEEN 0 AND 90 /*DEGREES EAST /* /*BY R.W. GRAYMER /* /*MARCH 2, 1998 /* /*GET DECLINATION AND SET ERROR HANDLING /* &args dec &severity &warning &ignore &severity &error &routine error &if [null %dec%] &then &sv dec [response 'enter the magnetic declination in the map area' 0] &label deccheck &if %dec% le 0 &then &sv dec [response 'enter a declination greater than zero' 0] &if %dec% ge 90 &then &sv dec [response 'enter a declination less than 90' 0] &if %dec% le 0 or %dec% ge 90 &then &goto deccheck /* /*SETUP /* linedelete all shadedelete all pages 3 3 pageu cm lineset geology.lin /*MAKE SURE THESE SYMBOLSETS ARE shadeset alc1.shd /*AVAILABLE linesymbol 25 /* /*DEFINE VARIABLES /* &sv arcan = 90 - %dec% /*CLOCKWISE ANGLE USED BY ARCPLOT &sv dsa = -73.5 - %dec% /*DOWNSTROKE ANGLE FOR DEC ARROWHEAD &sv usa = 136.5 - %dec% /*UPSTROKE ANGLE FOR DEC ARROWHEAD &sv x1 = .5 + 2 * [cos .13] /*POINTS FOR DRAWING DASHED ARC &sv y1 = .5 + 2 * [sin .13] &sv x2 = .5 + 2 * [cos .26] &sv y2 = .5 + 2 * [sin .26] &sv x3 = .5 + 2 * [cos .39] &sv y3 = .5 + 2 * [sin .39] &sv x4 = .5 + 2 * [cos .52] &sv y4 = .5 + 2 * [sin .52] &sv x5 = .5 + 2 * [cos .65] &sv y5 = .5 + 2 * [sin .65] &sv x6 = .5 + 2 * [cos .78] &sv y6 = .5 + 2 * [sin .78] &sv x7 = .5 + 2 * [cos .92] &sv y7 = .5 + 2 * [sin .92] &sv x8 = .5 + 2 * [cos 1.05] &sv y8 = .5 + 2 * [sin 1.05] &sv x9 = .5 + 2 * [cos 1.18] &sv y9 = .5 + 2 * [sin 1.18] &sv x10 = .5 + 2 * [cos 1.31] &sv y10 = .5 + 2 * [sin 1.31] &sv x11 = .5 + 2 * [cos 1.44] &sv y11 = .5 + 2 * [sin 1.44] &sv halfdec = %dec% / 2 /*VARIABLES FOR DRAWING DECLINATION &sv textcan = 90 - %halfdec% /*ANGLE TEXT &sv textan = -1 * %halfdec% /* /*DRAW ARROW LINES /* coordinate keyboard xy line .5 .5 .5 2.5 line .5 .5 P: %arcan% 2 /* /*DRAW DASHED ARC /* linesymbol 26 &if %dec% le 7.5 &then &do line spline L: .5 2.5 &end &if %dec% gt 7.5 and %dec% le 15 &then &do line spline L: %x11% %y11% .5 2.5 &end &if %dec% gt 15 and %dec% le 22.5 &then &do line spline L: %x10% %y10% %x11% %y11% .5 2.5 &end &if %dec% gt 22.5 and %dec% le 30 &then &do line spline L: %x9% %y9% %x10% %y10% %x11% %y11% .5 2.5 &end &if %dec% gt 30 and %dec% le 37.5 &then &do line spline L: %x8% %y8% %x9% %y9% %x10% %y10% %x11% %y11% .5 2.5 &end &if %dec% gt 37.5 and %dec% le 45 &then &do line spline L: %x7% %y7% %x8% %y8% %x9% %y9% %x10% %y10% %x11% %y11% .5 2.5 &end &if %dec% gt 45 and %dec% le 52.5 &then &do line spline L: %x6% %y6% %x7% %y7% %x8% %y8% %x9% %y9% %x10% %y10% ~ %x11% %y11% .5 2.5 &end &if %dec% gt 52.5 and %dec% le 60 &then &do line spline L: %x5% %y5% %x6% %y6% ~ %x7% %y7% %x8% %y8% %x9% %y9% %x10% %y10% %x11% %y11% .5 2.5 &end &if %dec% gt 60 and %dec% le 67.5 &then &do line spline L: %x4% %y4% %x5% %y5% %x6% %y6% ~ %x7% %y7% %x8% %y8% %x9% %y9% %x10% %y10% %x11% %y11% .5 2.5 &end &if %dec% gt 67.5 and %dec% le 75 &then &do line spline L: %x3% %y3% %x4% %y4% %x5% %y5% %x6% %y6% ~ %x7% %y7% %x8% %y8% %x9% %y9% %x10% %y10% %x11% %y11% .5 2.5 &end &if %dec% gt 75 and %dec% le 82.5 &then &do line spline L: %x2% %y2% %x3% %y3% %x4% %y4% %x5% %y5% %x6% %y6% ~ %x7% %y7% %x8% %y8% %x9% %y9% %x10% %y10% %x11% %y11% .5 2.5 &end &if %dec% gt 82.5 &then &do line spline L: %x1% %y1% %x2% %y2% %x3% %y3% %x4% %y4% %x5% %y5% %x6% %y6% ~ %x7% %y7% %x8% %y8% %x9% %y9% %x10% %y10% %x11% %y11% .5 2.5 &end /* /*DRAW ARROW HEADS /* shade .5 2.5 .55 2.3 .5 2.33 .45 2.3 move .5 .5 shade P: %arcan% 2 P: %dsa% .2 P: %usa% .08 /* /*DRAW TEXT /* textdelete all textset font.txt textsymbol 1 textsize 5 pt textstyle typeset move .5 .5 move P: %textcan% 2.0 textangle %textan% textjustification lc text [quote [unquote %dec%'!pat1713;']] /* move .5 .5 textangle %arcan% textoffset .05 textjustification ul text 'MAGNETIC NORTH' textangle 90 textjustification ll textoffset -.05 .05 move .5 .5 text 'TRUE NORTH' &ret /*********************** &routine error &severity &error &ignore &type an error has occurred, cancelling plot of northarrow &ret; &ret