encoding utf-8 #Changing the names of things in the legend to be proper. Rule Britania and all. Also hiding some that aren't necessary text en "point soda-straw" "straws" text en "line abyss-entrance" "open to sky" text en "line u:water" "" text en "point blocks" "rocks" text en "point pebbles" "cobbles" text en "point clay" "mud" text en "line rock-border" "" text en "line rock-edge" "" text en "line border:visible" "" text en "area blocks" "" text en "line floor-meander" "rift" text en "line map-connection" "offset" text en "line floor-step" "pitch/climb" text en "line ceiling-step" "aven" text en "line wall:flowstone" "flowstone" text en "line pit" "" text en "point rimstone-dam" "gour pool" 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; # Custom Clay Area def a_clay_my (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 := ((-.29u,.16u)--(-.05u,.16u)) % 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; initsymbol("a_clay_my"); let a_clay = a_clay_my; # Custom Slope Arrow Point def p_gradient (expr P,R,S,A) = U:=(.15u, .4u); T:=identity aligned A rotated R scaled S shifted P; pickup PenC; #Left Hand side thdraw (-.3u, -.2u) -- (-.7u, .1u); thdraw (-.2u, -.1u) -- (-.4u, .6u); #Centerline thdraw (0u, 0u) -- (0u, .9u); #Right side thdraw (.3u, -.2u) -- (.7u, .1u); thdraw (.2u, -.1u) -- (.4u, .6u); enddef; initsymbol ("p_gradient"); # Water Borders def l_u_water (expr P) = pickup PenB; draw P withcolor blue; enddef; #Compass, heavily edited def s_northarrow (expr rot) = scale_value = 1.5; decl := MagDecl; T := identity; picture tmp_pic; tmp_pic = image ( % 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 .; # 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 .5; 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; % characters label.bot(thTEX("\bf{}N") scaled 4, (0,4.1cm)); label.bot(thTEX("\bf{}mag") 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)*1cm)--(dir(45)*1.5cm); thdraw (dir(135)*1cm)--(dir(135)*1.5cm); thdraw (dir(225)*1cm)--(dir(225)*1.5cm); thdraw (dir(315)*1cm)--(dir(315)*1.5cm); ); thdraw tmp_pic scaled scale_value rotatedaround (origin, - rot); enddef; endcode #Custom Scale bar code metapost def s_scalebar (expr l, units, txt) = % l = value of scale-bar length % units = ?? % txt = string representing units begingroup interim warningcheck:=0; tmpl:=l / Scale * cm * units / 2; % tmpl = half plotted length of scale bar from central top insertion point tmpx:=l / Scale * cm * units / 5; tmph:=13bp; % bar height endgroup; pickup PenC; draw (-tmpl,0)--(tmpl,0)--(tmpl,-tmph)--(-tmpl,-tmph)--cycle; p:=(0,0)--(tmpx,0)--(tmpx,-tmph)--(0,-tmph)--cycle; for i:=-0.5 step 2 until 2: % start drawing at the third block (leave space for smaller divisions) fill p shifted (i * tmpx,0); endfor; % Draw first part with subdivided blocks p:=(0,0)--(tmpx/5,0)--(tmpx/5,-tmph)--(0,-tmph)--cycle; % define width of segment (tmpx is length of a normal bar segment) for i:=-2.5 step 2/5 until -0.75: % Startpos, segments, count-index fill p shifted (i * tmpx,0) withcolor black; endfor; % Label of scale: Scalebar top, values below begingroup interim labeloffset:=3.5bp; for i:=0 step (l/5) until (l-1): tmpx:=tmpl * (i * 2 / l - 1); label.bot(thTEX("\size[20]" & decimal (i)),(tmpx,-tmph)); endfor; label.bot(thTEX("\size[20]" & decimal (l) & "\thinspace" & txt),(tmpl,-tmph)); endgroup; enddef; endcode endlayout