encoding utf-8 layout common debug off #Map Colours #color map-bg color map-fg DADADA #Symbols symbol-hide point station symbol-hide line survey symbol-colour line abyss-entrance [02bb2a] symbol-colour area water [1733de] symbol-colour area sump [1733de] symbol-colour line water-flow [1733de] symbol-colour point water-flow [1733de] symbol-colour line handrail [6e440e] symbol-set BCRA #symbol-assign point pebbles AUT #symbol-assign point clay AUT #symbol-assign area clay AUT code metapost #Custom Pebble Density def a_pebbles (expr p) = T:=identity; pickup PenC; path q, qq; q = bbox p; picture tmp_pic; tmp_pic := image( for i = xpart llcorner q step 1.00u until xpart urcorner q: for j = ypart llcorner q step 1.00u until ypart urcorner q: qq := (superellipse((.2u,0),(0,.1u),(-.2u,0),(0,.-.1u),.75)) % randomized (u/25) rotated uniformdeviate(360) shifted ((i,j) randomized 0.6u); if xpart (p intersectiontimes qq) < 0: thdraw qq; fi; endfor; endfor; ); clip tmp_pic to p; draw tmp_pic; enddef; #Water Pattern Custom beginpattern(pattern_water_my); draw origin--50up withpen pensquare scaled (0.08u); patternxstep(.4u); patterntransform(identity rotated 45); endpattern; def a_water (expr Path) = T:=identity; thclean Path; thfill Path withpattern pattern_water_my; enddef; #Sump Pattern custom beginpattern(pattern_sump_my); draw origin--(0,.4u) withpen pensquare scaled (0.08u); draw origin--(.4u,0) withpen pensquare scaled (0.08u); patterntransform(identity rotated 45); endpattern; def a_sump (expr Path) = T:=identity; thclean Path; thfill Path withpattern pattern_sump_my; enddef; #Custom Block Points def p_blocks (expr pos,theta,sc,al)= U:=(.5u,.5u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.5u,-.5u)--(.3u,-.4u)--(-.17u,.2u)--cycle; thdraw (.25u,-.25u)--(.5u,-.15u)--(.3u,.5u)--(-.1u,.5u)--cycle; thdraw (-.27u,0)--(-.1u,.3u)--(-.5u,.35u)--cycle; enddef; #Custom Clay Symbol def p_clay_my (expr P,R,S,A)= T:=identity aligned A rotated R scaled S shifted P; pickup PenC; #thfill (.06u,.47u)--(.3u,.47u)--(.3u,.45u)--(.06u,.45u)--cycle; #thfill (-.29u,.16u)--(-.05u,.16u)--(-.05u,.14u)--(-.29u,.14u)--cycle; #thfill (.23u,-.01u)--(.47u,-.01u)--(.47u,-.03u)--(.23u,-.03u)--cycle; #thfill (-.45u,-.3u)--(-.45u,-.28u)--(-.21u,-.28u)--(-.21u,-.3u)--cycle; #thfill (.13u,-.37u)--(.37u,-.37u)--(.37u,-.39u)--(.13u,-.39u)--cycle; thdraw (.06u,.47u)--(.3u,.47u); thdraw (-.29u,.16u)--(-.05u,.16u); thdraw (.23u,-.01u)--(.47u,-.01u); thdraw (-.45u,-.3u)--(-.21u,-.3u); thdraw (.13u,-.37u)--(.37u,-.37u); enddef; initsymbol("p_clay_my"); let p_clay = p_clay_my; # Water Borders Bodge def l_u_water (expr P) = pickup PenB; draw P withcolor blue; enddef; #Compass rose maybe def s_northarrow (expr rot) = scale_value = 0.5; decl := MagDecl; T := identity; picture tmp_pic; tmp_pic = image ( pickup pencircle scaled 1; thdraw fullcircle scaled 4cm; thdraw fullcircle scaled 2.75cm; pickup pencircle scaled .5; thdraw fullcircle scaled 3.75cm; for whereto=11.25 step 22.5 until 360: thdraw dir(whereto)*2.75/2cm--dir(whereto)*3.75/2cm; endfor; % arrows path halfarrow; halfarrow = (+.3cm,.3cm)--(0,2cm)--(0,0)--cycle; for whereto = 45 step 90 until 315: % thfill halfarrow scaled .85 rotated whereto withcolor .30; pickup pencircle scaled 1; for halfarrowgrad = 1 step -.05 until 0: thdraw ((halfarrowgrad*.3cm, halfarrowgrad*.3cm)--(0,2cm)) scaled .85 rotatedaround ((0, 0),whereto) withcolor .75halfarrowgrad; endfor; pickup pencircle scaled .5; thdraw halfarrow scaled .85 rotated whereto;; thfill halfarrow xscaled -1 scaled .85 rotated whereto withcolor white; thdraw halfarrow xscaled -1 scaled .85 rotated whereto;; endfor; for whereto = 0 step 90 until 270: % thfill halfarrow scaled 1.15 rotated whereto withcolor .30; pickup pencircle scaled 1; for halfarrowgrad = 1 step -.05 until 0: thdraw ((halfarrowgrad*.3cm, halfarrowgrad*.3cm)--(0,2cm)) scaled 1.15 rotatedaround ((0, 0),whereto) withcolor .75halfarrowgrad; endfor; pickup pencircle scaled .5; thdraw halfarrow scaled 1.15 rotated whereto;; thfill halfarrow xscaled -1 scaled 1.15 rotated whereto withcolor white; thdraw halfarrow xscaled -1 scaled 1.15 rotated whereto;; endfor; % central circles thfill fullcircle scaled .56cm withcolor 1white; pickup pencircle scaled .5; thdraw fullcircle scaled .56cm; thfill fullcircle scaled .3cm withcolor .30; % characters label.bot(thTEX("\bf{}N") scaled 1.5, (0,2.9cm)); label.lft(thTEX("\bf{}E") scaled 1.5, (2.9cm,0)); label.rt (thTEX("\bf{}W") scaled 1.5, (-2.95cm,0)); label.top(thTEX("\bf{}S") scaled 1.5, (0,-2.9cm)); % space among characters pickup pencircle scaled .5; thdraw (dir(45)*2cm)--(dir(45)*2.5cm); thdraw (dir(135)*2cm)--(dir(135)*2.5cm); thdraw (dir(225)*2cm)--(dir(225)*2.5cm); thdraw (dir(315)*2cm)--(dir(315)*2.5cm); ); thdraw tmp_pic scaled scale_value rotatedaround (origin, - rot); enddef; endcode endlayout