Scale:=10.00; color HelpSymbolColor; HelpSymbolColor := (0.8, 0.8, 0.8); background:=(1.00000,1.00000,1.00000); verbatimtex \input th_enc.tex etex; %% therion source code %% %% therion.mp %% %% This file defines low-level MetaPost macros and variables required %% for generation of map symbols %% %% $Date: 2003/07/01 09:06:44 $ %% $RCSfile: therion.mp,v $ %% $Revision: 1.3 $ %% %% Copyright (C) 2000-2003 Martin Budaj %% %% Some macros are adapted from MPATTERN package of P. Bolek %% %% Some macros are used from MetaFun package of H. Hagen %% %% -------------------------------------------------------------------- %% This program is free software; you can redistribute it and/or modify %% it under the terms of the GNU General Public License as published by %% the Free Software Foundation; either version 2 of the License, or %% any later version. %% %% This program is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %% GNU General Public License for more details. %% %% You should have received a copy of the GNU General Public License %% along with this program; if not, write to the Free Software %% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA %% -------------------------------------------------------------------- % This file defines low level macros used for map signatures in Therion. % Before loading this file set `Scale' variable to numeric value % representing denominator of the scale ratio. Internal variable % `prologues' is set to 1 by this file. This module loads also % symbol libraries. tracingstats:=1; prologues:=0; if known Background: background:=Background fi; %TrueScale:=Scale; % @VARIABLE % symbol_scale -- % % internal numeric; in map symbol definitions used for scaling % in T transformation; recommended % values are 1 or 2. %newinternal symbol_scale; %symbol_scale := 1; % @VARIABLE % fill_only -- % % boolean, used in thdraw and % thpattfill commands. When set to false, it has % no effect, when it is true, it supresses all drawing % commands with exception of thpermanentfill, so that only filled % areas are drawn boolean fill_only, horiz_labels, transparency; fill_only := false; horiz_labels:=true; transparency:=false; string ATTR__id, ATTR__survey, ATTR__scrap; boolean ATTR__scrap_centerline; picture ATTR__text; numeric ATTR__height; boolean ATTR__elevation; ATTR__scrap_centerline := false; ATTR__height:=0; ATTR__elevation:=false; boolean ATTR__shotflag_splay; ATTR__shotflag_splay:=false; boolean ATTR__shotflag_duplicate; ATTR__shotflag_duplicate:=false; boolean ATTR__shotflag_approx; ATTR__shotflag_approx:=false; boolean ATTR__stationflag_splay; ATTR__stationflag_splay:=false; color label_fill_color, label_fill_color_tmp; label_fill_color := (1.0, 1.0, 1.0); def push_label_fill_color(expr r,g,b) = label_fill_color_tmp := label_fill_color; label_fill_color := (r,g,b); enddef; def pop_label_fill_color = label_fill_color := label_fill_color_tmp; enddef; def process_filledlabel(expr cent, rot) = begingroup; interim bboxmargin:=2.0bp; q:=((bbox lab) smoothed 2) rotatedaround (cent, rot); fill q withcolor label_fill_color; draw lab rotatedaround (cent, rot); write_circ_bbox(q); % without corners smoothing it was enough to use % write_bbox(q); endgroup; enddef; numeric area_border_errors; area_border_errors = 0; % @VARIABLE % last_write -- % % numeric; charcode of last figure which contained % write_bbox macro; this value is used by % close_file macro. Initially set to -1. numeric last_write; last_write = -1; % @VARIABLE % strut_string -- % % string containing combination of the "highest" and "lowest" character % in used font; it's used by free_text macro. %string strut_string; %strut_string = "(È"; % @VARIABLE % file_name -- % % string, name of file, where write_bbox macro writes % text clipping path % @VARIABLE % s ch -- % % string, temporary string/char variables string s, ch, file_name, bg_name, clip_name, lang, diff_pos, diff_neg, current_scrap, current_src; % @VARIABLE % u v w -- % % internal numeric variables used as basic length units for drawing; % they are set by initialize macro. % % @VARIABLE % legend_scale -- % % numeric, length of the longer side of signatures' legend box newinternal legend_scale, u,v,w; % @VARIABLE % lab Lab -- % % picture, in which are saved typeset labels picture lab, Lab; % @VARIABLE % T -- % % transformation, defines transformation function for transforming % every argument of thfill % macros transform T; % @VARIABLE % p,q -- % % path, for saving temporary paths path p,q; % @MACRO % initialize -- % % initializes basic length units (u,v,w) and pens used % in map symbols according to scale. Five circular pens are defined: % def fonts_setup (expr t,s,m,l,h) = write "\def\updown#1#2{\vbox{" & "\offinterlineskip" & "\setbox100=\hbox{#1}" & "\setbox101=\hbox{#2}" & "\ifnum\wd100>\wd101\hsize=\wd100\else\hsize=\wd101\fi" & "\centerline{\box100}\vskip4pt" & "\centerline{\box101}}}" & "\def\thlabel{\thnormalsize}" & "\def\thremark{\thsmallsize\si}" & "\def\thcomment{\thsmallsize}" & "\def\thentrance{\thsmallsize}" & "\def\thaltitude{\thsmallsize}" & "\def\thstationname{\thsmallsize}" & "\def\thdate{\thsmallsize}" & "\def\thheight{\thsmallsize}" & "\def\thheightpos{+\ignorespaces}" & "\def\thheightneg{-\ignorespaces}" & "\def\thframed{\thsmallsize}" & "\def\thwallaltitude{\thtinysize}" to "mptexpre.tex"; write "\def\thtinysize{\size[" & decimal max(optical_zoom*t,0) & "]}" & "\def\thsmallsize{\size[" & decimal max(optical_zoom*s,0) & "]}" & "\def\thnormalsize{\size[" & decimal max(optical_zoom*m,0) & "]}" & "\def\thlargesize{\size[" & decimal max(optical_zoom*l,0) & "]}" & "\def\thhugesize{\size[" & decimal max(optical_zoom*h,0) & "]}" to "mptexpre.tex"; write EOF to "mptexpre.tex"; enddef; def initialize (expr sc) = if unknown BaseScale: BaseScale = sc; fi; optical_zoom := BaseScale/sc; if BaseScale <= 1: % 1:100 u:=14bp; v:=14bp; w:=12bp; fonts_setup(8,10,12,16,24); elseif BaseScale <= 2: % 1:200 u:=12bp; v:=12bp; w:=12bp; fonts_setup(7,8,10,14,20); elseif BaseScale <= 5: % 1:500 u:=10bp; v:=10bp; w:=12bp; fonts_setup(6,7,8,10,14); else: u:=7bp; v:=14bp; w:=10bp; fonts_setup(5,6,7,8,10); fi; u := optical_zoom * u; v := optical_zoom * v; w := optical_zoom * w; defaultscale := 0.8 * optical_zoom; def PenA = pencircle scaled (u/10) enddef; def PenB = pencircle scaled (0.7*u/10) enddef; def PenC = pencircle scaled (0.5*u/10) enddef; def PenD = pencircle scaled (0.35*u/10) enddef; def PenX = pencircle scaled (1.2*u/10) enddef; legend_scale := 3.14*u; enddef; % macro is expanded, we have to know all dimensions and pens before reading % mpattern macros initialize(Scale); vardef thTEX primary s = write "verbatimtex \input th_enc.tex etex" to "mptextmp.mp"; write "btex \mainfont "&s&" etex" to "mptextmp.mp"; write EOF to "mptextmp.mp"; scantokens "input mptextmp" enddef; % @MACRO % inscale -- % % zooms objects to scale specified in legend_scale variable (used in legend % typesetting) def inscale = xscaled legend_scale yscaled (0.618*legend_scale) enddef; % @MACRO % draw_legend_box -- % % draws a legend bounding box and resets drawoptions() options def draw_legend_box = clip currentpicture to unitsquare inscale; drawoptions(); pickup PenB; draw unitsquare inscale; enddef; def clean_legend_box = unfill unitsquare inscale; enddef; def legend_point (expr name) = % if substring (2,9) of name = "station": % scantokens(name)((0.5,0.5) inscale); % else: scantokens(name)((0.5,0.5) inscale,0,1,(0,0)); % fi; draw_legend_box; enddef; def legend_line (expr name) = scantokens(name)((((-0.3,.5)..(.3,.7)..(.5,.3)..{dir 80}(1.3,.9)) inscale) randomized 3mm); draw_legend_box; enddef; % legend_label % legend_area % legend_random % @MACRO % roundone -- % % rounds numeric value to one decimal point vardef roundone(expr n) = % round(10*n)/10 n enddef; % @MACRO % process_label -- % % draws a label saved in lab picture variable and calls % write_bbox macro. def process_label (expr cent, rot) = begingroup; interim bboxmargin:=0.8bp; q:=((bbox lab) smoothed 2) rotatedaround (cent, rot); draw lab rotatedaround (cent, rot); write_circ_bbox(q); % without corners smoothing it was enough to use % write_bbox(q); endgroup; enddef; % @MACRO % process_uplabel -- % % draws a label into semicircular box and writes clipping path to a file def process_uplabel = begingroup; interim bboxmargin := 0.8 bp; q:=bbox lab; endgroup; alef:=.8-.02*(xpart lrcorner q - xpart llcorner q); % show alef; q:=alef[llcorner q,ulcorner q]{up} .. {down}alef[lrcorner q, urcorner q] -- lrcorner q -- llcorner q -- cycle; draw lab; draw q; q:=reverse q; write_circ_bbox(q); enddef; % @MACRO % process_downlabel -- % % draws a label into down oriented semicircular box and writes % clipping path to a file def process_downlabel = begingroup; interim bboxmargin := 0.8 bp; q:=bbox lab; endgroup; alef:=1-(.8-.02*(xpart lrcorner q - xpart llcorner q)); q:=alef[llcorner q,ulcorner q]{down} .. {up}alef[lrcorner q, urcorner q] -- urcorner q -- ulcorner q -- cycle; draw lab; draw q; write_circ_bbox(q); enddef; % @MACRO % process_updownlabel -- % % draws a label splitted into down and up oriented semicircular boxes and % writes clipping path to a file def process_updownlabel = begingroup; interim bboxmargin := 0.8 bp; p:=bbox lab; endgroup; leftside:=xpart llcorner p; rightside:=xpart lrcorner p; draw (xpart llcorner p,.5[ypart llcorner p,ypart ulcorner p]) -- (xpart lrcorner p,.5[ypart llcorner p,ypart ulcorner p]); alef:=1.05-.02*(xpart lrcorner p - xpart llcorner p); % alef:=.8-.02*(rightside-leftside); p:=alef[(leftside, ypart llcorner p),(leftside, ypart ulcorner p)]{up} .. {down}alef[(rightside, ypart lrcorner p), (rightside, ypart urcorner p)] -- alef[(rightside, ypart urcorner p), (rightside, ypart lrcorner p)]{down} .. {up}alef[(leftside, ypart ulcorner p),(leftside, ypart llcorner p)] -- cycle; % p:=alef[llcorner p,ulcorner p]{up} .. {down}alef[lrcorner p, urcorner p] -- % aleff[llcorner p,ulcorner p]{down} .. % {up}aleff[lrcorner p, urcorner p] -- cycle; draw lab; draw p; p:=reverse p; write_circ_bbox(p); enddef; def process_updownlabel_OLD = p:=bbox lab; q:=bbox Lab; leftside:=min(xpart llcorner p, xpart ulcorner q); rightside:=max(xpart lrcorner p, xpart urcorner q); draw .5[(leftside, ypart llcorner p),(leftside, ypart ulcorner q)] -- .5[(rightside,ypart lrcorner p),(rightside,ypart urcorner q)]; alef:=.8-.02*(rightside-leftside); q:=alef[(leftside, ypart llcorner p),(leftside, ypart ulcorner p)]{up} .. {down}alef[(rightside, ypart lrcorner p), (rightside, ypart urcorner p)] -- alef[(rightside, ypart urcorner q), (rightside, ypart lrcorner q)]{down} .. {up}alef[(leftside, ypart ulcorner q),(leftside, ypart llcorner q)] -- cycle; draw lab; draw Lab; draw q; q:=reverse q; write_circ_bbox(q); enddef; % @MACRO % process_boxedlabel -- % % draws a label into circular box and writes % clipping path to a file def process_boxedlabel = q:=bbox lab; draw lab; draw q; write_bbox(q); enddef; % @MACRO % process_circledlabel -- % % draws a label into circular box and writes % clipping path to a file def process_circledlabel = begingroup; interim bboxmargin := 0.4 bp; q:=bbox lab; endgroup; q:=point 0 of q .. point 1 of q .. point 2 of q .. point 3 of q .. cycle; draw lab; draw q; write_circ_bbox(q); enddef; % @MACRO % write_bbox -- % % Arguments: % path variable -- rectangular bounding box of a label; % assumptions: path is cyclic, counterclockwise oriented, with four points, % composed from linear segments; % see general write_circ_bbox macro % Results: % one file per figure which uses labels with a clipping path in pseudo-pdf % format def write_bbox (expr q) = file_name := jobname & "." & decimal(charcode) & "bbox"; for i:=4 downto 0: s := decimal(roundone(xpart point i of q)) & " " & decimal(roundone(ypart point i of q)) & if i=4: " m " else: " l" fi; write s to file_name; endfor; last_write := charcode; enddef; % @MACRO % write_circ_bbox -- % % Arguments: % path variable, only assumption is that path is cyclic % and counterclockwise oriented. % Results: % one file per figure which uses labels with a clipping path in pseudo-pdf % format def write_circ_bbox expr q = file_name := jobname & "." & decimal(charcode) & "bbox"; tmp:=length q; s := decimal(roundone(xpart point tmp of q)) & " " & decimal(roundone(ypart point tmp of q)) & " m"; write s to file_name; for i:=tmp downto 1: s := decimal(roundone(xpart precontrol i of q)) & " " & decimal(roundone(ypart precontrol i of q)) & " " & decimal(roundone(xpart postcontrol i-1 of q)) & " " & decimal(roundone(ypart postcontrol i-1 of q)) & " " & decimal(roundone(xpart point i-1 of q)) & " " & decimal(roundone(ypart point i-1 of q)) & " c"; write s to file_name; endfor; last_write := charcode; enddef; % @MACRO % close_file -- % % closes file with a clipping path; it's invoked by endchar macro def close_file = if last_write=charcode: write EOF to jobname & "." & decimal(charcode) & "bbox"; fi; enddef; % endchar should run close_file macro extra_endfig := "close_file;"; % @MACRO % thdraw -- % % like plain MetaPost's draw, but draws a path transformed % (rotated, scaled, shifted) to scrap's coordinates according T variable. % (If fill_only=false) def thdrawoptions(text t) = def _thop_ = t enddef enddef; thdrawoptions(); def thdraw expr p = if not fill_only: addto currentpicture if picture p: also (p transformed T) else: doublepath (p transformed T) withpen currentpen fi _thop_ _op_ else: addto currentpicture also nullpicture fi enddef; % @MACRO % thfill -- % % fills a path transformed % (rotated, scaled, shifted) to scrap's coordinates according T variable. % Filled areas are clipped (like most % other lines and points) with a clipping path around text labels. def thfill expr c = addto currentpicture contour (c transformed T) _thop_ _op_ enddef; def thfilldraw expr c = if not fill_only: addto currentpicture contour (c transformed T) withpen currentpen _thop_ _op_ else: addto currentpicture contour (c transformed T) _thop_ _op_ fi enddef; def thunfill expr c = thfill c withcolor background enddef; def thundraw expr p = thdraw p withcolor background enddef; def thunfilldraw expr c = thfilldraw c withcolor background enddef; def thclean expr c = if transparency: thfill c withtransparentcolor tr_bg else: thunfill c fi; enddef; def thPatternFill (expr Path, Pattern) = T:=identity; thclean Path; thfill Path withpattern Pattern; enddef; %def thLegendPatternFill (expr Path, Pattern) = % T:=identity; % thfill Path withpattern Pattern; %enddef; % for drawarrow: def _finarr text t = thdraw _apth t; thfilldraw arrowhead _apth t enddef; % @MACRO % thpermanentfill -- % % Fills specified area with a solid color; this area is not affected by % text clipping path %def thpermanentfill expr c = % addto currentpicture contour (c transformed T) _thop_ _op_ %enddef; let thpermanentfill = thfill; primarydef p aligned al= p shifted (xpart al * xpart U, ypart al * ypart U) enddef; % macros for drawing scraps in upper and lower levels; filled lower scraps % require special treatment (MetaPost doesn't support non-continuous paths). % We can't use one file for both, while PDF XObject has to be explicitely % filled or stroked. Second macro writes also pseudo-pdf code of a clipping % path for given scrap boolean drawnext; drawnext:=true; def draw_upscrap (expr isout)(text t) = path q; for i=t: if (numeric i): if (i=1): drawnext:=true; else: drawnext:=false; fi; else: if drawnext: draw i withpen PenD; fi; if not known q: q:=i; else: q:=q -- i; fi; fi; endfor; if not cycle q: q:=q -- cycle; fi; if turningnumber q = 0: thwarning("scrap outline intersects itself"); fi; if isout=1: if turningnumber q > 0: q := reverse q; fi; else: if turningnumber q < 0: q := reverse q; fi; fi; addto bgfill contour q; enddef; % following macro writes noncontinuous PostScript path directly to EPS file % (filled background and clipping path) picture bgfill; bgfill:=nullpicture; def draw_downscrap = bg_name := jobname & "." & decimal(charcode) & "bg"; clip_name := jobname & "." & decimal(charcode) & "clip"; write "%!PS" to bg_name; write "%%BoundingBox: " & decimal floor xpart llcorner bgfill & " " & decimal floor ypart llcorner bgfill & " " & decimal ceiling xpart urcorner bgfill & " " & decimal ceiling ypart urcorner bgfill to bg_name; write "%%Page: 1 1" to bg_name; write "newpath" to bg_name; for qq within bgfill: q := pathpart qq; tmp:=length q; s := decimal(roundone(xpart point tmp of q)) & " " & decimal(roundone(ypart point tmp of q)) & " m"; write s & "oveto" to bg_name; write s to clip_name; for i:=tmp downto 1: s := decimal(roundone(xpart precontrol i of q)) & " " & decimal(roundone(ypart precontrol i of q)) & " " & decimal(roundone(xpart postcontrol i-1 of q)) & " " & decimal(roundone(ypart postcontrol i-1 of q)) & " " & decimal(roundone(xpart point i-1 of q)) & " " & decimal(roundone(ypart point i-1 of q)) & " c"; write s & "urveto" to bg_name; write s to clip_name; endfor; endfor; write "closepath fill" to bg_name; write "showpage" to bg_name; write "%%EOF" to bg_name; write EOF to bg_name; write EOF to clip_name; bgfill:=nullpicture; enddef; vardef buildcycle(text ll) = save ta_, tb_, k_, i_, pp_; path pp_[]; k_=0; for q=ll: pp_[incr k_]=q; endfor i_=k_; for i=1 upto k_: (ta_[i], length pp_[i_]-tb_[i_]) = pp_[i] intersectiontimes reverse pp_[i_]; if ta_[i]<0: message("[Error: area borders "& area_border[i] &" and "& area_border[i_] &" don't intersect in scrap " & current_scrap & " (file " & current_src & ")]"); area_border_errors := area_border_errors + 1; fi i_ := i; endfor for i=1 upto k_: subpath (ta_[i],tb_[i]) of pp_[i] .. endfor cycle enddef; vardef unitvector primary z = if (z<>(0,0)): z/abs z else: hide(thwarning("strange path")) (0,epsilon) fi enddef; def thwarning (expr m) = message("[Warning: " & m & " in scrap " & current_scrap & "]"); enddef; def check_area_borders = if area_border_errors > 0: fi; enddef; %%%%%%%%%%%% Map symbols management %%%%%%%%%%%%%%%%%%% def mapsymbol (expr name, set, warning) = string s, stype, lname, ID; stype = substring (0,1) of name; lname = name & "_" & set; ID := "ID_" & lname; if (known scantokens ID): if stype = "a": s = "def " & name & " = scantokens(" & ditto & lname & ditto & ") enddef;"; else: s = "let " & name & " = " & lname & ";"; fi; scantokens s; elseif warning: message("[Warning: undefined symbol `" & lname & "']"); fi; enddef; %def hidesymbol (expr name) = % string s, stype; % stype = substring (0,1) of name; % if stype = "a": % s = "def " & name & " = scantokens(" & ditto & "a_empty" & ditto & ") enddef;"; % else: % s = "vardef " & name & "@# (text t) = enddef;"; % fi; % scantokens s; % write name to "missed.dat"; %enddef; def initsymbol (expr name) = s := "ID_" & name & " = 1"; scantokens s; enddef; %%% % comment out groups in order to use 'save ATTR_*' appropriately def beginfig(expr c) = % begingroup charcode:=c; clearxy; clearit; clearpen; pickup defaultpen; drawoptions(); scantokens extra_beginfig; save smartll, smartur; pair smartll[], smartur[]; smart_count := 0; enddef; def endfig = scantokens extra_endfig; shipit; % endgroup enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % P. Bolek's MPATTERN package adapted and simplified for Therion % (with the same user interface except of patterncolor) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% string Pname_, PXYsteps_; string Pmatrix_; numeric Pnum_; Pnum_=0; def PmakeBB_= PBBox_ := "[" & decimal Plft_ & " " & decimal Plow_ & " " & decimal Prt_ & " " & decimal Pup_ & "]"; enddef; def Psteps_= PXYsteps_ := decimal if unknown PXStep_: (Prt_-Plft_) else: PXStep_ fi & ":" & decimal if unknown PYStep_: (Pup_-Plow_) else: PYStep_ fi; enddef; vardef Pfindbounds_= Plow_ = ypart (llcorner currentpicture); Plft_ = xpart (llcorner currentpicture); Pup_ = ypart (urcorner currentpicture); Prt_ = xpart (urcorner currentpicture); PmakeBB_; enddef; def PmakePattern_(expr name)= write decimal (Pnum_*epsilon) & ":" & jobname & "." & decimal charcode & ":" & PBBox_ & ":" & PXYsteps_ & ":" & Pmatrix_ to "patterns.dat" enddef; % User interface macros vardef patternbbox(expr a)(text b)= save Pi_, Pz_; numeric Pi_, Pz_[]; if pair a: Plft_:=min(xpart(a),xpart(b)); Plow_:=min(ypart(a),ypart(b)); Prt_:=max(xpart(a),xpart(b)); Pup_:=max(ypart(a),ypart(b)); else: Pi_=1; for t=b: Pz_[Pi_]=t; Pi_:=Pi_+1; endfor; Plft_:=min(a,Pz_2); Plow_:=min(Pz_1,Pz_3); Prt_:=max(a,Pz_2); Pup_:=max(Pz_1,Pz_3); fi; PmakeBB_; enddef; def beginpattern(suffix name)= numeric PXStep_, PYStep_; numeric Plow_, Plft_, Pup_, Prt_; string PBBox_; Pmatrix_:="[1 0 0 1 0 0]"; Pname_:=str name; Pnum_:=Pnum_+1; beginfig(Pnum_+4000); enddef; def endpattern= if unknown PBBox_: Pfindbounds_; fi; endfig; Psteps_; PmakePattern_(Pname_); scantokens(Pname_ & "=Pnum_;"); enddef; picture pattpict; color patterncolor_; patterncolor_ := black; primarydef p withpattern s= if known s: hide(pattpict := image(draw (0,0)--(10,10)); for i within pattpict: patterncolor_ := (redpart i, greenpart i, bluepart i); endfor;) p withcolor (epsilon, 10*epsilon, s*epsilon) if known mpversion: if scantokens(mpversion)>=1.000: withprescript(decimal redpart patterncolor_ & " " & decimal greenpart patterncolor_ & " " & decimal bluepart patterncolor_ & " THsetpatterncolor") fi; fi; else: p withcolor (1,0,0); message("Warning: undefined pattern ignored"); fi; enddef; def patterntransform expr t= Pmatrix_ := "[" & decimal xxpart t & " " & decimal yxpart t & " " & decimal xypart t & " " & decimal yypart t & " " & decimal xpart t & " " & decimal ypart t & "]"; enddef; def patternxstep expr t= PXStep_ = t; enddef; def patternystep expr t= PYStep_ = t; enddef; def patternstep text t= if pair t: PXStep_ = xpart t; PYStep_ = ypart t; else: (PXStep_,PYStep_)=t; fi; enddef; def patterncolor expr t= message("Warning: patterncolor not supported in Therion"); enddef; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % end of pattern macros %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % transparent rgb colors numeric RGBnum; RGBnum=0; string RGBname; def def_transparent_rgb (suffix name)(expr r, g, b) = RGBnum := RGBnum+1; RGBname := str name; write decimal (RGBnum*epsilon) & ":" & decimal r & " " & decimal g & " " & decimal b to "rgbcolors.dat"; scantokens(RGBname & ":=RGBnum;"); enddef; primarydef p withtransparentcolor s= p withcolor (epsilon, 12*epsilon, s*epsilon); enddef; def_transparent_rgb(tr_white, 1, 1, 1); def_transparent_rgb(tr_blue, 0, 0, 1); def_transparent_rgb(tr_black, 0, 0, 0); def_transparent_rgb(tr_bg, redpart background, greenpart background, bluepart background); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % some useful macros from H. Hagen's MetaFun package %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% vardef paired (expr d) = if pair d : d else : (d,d) fi enddef ; primarydef p randomshifted s = begingroup ; save ss ; pair ss ; ss := paired(s) ; p shifted (-.5xpart ss + uniformdeviate xpart ss, -.5ypart ss + uniformdeviate ypart ss) endgroup enddef ; primarydef p randomized s = (if path p : for i=0 upto length(p)-1 : ((point i of p) randomshifted s) .. controls ((postcontrol i of p) randomshifted s) and ((precontrol (i+1) of p) randomshifted s) .. endfor if cycle p : cycle else : ((point length(p) of p) randomshifted s) fi elseif pair p : p randomshifted s elseif color p : if color s : (uniformdeviate redpart s * redpart p, uniformdeviate greenpart s * greenpart p, uniformdeviate bluepart s * bluepart p) elseif pair s : ((xpart s + uniformdeviate (ypart s - xpart s)) * p) else : (uniformdeviate s * p) fi else : p + uniformdeviate s fi) enddef ; primarydef p llmoved d = ((llcorner p) shifted (-xpart paired(d),-ypart paired(d))) enddef ; primarydef p lrmoved d = ((lrcorner p) shifted (+xpart paired(d),-ypart paired(d))) enddef ; primarydef p urmoved d = ((urcorner p) shifted (+xpart paired(d),+ypart paired(d))) enddef ; primarydef p ulmoved d = ((ulcorner p) shifted (-xpart paired(d),+ypart paired(d))) enddef ; primarydef p smoothed d = (p llmoved (-xpart paired(d),0) -- p lrmoved (-xpart paired(d),0) {right} .. p lrmoved (0,-ypart paired(d)) -- p urmoved (0,-ypart paired(d)) {up} .. p urmoved (-xpart paired(d),0) -- p ulmoved (-xpart paired(d),0) {left} .. p ulmoved (0,-ypart paired(d)) -- p llmoved (0,-ypart paired(d)) {down} .. cycle) enddef ; vardef punked primary p = (point 0 of p for i=1 upto length(p)-1 : -- point i of p endfor if cycle p : -- cycle else : -- point length(p) of p fi) enddef ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % end of MetaFun macros %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % we input map symbol definitions %%%%% INPUT thPoint %%%%% %% therion source code %% %% This file defines macros for point map symbols %% %% $Date: 2003/07/01 09:06:44 $ %% $RCSfile: thPoint.mp,v $ %% $Revision: 1.8 $ %% %% Copyright (C) 2000-2004 Martin Budaj %% %% -------------------------------------------------------------------- %% This program is free software; you can redistribute it and/or modify %% it under the terms of the GNU General Public License as published by %% the Free Software Foundation; either version 2 of the License, or %% any later version. %% %% This program is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %% GNU General Public License for more details. %% %% You should have received a copy of the GNU General Public License %% along with this program; if not, write to the Free Software %% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA %% -------------------------------------------------------------------- pair U; def p_stalactite_UIS(expr pos,theta,sc,al) = U:=(.15u, .4u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (0,-.4u) -- (0,.15u) -- (-.15u,.4u); thdraw (0,.15u) -- (.15u,.4u); enddef; def p_stalagmite_UIS(expr pos,theta,sc,al) = U:=(.15u,.4u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (0,.4u) -- (0,-.15u) -- (-.15u,-.4u); thdraw (0,-.15u) -- (.15u,-.4u); enddef; def p_pillar_UIS(expr pos,theta,sc,al) = U:=(.15u,.4u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (0,.15u)--(0,-.15u); thdraw (-.15u,-.4u)--(0,-.15u)--(.15u,-.4u); thdraw (-.15u,.4u)--(0,.15u)--(.15u,.4u); enddef; def p_curtain_UIS(expr pos,theta,sc,al) = U:=(.15u,.4u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.15u,.4u)--(0,.15u)--(.15u,.4u); thdraw (0,.15u)--(0,0){dir 180}..(-.12u,-.11u)..{dir 0}(0,-.22u)--(0,-.4u); enddef; def p_helictite_UIS(expr pos,theta,sc,al) = U:=(.2u,.4u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (0,.4u)--(0,-.4u); p := (-.2u,.4u)---(-.2u,.1u){down}..{dir -10}(-.1u,0.02u)---origin; thdraw p; thdraw p reflectedabout (origin,(0,u)) reflectedabout (origin,(u,0)); enddef; def p_sodastraw_UIS(expr pos,theta,sc,al) = U:=(.5u,.25u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.5u,.2u)--(.5u,.2u); pickup PenD; thdraw (-.4u,.2u)--(-.4u,0); thdraw (-.12u,.2u)--(-.12u,-.25u); thdraw (.02u,.2u)--(.02u,-.1u); thdraw (.23u,.2u)--(.23u,-.19u); thdraw (.35u,.2u)--(.35u,-.15u); enddef; def p_crystal_UIS (expr pos,theta,sc,al)= U:=(.35u,.35u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p := ((-.35*u,0)--(.35*u,0)); thdraw p; thdraw p rotated (60); thdraw p rotated (120); enddef; def p_flowstone_UIS (expr pos,theta,sc,al)= U:=(.45u,.1u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p := ((-.15*u,0)--(.15*u,0)); thdraw p shifted (.3u,-.1u); thdraw p shifted (-.3u,-.1u); thdraw p shifted (0,.1u); enddef; def p_moonmilk_UIS (expr pos,theta,sc,al)= U:=(.5u,.2u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.5u,-.2u){up}..{dir -60}(-.18u,-.105u){dir 80}.. {dir-80}(.18u,-.105u){dir 60}..{down}(.5u,-.2u); enddef; def p_wallcalcite_UIS (expr pos,theta,sc,al)= U:=(.2u,.2u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.2u,-.2u)--(0,.1u)--(.2u,-.2u); enddef; def p_popcorn_UIS (expr pos,theta,sc,al)= U:=(.5u,.2u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.5u,-.2u)--(.5u,-.2u); pickup PenD; thdraw (-.3u,-.2u)--(-.3u,.1u); thdraw (0,-.2u)--(0,.1u); thdraw (.3u,-.2u)--(.3u,.1u); thfill fullcircle scaled .2u shifted (-.3u,.1u); thfill fullcircle scaled .2u shifted (0,.1u); thfill fullcircle scaled .2u shifted (.3u,.1u); enddef; def p_disk_UIS (expr pos,theta,sc,al)= U:=(.2u,.3u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.2u,-.3u)--origin--(.2u,-.3u); p:=fullcircle scaled .3u shifted (0,.15u); thclean p; thdraw p; enddef; def p_gypsum_NSS (expr pos,theta,sc,al)= U:=(.25u,.25u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.25u,0)--(.25u,0); thdraw (0,-.25u)--(0,.25u); enddef; def p_aragonite_NSS (expr pos,theta,sc,al)= U:=(.3u,.4u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (0,-.4u)--(0,.3u); thdraw (0,-.1u){dir 40}..{dir 5}(.3u,.08u); thdraw (0,-.1u){dir 140}..{dir 175}(-.3u,.08u); thdraw (0,.2u){dir 30}..{dir 5}(.25u,.3u); thdraw (0,.2u){dir 150}..{dir 175}(-.25u,.3u); enddef; def p_cavepearl_SKBB (expr pos,theta,sc,al)= U:=(.25u,.25u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p:=fullcircle scaled .25u shifted (0,.16u); thdraw p; thdraw p rotated 120; thdraw p rotated 240; enddef; def p_gypsumflower_NSS (expr pos,theta,sc,al)= U:=(.4u,.3u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; % thdraw (.2u,0){left}..(0,.2u)..(.25u,.35u)..(.5u,0).. % (.1u,-.3u)..{dir 125}(-.5u,.2u); thdraw (.18u,0){left}..(0,.15u)..(.2u,.3u)..(.4u,0).. (.15u,-.28u)..{dir 120}(-.4u,.15u); enddef; def p_rimstonepool_ASF (expr pos,theta,sc,al)= U:=(.4u,.2u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p := (-.4u,.2u){dir -70}..{dir 70}(.4u,.2u); thfill buildcycle(p,((.5u,.1u)--(-.5u,.1u))); thdraw p; enddef; def p_rimstonedam_ASF (expr pos,theta,sc,al)= U:=(.4u,.2u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.4u,.2u){dir -70}..{dir 70}(.4u,.2u); enddef; def p_anastomosis_UIS (expr pos,theta,sc,al)= U:=(.4u,.3u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p:=(-.4u,-.2u)--(-.3u,-.3u)--(0,.3u)--(.1u,.2u); thdraw p; thdraw p shifted (.3u,0); enddef; def p_karren_UIS (expr pos,theta,sc,al)= U:=(.5u,.4u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.5u,-.3u){dir -85}..{dir 85}(-.32u,-.3u)..(-.28u,.3u){dir 85}.. {dir -85}(-.12u,.3u)..(-.08u,-.3u){dir-85}..{dir 85}(.08u,-.3u).. {dir85}(.12u,.3u)..(.28u,.3u){dir -85}..(.32u,-.3u){dir -85}.. {dir 85}(.5u,-.3u); enddef; def p_scallop_UIS (expr pos,theta,sc,al)= U:=(.2u,.4u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (0,-.4u){dir 125}..{dir 105}(-.2u,.1u){up}.. {down}(.2u,.1u){dir -105}...{dir -125}(0,-.4u); enddef; def p_flute_UIS (expr pos,theta,sc,al)= U:=(.5u,.2u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.5u,.2u)--(.5u,.2u); thdraw (-.3u,.2u){dir -70}..{dir 70}(.3u,.2u); enddef; def p_raft_NSS (expr pos,theta,sc,al)= U:=(.5u,.2u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.5u,.2u){dir -80}..(-.3u,-.2u)..origin..(.3u,.2u).. {dir -80}(.5u,-.2u); enddef; def p_raftcone_NSS (expr pos,theta,sc,al)= U:=(.3u,.4u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.3u,-.4u)--(0,.4u)--(.3u,-.4u); enddef; def p_spring_SKBB (expr pos,theta,sc,al)= U:=(.3u,.2u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.3u,.2u){down}..(0,-.2u)..{up}(.3u,.2u); enddef; def p_sink_SKBB (expr pos,theta,sc,al)= U:=(.3u,.2u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.3u,-.2u){up}..(0,.2u)..{down}(.3u,-.2u); enddef; def p_narrowend_UIS (expr pos,theta,sc,al)= U:=(.1u,.4u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.1u,-.4u)--(-.1u,.4u); thdraw (.1u,-.4u)--(.1u,.4u); enddef; def p_lowend_UIS (expr pos,theta,sc,al)= U:=(.4u,.1u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.4u,-.1u)--(.4u,-.1u); thdraw (-.4u,.1u)--(.4u,.1u); enddef; def p_lowend_NSS (expr pos,theta,sc,al)= U:=(.4u,0); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.4u,0)--(.4u,0); enddef; def p_flowstonechoke_NSS (expr pos,theta,sc,al)= U:=(.4u,.3u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p:=(-.4u,-.4u){right}..{dir120}(-.2u,-.2u){dir -20}..{up}(0,0); thdraw p; thdraw p shifted (0,.2u); thdraw p reflectedabout (origin,down); thdraw p reflectedabout (origin,down) shifted (0,.2u); enddef; def p_breakdownchoke_NSS (expr pos,theta,sc,al)= U:=(.5u,.2u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.5u,-.1u)--(-.15u,.05u)--(-.48u,.2u)--cycle; thdraw (-.2u,-.2u)--(.15u,-.18u)--(-.08u,.14u)--cycle; thdraw (.1u,0)--(.4u,-.1u)--(.5u,.2u)--(.1u,.2u)--cycle; enddef; def p_bedrock_ASF (expr pos,theta,sc,al)= U:=(.5u,.2u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.5u,0)--(.5u,0); thdraw (-.3u,0)--(-.3u,.2u); thdraw (.3u,0)--(.3u,-.2u); enddef; def p_sand_UIS (expr pos,theta,sc,al)= U:=(.2u,.2u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenB; thdraw (0,.2u); thdraw (0,.2u) rotated 120; thdraw (0,.2u) rotated 240; enddef; def p_clay_SKBB (expr pos,theta,sc,al) = U:=(.3u,.3u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.3u,0){up}..origin{down}..{up}(0.3u,0); enddef; def p_pebbles_UIS (expr pos,theta,sc,al)= U:=(.45u,.35u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p:=superellipse((.2u,0),(0,.1u),(-.2u,0),(0,.-.1u),.75); thdraw p rotated 20 shifted (0,.25u); thdraw p rotated -37 shifted (.25u,-.25u); thdraw p rotated -62 shifted (-.25u,-.25u); enddef; def p_debris_UIS (expr pos,theta,sc,al)= U:=(.4u,.4u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.3u,-.4u)--(0,-.22u)--(-.4u,-.1u)--cycle; thdraw (.2u,-.4u)--(.4u,-.1u)--(.1u,-.1u)--cycle; thdraw (-.1u,0)--(.2u,.3u)--(-.2u,.3u)--cycle; enddef; def p_blocks_UIS (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; pickup PenD; thdraw (-.5u,-.5u)--(-.1u,-.2u)--(-.17u,.2u); thdraw (-.1u,-.2u)--(.3u,-.4u); thdraw (.25u,-.25u)--(.3u,0)--(.2u,.2u)--(-.1u,.5u); thdraw (.3u,.5u)--(.2u,.2u); thdraw (.5u,-.15u)--(.3u,0); enddef; def p_water_UIS (expr pos,theta,sc,al)= U:=(.425u,.3u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenD; p:=fullcircle xscaled (.85u) yscaled (.6u); thfill p withpattern pattern_water_UIS; thdraw p; enddef; def p_ice_UIS (expr pos,theta,sc,al)= U:=(.4u,.35u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p := (0,.05u)--(0,.35u); thdraw p; thdraw p shifted (-.25u,-.3u); thdraw p shifted (.25u,-.3u); p := (-0.15u,.2u)--(0.15u,.2u); thdraw p; thdraw p shifted (-.25u,-.3u); thdraw p shifted (.25u,-.3u); enddef; def p_snow_SKBB (expr pos,theta,sc,al)= U:=(.35u,.35u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p := origin--(0,.25*u); q := ((0,.35u)--(0,0.25u)--(0.1u,0.25u)) rotatedaround ((0,0.25u),45); thdraw p; thdraw p rotated (60); thdraw p rotated (120); thdraw p rotated (180); thdraw p rotated (240); thdraw p rotated (300); thdraw q; thdraw q rotated (60); thdraw q rotated (120); thdraw q rotated (180); thdraw q rotated (240); thdraw q rotated (300); enddef; def p_archeomaterial_UIS (expr pos,theta,sc,al)= U:=(.4u,.4u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p := fullcircle scaled .8u; thdraw (-.5u,-.5u)--origin cutbefore p; thdraw (-.5u,.5u)--origin cutbefore p; thdraw origin--(.4u,0); thdraw p; enddef; def p_paleomaterial_UIS (expr pos,theta,sc,al)= U:=(.4u,.4u); T:=identity aligned al rotated theta scaled sc shifted pos; thfill (-.4u,-.2u)..(-.2u,-.08u)---(-.1u,.05u)---(0,.2u)..(-.03u,.4u).. (.2u,.3u)..(.35u,.25u)..(.2u,.2u)---origin---(-.1u,-.17u).. (-.08u,-.25u){dir -120}..(-.3u,-.23u) ..cycle; enddef; def p_guano_UIS (expr pos,theta,sc,al)= U:=(.4u,.35u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.4u,.2u){dir 40}..{down}(0,-.35u){up}..{dir-40}(.4u,.2u); enddef; def p_vegetabledebris_ASF (expr pos,theta,sc,al)= U:=(.38u,.3u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.3u,-.3u)--(0,.3u); thdraw (0,-.3u)--(.3u,.3u); thdraw (-.25u,.13u)--(.38u,.13u); thdraw (-.38u,-.13u)--(.25u,-.13u); enddef; def p_root_ASF (expr pos,theta,sc,al)= U:=(.1u,.5u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.1u,-.5u)--(-.1u,.5u); p:=(-.1u,-.3u)--(.1u,-.5u); thdraw p; thdraw p shifted (0,.2u); thdraw p shifted (0,.4u); enddef; def p_entrance_UIS (expr pos,theta,sc,al)= U:=(.2u,.5u); T:=identity aligned al rotated theta scaled sc shifted pos; thfill (-.2u,-.5u)--(0,.5u)--(.2u,-.5u)--cycle; enddef; def p_waterflow_paleo_UIS (expr pos,theta,sc,al)= U:=(.2u,u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (0,-u)--(0,u); thdraw halfcircle scaled .4u shifted (0,-.4u); p:=(-.15u,.6u)--(0,u)--(.15u,.6u)--cycle; thfill p; thdraw p; enddef; def p_gradient_UIS (expr pos,theta,sc,al)= U:=(.15u,u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (0,-u)--(0,u); p:=(-.15u,.6u)--(0,u)--(.15u,.6u)--cycle; thfill p; thdraw p; enddef; def p_gradient_BCRA (expr pos,theta,sc,al)= U:=(.25u,0.7u); T:=identity aligned al rotated theta scaled sc shifted pos; thfill (-.25u,-0.7u)--(0,.7u)--(.25u,-.7u)--cycle; enddef; % by Philip Schuchardt def p_gradient_NSS (expr pos,theta,sc,al) = U:=(.7u, .6u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.3u, -.5u) -- (-.7u, -.2u); thdraw (-.2u, -.4u) -- (-.4u, .3u); thdraw (0u, -.3u) -- (0u, .6u); thdraw (.3u, -.5u) -- (.7u, -.2u); thdraw (.2u, -.4u) -- (.4u, .3u); enddef; def p_waterflow_permanent_UIS (expr pos,theta,sc,al)= U:=(.15u,.5u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p:=(0,.5u){down}..(.12u,.3u)..(-.15u,.15u)..(.13u,0).. (-.08u,-.2u)..{down}(0,-.5u); p:=p rotated 180; thdraw p; thdrawoptions(); oldahlength:=ahlength; ahlength:=2.5pt*optical_zoom; thdraw arrowhead p; thfill arrowhead p; ahlength:=oldahlength; enddef; def p_waterflow_intermittent_UIS (expr pos,theta,sc,al)= thdrawoptions(dashed evenly scaled (.5 * optical_zoom)); p_waterflow_permanent_UIS (pos,theta,sc,al); thdrawoptions(); enddef; def p_airdraught_UIS (expr pos,theta,sc,al)= U:=(.2u,u); T:=identity aligned al rotated theta scaled 1 shifted pos; pickup PenC; thdraw (0,u)--(0,-0.8u); p:=(-.2u,.65u){dir 20}..{dir 90}(0,u); thdraw p; thdraw p reflectedabout (origin,(0,u)); for i:=1 upto round(3+2*mlog(sc)/mlog 2): thdraw (0,-(1-0.2i)*u)--(.2u,-(1-0.2(i-1))*u); endfor; enddef; def p_airdraught_winter_UIS (expr pos,theta,sc,al)= U:=(.2u,u); T:=identity aligned al rotated theta scaled 1 shifted pos; pickup PenC; thdraw (0,u)--(0,-0.8u); p:=(-.2u,.65u){dir 20}..{dir 90}(0,u); thdraw p; thdraw p reflectedabout (origin,(0,u)); for i:=1 upto round(3+2*mlog(sc)/mlog 2): thdraw (0,-(1-0.2i)*u)--(.2u,-(1-0.2(i-1))*u); endfor; thclean fullcircle scaled 0.6u shifted (0,0.05u); thdraw (-0.1732u,-0.05u) -- (0.1732u,0.15u); thdraw (0.1732u,-0.05u) -- (-0.1732u,0.15u); thdraw (0,-0.15u) -- (0,0.25u); enddef; def p_airdraught_summer_UIS (expr pos,theta,sc,al)= U:=(.2u,u); T:=identity aligned al rotated theta scaled 1 shifted pos; pickup PenC; thdraw (0,u)--(0,-0.8u); p:=(-.2u,.65u){dir 20}..{dir 90}(0,u); thdraw p; thdraw p reflectedabout (origin,(0,u)); for i:=1 upto round(3+2*mlog(sc)/mlog 2): thdraw (0,-(1-0.2i)*u)--(.2u,-(1-0.2(i-1))*u); endfor; thclean fullcircle scaled 0.6u shifted (0,0.05u); thdraw (-0.1732u,-0.05u) -- (0.1732u,0.15u); thdraw (0.1732u,-0.05u) -- (-0.1732u,0.15u); thdraw (0,-0.15u) -- (0,0.25u); thclean fullcircle scaled 0.3u shifted (0,0.05u); thdraw fullcircle scaled 0.2u shifted (0,0.05u); enddef; def p_station_fixed_ASF (expr pos)= T:=identity shifted pos; pickup PenD; pair z; z:=(0,.2u); thclean z -- (z rotated 120) -- (z rotated 240) -- cycle; thdraw z -- (z rotated 120) -- (z rotated 240) -- cycle; thdraw origin; enddef; def p_station_painted_SKBB (expr pos)= T:=identity shifted pos; pickup PenC; thclean fullcircle scaled 0.25u; thdraw fullcircle scaled 0.25u; enddef; def p_station_natural_ASF (expr pos)= T:=identity shifted pos; pickup PenD; thclean fullcircle scaled .3u; thdraw fullcircle scaled .3u; thdraw origin; enddef; def p_station_temporary_ASF (expr pos)= T:=identity shifted pos; pickup PenD; p:=(-.2u,0)--(.2u,0); thdraw p; thdraw p rotated 90; thclean fullcircle scaled .16u; pickup PenC; thdraw origin; enddef; let p_station_temporary_SKBB = p_station_painted_SKBB; def p_steps_SKBB (expr pos,r,s,al) = U:=(.4u, .4u); T:=identity aligned al shifted pos; thdraw unitsquare scaled .8u shifted (-0.4u,-.4u) withpen PenD; pickup PenC; thdraw (-.3u,.3u)--(-.3u,.1u)--(-.1u,.1u)--(-.1u,-.1u)-- (.1u,-.1u)--(.1u,-.3u)--(.3u,-.3u); enddef; def p_fixedladder_SKBB (expr pos,r,s,al) = U:=(.4u, .4u); T:=identity aligned al shifted pos; thdraw unitsquare scaled .8u shifted (-0.4u,-.4u) withpen PenD; pickup PenC; thdraw (-.15u,-.4u)--(-.15u,.4u); thdraw (.15u,-.4u)--(.15u,.4u); thdraw (-.15u,0)--(.15u,0); thdraw (-.15u,.2u)--(.15u,.2u); thdraw (-.15u,-.2u)--(.15u,-.2u); enddef; def p_ropeladder_SKBB (expr pos,r,s,al) = U:=(.4u, .4u); T:=identity aligned al shifted pos; thdraw unitsquare scaled .8u shifted (-0.4u,-.4u) withpen PenD; pickup PenC; thdraw (.1u,-.4u)..(.2u,-.2u)..(.1u,.2u)..(.2u,.4u); thdraw (-.2u,-.4u)..(-.1u,-.2u)..(-.2u,.2u)..(-.1u,.4u); thdraw (-.2u,.2u)--(.1u,.2u); thdraw (-.15u,0)--(.15u,0); thdraw (-.1u,-.2u)--(.2u,-.2u); enddef; def p_bridge_SKBB (expr pos,r,s,al) = U:=(.4u, .4u); T:=identity aligned al shifted pos; thdraw unitsquare scaled .8u shifted (-0.4u,-.4u) withpen PenD; pickup PenC; thdraw (-.3u,.2u)--(-.2u,.1u)--(.2u,.1u)--(.3u,.2u); thdraw (-.3u,-.2u)--(-.2u,-.1u)--(.2u,-.1u)--(.3u,-.2u); enddef; def p_noequipment_SKBB (expr pos,r,s,al) = U:=(.4u, .4u); T:=identity aligned al shifted pos; thdraw unitsquare scaled .8u shifted (-0.4u,-.4u) withpen PenD; thfill (0,-.1u)--(-.05u,.3u)--(.05u,.3u)--cycle; thdraw (0,-.2u) withpen PenX; enddef; def p_anchor_SKBB (expr pos,r,s,al) = U:=(.4u, .4u); T:=identity aligned al shifted pos; thdraw unitsquare scaled .8u shifted (-0.4u,-.4u) withpen PenD; thdraw fullcircle scaled .2u shifted (0.2u,0) withpen PenC; begingroup; interim linecap:=butt; thdraw (-.3u,0)--(.1u,0) withpen PenA; endgroup; thdraw (.1u,-.4u)--(.1u,.4u) withpen PenD; enddef; def p_traverse_SKBB (expr pos,r,s,al) = U:=(.4u, .4u); T:=identity aligned al shifted pos; thdraw unitsquare scaled .8u shifted (-0.4u,-.4u) withpen PenD; pickup PenC; thdraw (-.25u,.05u)..(0,-.08u)..(.25u,.05u); pickup pencircle scaled .18u; thdraw (-.25u,.05u); thdraw (.25u,.05u); enddef; def p_rope_SKBB (expr pos,r,s,al) = U:=(.4u, .4u); T:=identity aligned al shifted pos; thdraw unitsquare scaled .8u shifted (-0.4u,-.4u) withpen PenD; pickup PenC; thdraw (-.2u,.2u)..origin..(.1u,.1u)--(.1u,-.4u); pickup pencircle scaled .18u; thdraw (-.2u,.2u); thdraw (.1u,.1u); enddef; def p_camp_SKBB (expr pos,r,s,al) = U:=(.4u, .5u); T:=identity aligned al shifted pos; pickup PenC; thdraw (-.4u,-.4u)--(0,.5u)--(.4u,-.4u)--cycle; pickup PenD; thdraw (0,-.4u)--(0,.5u); enddef; def p_dig_UIS (expr pos,r,s,al) = U:=(.4u, .5u); T:=identity aligned al shifted pos; thfill ((-.075u,-.5u){down} .. {up}(0.075u, -.5u) -- (0.075u, .15u) -- (0.3u, 0.15u) -- (0.3u, 0.5u) -- (-.3u, .5u) -- (-.3u, .15u) -- (-.075u, .15u) -- cycle) rotated 45; enddef; def p_continuation_UIS(expr pos,theta,sc,al) = U:=(.15u,.3u); T:=identity aligned al shifted pos; pickup PenC; thdraw (-.1u,.2u){up}..{down}(.1u,.2u)..{down}(0,-.05u); pickup PenX; thdraw (0,-.2u); enddef; def p_station_SKBB(expr pos,mark,txt)(text flags) = T:=identity shifted pos; if mark=4: p_station_fixed(pos) elseif mark=3: p_station_natural(pos) elseif mark=2: p_station_painted(pos) elseif mark=1: p_station_temporary(pos) fi; path path_cave; path_cave = (-.3u,-.25u) -- (-.2u,-.25u){dir 135} .. (0, .25u) .. {dir 225}(.2u,-.25u) -- (.3u,-.25u); for i=flags: pickup PenX; if i="entrance": % thfill fullcircle scaled 1 cm withtransparentcolor tr_blue; thdraw path_cave; % p_label.urt(txt,pos+(0.4u,0),0,0); if not numeric txt: p_smartlabel(txt,pos); fi; elseif i="sink": thdraw path_cave cutbefore ((-u,0)--(u,0)) cutafter ((-u,0)--(u,0)); pickup PenA; thdraw (0,-.45u) -- (0,.05u) withcolor blue; thdraw (-.15u,-.02u) -- (0,.05u) -- (.15u,-.02u) withcolor blue; elseif i="spring": thdraw path_cave cutbefore ((-u,0)--(u,0)) cutafter ((-u,0)--(u,0)); pickup PenA; thdraw (0,-.45u) -- (0,.05u) withcolor blue; thdraw (-.15u,-.38u) -- (0,-.45u) -- (.15u,-.38u) withcolor blue; elseif i="doline": thdraw (-.5u,.05u){down}..(0,-0.6u)..{up}(.5u,.05u); elseif i="dig": thdraw (-.5u,.25u) -- (-.35u,.25u)--(-.23u,-.25u)--(.23u,-.25u)--(.35u,.25u)--(.5u,.25u); elseif substring(0,11) of i = "air-draught": pickup PenB; thdraw ((0,.11u){dir-120} ..{dir-70}(0,0) .. {dir-120}(0,-.11u)); thdraw ((0,.11u){dir-120} ..{dir-70}(0,0) .. {dir-120}(0,-.11u)) shifted (.11u,0); thdraw ((0,.11u){dir-120} ..{dir-70}(0,0) .. {dir-120}(0,-.11u)) shifted (-.11u,0); elseif i="continuation": if picture(txt): picture ATTR__text; ATTR__text := txt; fi; begingroup; save T; transform T; p_continuation(pos+(0,.25u),0,1,(0,1)); endgroup; if picture(txt): save ATTR__text; fi; elseif i="arch": thdraw (-.5u,-.25u)--(-.5u,.25u)--(.5u,.25u)--(.5u,-.25u)..(0,.2u)..cycle; thfill (-.5u,-.25u)--(-.5u,.25u)--(.5u,.25u)--(.5u,-.25u)..(0,.2u)..cycle; elseif i="overhang": thdraw (.2u,-.25u)--(-.2u,-.25u){up}..{right}(.2u,.25u); fi; endfor; % thdraw (0,0) withpen PenX withcolor red; enddef; def p_debug (expr col, pen, pos)= T:=identity shifted pos; thdraw origin withpen pencircle scaled if pen=0: 2pt else: 4pt fi withcolor if col=-2: (1,.85,0) elseif col=-1: black elseif col=0: red else: blue fi; enddef; def p_u(expr pos,theta,sc,al) = T:=identity shifted pos; thdraw origin withpen pencircle scaled 4pt withcolor red; enddef; def p_handrail_SKBB(expr pos,theta,sc,al) = tmph := 1 / Scale * 72 / 2.54; % 1 m height U:=(.1u, tmph); pickup PenC; T:=identity aligned al rotated theta scaled sc shifted pos; thdraw (0,0) -- (0,tmph); thdraw (0,tmph) withpen pencircle scaled .25u; enddef; def p_viaferrata_SKBB(expr pos,r,s,al) = U:=(.4u, .4u); T:=identity aligned al shifted pos; thdraw unitsquare scaled .8u shifted (-0.4u,-.4u) withpen PenD; pickup PenC; thdraw (-.15u,.15u)--(-.15u,.1u)--(.15u,.1u)--(.15u,.15u); thdraw (-.15u,-.05u)--(-.15u,-.1u)--(.15u,-.1u)--(.15u,-.05u); enddef; def p_stalagmites_UIS(expr pos,theta,sc,al) = U:=(.3u, .2u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; for i=-1 upto 1: T:=identity aligned al rotated theta scaled (sc * 0.7) shifted (pos + (i * .3u, 0)); thdraw (0,.4u) -- (0,-.15u) -- (-.15u,-.4u); thdraw (0,-.15u) -- (.15u,-.4u); endfor; enddef; def p_stalactites_UIS(expr pos,theta,sc,al) = U:=(.3u, .2u); pickup PenC; for i=-1 upto 1: T:=identity aligned al rotated theta scaled (sc * 0.7) shifted (pos + (i * .3u, 0)); thdraw (0,-.4u) -- (0,.15u) -- (-.15u,.4u); thdraw (0,.15u) -- (.15u,.4u); endfor; enddef; def p_gradient_SKBB (expr pos,theta,sc,al)= U:=(.3u,.6u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.3u,-.6u)--(-.3u,.6u); thdraw (0,-.6u)--(0,-0.2u); thdraw (.3u,-.6u)--(.3u,.6u); enddef; def p_pillars_UIS(expr pos,theta,sc,al) = U:=(.3u, .2u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; for i=-1 upto 1: T:=identity aligned al rotated theta scaled (sc * 0.7) shifted (pos + (i * .3u, 0)); thdraw (0,.15u)--(0,-.15u); thdraw (-.15u,-.4u)--(0,-.15u)--(.15u,-.4u); thdraw (-.15u,.4u)--(0,.15u)--(.15u,.4u); endfor; enddef; %%%%% ENDINPUT thPoint %%%%% %%%%% INPUT thLine %%%%% %% therion source code %% %% This file defines macros for line symbols %% %% $Date: 2003/07/01 09:06:44 $ %% $RCSfile: thLine.mp,v $ %% $Revision: 1.4 $ %% %% Copyright (C) 2000 Martin Budaj %% %% -------------------------------------------------------------------- %% This program is free software; you can redistribute it and/or modify %% it under the terms of the GNU General Public License as published by %% the Free Software Foundation; either version 2 of the License, or %% any later version. %% %% This program is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %% GNU General Public License for more details. %% %% You should have received a copy of the GNU General Public License %% along with this program; if not, write to the Free Software %% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA %% -------------------------------------------------------------------- % some definitions % adjust step according to the length of the path; return at least two steps vardef adjust_step (expr len, s) = if s <= len/2: len / (floor(len / s)) else: len/2 fi enddef; def mark_(expr p,t,l) = thdraw (point t of p) -- ((point t of p) + l * unitvector(thdir(p,t) rotated 90)); enddef; vardef thdir (expr p,t) = % 1 * epsilon caused problems in scales < 1:1000 % n * epsilon is enough for scale 1:(n*1000) if arclength(p)=0: hide(thwarning("unable to determine direction on zero-length path")) (0,1) else: % ((direction t-100*epsilon of p) + (direction t+100*epsilon of p)) / 2 postcontrol (t+1000*epsilon) of p - precontrol (t-1000*epsilon) of p % direction t of p fi enddef; % walls: def l_wall_bedrock_UIS (expr P) = T:=identity; pickup PenA; thdraw P; enddef; def l_wall_sand_SKBB (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, 0.1u); pickup PenB; forever: t := arctime cas of P; thdraw ((point t of P) + (uniformdeviate 1) * .4u * unitvector(thdir(P,t) rotated -90)); cas := cas + mojkrok; exitif cas > dlzka + (mojkrok / 3); % for rounding errors endfor; pickup PenA; thdraw P; enddef; def l_wall_pebbles_SKBB (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, .35u); pickup PenC; q:=superellipse((.2u,0),(0,.1u),(-.2u,0),(0,.-.1u),.75); forever: t := arctime (cas + mojkrok/2) of P; thdraw q randomized (u/20) rotated (angle(thdir(P,t)) + (normaldeviate*40)) shifted point t of P; cas := cas + mojkrok; exitif cas > dlzka - (2*mojkrok/3); % for rounding errors endfor; enddef; def l_wall_clay_SKBB (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, .5u); pickup PenC; q := (-0.15u,0){up}..{down}origin..{up}(0.15u,0); forever: t := arctime (cas + mojkrok/2) of P; thdraw q shifted (point t of P + .25u * unitvector(thdir(P,t) rotated -90)); cas := cas + mojkrok; exitif cas > dlzka - (2*mojkrok/3); % for rounding errors endfor; pickup PenA; thdraw P; enddef; def l_wall_debris_SKBB (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, .4u); pickup PenC; % q := ((-.1u,-.15u)--(.2,.03u)--(-.2u,.15u)--cycle) scaled 1.5; q := ((-.2u,-.1u)--(.2u,-.1u)--(0,.2u)--cycle) scaled 1.1; forever: t := arctime (cas + mojkrok/2) of P; thdraw q randomized (u/10) rotated uniformdeviate (360) shifted point t of P; cas := cas + mojkrok; exitif cas > dlzka - (2*mojkrok/3); % for rounding errors endfor; enddef; def l_wall_blocks_SKBB (expr P) = % pickup PenD; % draw P withcolor red; T:=identity; cas := 0; dlzka := arclength P; if dlzka > 0: mojkrok:=adjust_step(dlzka, 1.5u); pickup PenA; forever: t1 := arctime (cas + mojkrok*1/10) of P; t2 := arctime (cas + mojkrok*9/10) of P; q := ((point t1 of P) + .4u * unitvector(thdir(P,t1) rotated -90)) -- (subpath (t1,t2) of P) -- ((point t2 of P) + .4u * unitvector(thdir(P,t2) rotated -90)); thdraw q randomized (u/6); cas := cas + mojkrok; exitif cas > dlzka - (2*mojkrok/3); % for rounding errors endfor; fi; enddef; def l_wall_ice_SKBB (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, .5u); pickup PenC; p := (-.1u,0)--(.1u,0); q := (0,-.1u)--(0,.1u); forever: t := arctime (cas + mojkrok/2) of P; thdraw p shifted (point t of P + .25u * unitvector(thdir(P,t) rotated -90)); thdraw q shifted (point t of P + .25u * unitvector(thdir(P,t) rotated -90)); cas := cas + mojkrok; exitif cas > dlzka - (2*mojkrok/3); % for rounding errors endfor; pickup PenA; thdraw P; enddef; def l_wall_underlying_UIS (expr P) = T:=identity; pickup PenA; thdraw P dashed evenly scaled optical_zoom; enddef; def l_wall_unsurveyed_SKBB (expr P) = T:=identity; pickup PenC; thdraw P; enddef; def l_wall_presumed_UIS (expr P) = T:=identity; pickup PenA; thdraw P dashed evenly scaled (2*optical_zoom); enddef; % other line symbols def l_pit_UIS (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, 0.25u); pickup PenD; forever: t := arctime cas of P; mark_ (P,t,0.2u); cas := cas + mojkrok; exitif cas > dlzka + (mojkrok / 3); % for rounding errors endfor; pickup PenC; thdraw P; enddef; let l_floorstep_UIS = l_pit_UIS; def l_overhang_SKBB (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, 0.3u); pickup PenC; t1:=0; forever: t := arctime (cas + mojkrok/2) of P; t2 := arctime (cas + mojkrok) of P; thfill (subpath (t1,t2) of P) -- ((point t of P) + .3u * unitvector(thdir(P,t) rotated 90)) -- cycle; cas := cas + mojkrok; exitif cas > dlzka - (2*mojkrok/3); % for rounding errors t1:=t2; endfor; thdraw P; enddef; def l_chimney_UIS (expr P) = T:=identity; pickup PenC; thdraw P dashed evenly scaled optical_zoom; enddef; def l_ceilingstep_SKBB (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, 0.8u); pickup PenC; forever: t1 := arctime (cas + mojkrok*1/5) of P; t := arctime (cas + mojkrok/2) of P; t2 := arctime (cas + mojkrok*4/5) of P; thdraw (subpath (t1,t2) of P); mark_ (P,t,0.2u); cas := cas + mojkrok; exitif cas > dlzka - (2*mojkrok/3); % for rounding errors endfor; enddef; def l_ceilingmeander_SKBB (expr P) = pair Pp; pair Pd; pair Pv; T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, 0.8u); pickup PenC; forever: t := arctime (cas + mojkrok/2) of P; Pp := (point t of P); Pd := unitvector(thdir(P,t)); Pv := Pd rotated 90; thdraw (Pp + 0.1u * Pv) -- (Pp + 0.2u * Pv); thdraw (Pp + 0.2u * Pv + 0.2u * Pd) -- (Pp + 0.2u * Pv - 0.2u * Pd); thdraw (Pp - 0.1u * Pv) -- (Pp - 0.2u * Pv); thdraw (Pp - 0.2u * Pv + 0.2u * Pd) -- (Pp - 0.2u * Pv - 0.2u * Pd); cas := cas + mojkrok; exitif cas > dlzka - (2*mojkrok/3); % for rounding errors endfor; enddef; %Bruce Mutton 2012.06.16 uses general code for l_ceilingmeander_SKBB defined in therion source code by Martin Budaj 5.3.9 % but ticks on outside (rock) side of lines def l_ceilingmeander_UIS (expr P) = pair Pp; pair Pd; pair Pv; T:=identity; cas := 0; % cursor to step along path dlzka := arclength P; mojkrok:=adjust_step(dlzka, 0.8u); % symbol length nudged to be multiple of path length pickup PenC; forever: t := arctime (cas + mojkrok/2) of P; Pp := (point t of P); Pd := unitvector(thdir(P,t)); Pv := Pd rotated 90; thdraw (Pp + 0.2u * Pv) -- (Pp + 0.3u * Pv); % add 0.1u to each moves ticks outside thdraw (Pp + 0.2u * Pv + 0.2u * Pd) -- (Pp + 0.2u * Pv - 0.2u * Pd); thdraw (Pp - 0.2u * Pv) -- (Pp - 0.3u * Pv); % subtract 0.1u to each moves ticks outside thdraw (Pp - 0.2u * Pv + 0.2u * Pd) -- (Pp - 0.2u * Pv - 0.2u * Pd); cas := cas + mojkrok; exitif cas > dlzka - (2*mojkrok/3); % for rounding errors endfor; enddef; let l_ceilingmeander_NZSS = l_ceilingmeander_UIS; %Bruce Mutton 2012.06.16 uses general code for l_ceilingstep_SKBB defined in therion source code by Martin Budaj 5.3.9 % but ticks on righthand (rock) side of line def l_ceilingstep_UIS (expr P) = T:=identity; cas := 0; % cursor to step along path dlzka := arclength P; mojkrok:=adjust_step(dlzka, 0.8u); % symbol length nudged to be multiple of path length pickup PenC; forever: t1 := arctime (cas + mojkrok*1/5) of P; t := arctime (cas + mojkrok/2) of P; t2 := arctime (cas + mojkrok*4/5) of P; thdraw (subpath (t1,t2) of P); mark_ (P,t,-0.2u); % change sign to -0.2u cas := cas + mojkrok; exitif cas > dlzka - (2*mojkrok/3); % for rounding errors endfor; enddef; let l_ceilingstep_NZSS = l_ceilingstep_UIS; %Bruce Mutton 2012.06.10 uses general code for l_pit_UIS defined in therion source code by Martin Budaj 5.3.9 % dots on righthand (rock) side of line spaced 0.2u, 0.2u same as floor-step ticks def l_chimney_NZSS (expr P) = T:=identity; cas := 0; % cursor to step along path dlzka := arclength P; mojkrok:=adjust_step(dlzka, 0.25u); % symbol length nudged to be multiple of path length q:= (0.20u,-0.20u) -- (0.21u,-0.21u); % dot pickup PenC; %2nd thinnest pen forever: t := arctime cas of P; thdraw q rotated angle(thdir(P,t)) shifted (point t of P ); % draw dots cas := cas + mojkrok; exitif cas > dlzka + (mojkrok / 3); % for rounding errors endfor; pickup PenB; %2nd thickest pen thdraw P; %continuous line enddef; %Bruce Mutton 2010.06.20 uses general code and adjust_step defined in therion source code by Martin Budaj %for Therion 5.3.8 def l_wall_presumed_NZSS (expr P) = T:=identity; cas := 0; % cursor to step along path dlzka := arclength P; mojkrok:=adjust_step(dlzka, 1.5u); % symbol length nudged to be multiple of path length q := (-0.2u,-0.4u)--(0,0)--(0.2u,-0.4u); % define v shape forever: t1 := arctime (cas + mojkrok*1/5) of P; t := arctime (cas + mojkrok/2) of P; t2 := arctime (cas + mojkrok*4/5) of P; pickup PenA; % thick thdraw (subpath (t1,t2) of P); % dash pickup PenC; % thin thdraw q rotated angle(thdir(P,t)) shifted (point t of P ); % v shape cas := cas + mojkrok; exitif cas > dlzka - (2*mojkrok/3); % for rounding errors endfor; enddef; def l_floormeander_SKBB (expr P) = pair Pp; pair Pd; pair Pv; pair PPp; pair PPd; pair PPv; T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, 0.25u); pickup PenC; forever: t := arctime cas of P; Pp := (point t of P); Pd := unitvector(thdir(P,t)); Pv := Pd rotated 90; thdraw (Pp + 0.1u * Pv) -- (Pp + 0.2u * Pv); thdraw (Pp - 0.1u * Pv) -- (Pp - 0.2u * Pv); if cas > 0: thdraw (PPp + 0.2u * PPv) -- (Pp + 0.2u * Pv); thdraw (PPp - 0.2u * PPv) -- (Pp - 0.2u * Pv); fi; PPp := Pp; PPd := Pd; PPv := Pv; cas := cas + mojkrok; exitif cas > dlzka + (mojkrok / 3); % for rounding errors endfor; enddef; boolean alw_perpendicular; def l_slope_SKBB (expr P,S)(text Q) = %show Q; T:=identity; numeric dirs[]; numeric lengths[]; for i=Q: dirs[redpart i]:=greenpart i; lengths[redpart i]:=bluepart i; endfor; li:=length(P); % last alw_perpendicular:=true; for i=0 upto li: if unknown dirs[i]: dirs[i]:=-1; else: if dirs[i]>-1: dirs[i]:=((90-dirs[i]) - angle(thdir(P,i))) mod 360; alw_perpendicular:=false; fi; fi; if unknown lengths[i]: lengths[i]:=-1; fi; endfor; %for i=0 upto li: show dirs[i]; endfor; ni:=0; % next pi:=0; % previous for i=0 upto li: d:=dirs[i]; if d=-1: if (i=0) or (i=li): dirs[i] := angle(thdir(P,i) rotated 90) mod 360; pi:=i; else: if ni<=i: for j=i upto li: ni:=j; exitif dirs[j]>-1; endfor; fi; w:=arclength(subpath(pi,i) of P) / arclength(subpath(pi,ni) of P); dirs[i]:=w[dirs[pi],dirs[ni]]; % if (dirs[i]-angle(thdir(P,i))) mod 360>180: % dirs[i]:=w[dirs[ni],dirs[pi]]; % message("*******"); % fi; fi; else: pi:=i; fi; endfor; %for i=0 upto li: show dirs[i]; endfor; ni:=0; % next pi:=0; % previous for i=0 upto li: l:=lengths[i]; if l=-1: if (i=0) or (i=li): lengths[i] := 1cm; % should never happen! thwarning("slope width at the end point not specified"); pi:=i; else: if ni<=i: for j=i+1 upto li: ni:=j; exitif lengths[j]>-1; endfor; fi; w:=arclength(subpath(pi,i) of P) / arclength(subpath(pi,ni) of P); lengths[i]:=w[lengths[pi],lengths[ni]]; pi:=i; fi; else: pi:=i; fi; endfor; % for i=0 upto li: show lengths[i]; endfor; T:=identity; boolean par; offset:=0; dlzka := (arclength P); if dlzka>3u: offset := 0.3u; elseif dlzka>u: offset := 0.1u; fi; dlzka:=dlzka-2offset; cas := offset; mojkrok:=adjust_step(dlzka,1.4u) / 2; pickup PenD; par := false; forever: t := arctime cas of P; if t mod 1>0: % not a key point w := (arclength(subpath(floor t,t) of P) / arclength(subpath(floor t,ceiling t) of P)); if alw_perpendicular: a := 90; else: a := w[dirs[floor t],dirs[ceiling t]]; fi; l := w[lengths[floor t],lengths[ceiling t]]; else: if alw_perpendicular: a := 90; else: a:= dirs[t]; fi; l:=lengths[t]; fi; a := a + angle(thdir(P,t)); thdraw (point t of P) -- ((point t of P) + if par: 0.333 * fi l * unitvector(dir(a))); cas := cas + mojkrok; par := not par; exitif cas > dlzka + offset + 0.1mm; % for rounding errors endfor; if S = 1: pickup PenC; draw P fi; %pickup pencircle scaled 3pt; %for i=0 upto li: draw point i of P; endfor; enddef; def l_slope_BCRA (expr P,S)(text Q) = %show Q; T:=identity; numeric dirs[]; numeric lengths[]; for i=Q: dirs[redpart i]:=greenpart i; lengths[redpart i]:=bluepart i; endfor; li:=length(P); % last alw_perpendicular:=true; for i=0 upto li: if unknown dirs[i]: dirs[i]:=-1; else: if dirs[i]>-1: dirs[i]:=((90-dirs[i]) - angle(thdir(P,i))) mod 360; alw_perpendicular:=false; fi; fi; if unknown lengths[i]: lengths[i]:=-1; fi; endfor; %for i=0 upto li: show dirs[i]; endfor; ni:=0; % next pi:=0; % previous for i=0 upto li: d:=dirs[i]; if d=-1: if (i=0) or (i=li): dirs[i] := angle(thdir(P,i) rotated 90) mod 360; pi:=i; else: if ni<=i: for j=i upto li: ni:=j; exitif dirs[j]>-1; endfor; fi; w:=arclength(subpath(pi,i) of P) / arclength(subpath(pi,ni) of P); dirs[i]:=w[dirs[pi],dirs[ni]]; % if (dirs[i]-angle(thdir(P,i))) mod 360>180: % dirs[i]:=w[dirs[ni],dirs[pi]]; % message("*******"); % fi; fi; else: pi:=i; fi; endfor; %for i=0 upto li: show dirs[i]; endfor; ni:=0; % next pi:=0; % previous for i=0 upto li: l:=lengths[i]; if l=-1: if (i=0) or (i=li): lengths[i] := 1cm; % should never happen! thwarning("slope width at the end point not specified"); pi:=i; else: if ni<=i: for j=i+1 upto li: ni:=j; exitif lengths[j]>-1; endfor; fi; w:=arclength(subpath(pi,i) of P) / arclength(subpath(pi,ni) of P); lengths[i]:=w[lengths[pi],lengths[ni]]; pi:=i; fi; else: pi:=i; fi; endfor; % for i=0 upto li: show lengths[i]; endfor; T:=identity; boolean par; offset:=0; dlzka := (arclength P); if dlzka>3u: offset := 0.3u; elseif dlzka>u: offset := 0.1u; fi; dlzka:=dlzka-2offset; cas := offset; mojkrok:=adjust_step(dlzka,1.4u) / 2; pickup PenD; par := false; forever: t := arctime cas of P; if t mod 1>0: % not a key point w := (arclength(subpath(floor t,t) of P) / arclength(subpath(floor t,ceiling t) of P)); if alw_perpendicular: a := 90; else: a := w[dirs[floor t],dirs[ceiling t]]; fi; l := w[lengths[floor t],lengths[ceiling t]]; else: if alw_perpendicular: a := 90; else: a:= dirs[t]; fi; l:=lengths[t]; fi; a := a + angle(thdir(P,t)); if par: thfill (point t of P) + mojkrok/2.5 * unitvector(dir(a+90))-- ((point t of P) + l * unitvector(dir(a))) -- (point t of P) + mojkrok/2.5 * unitvector(dir(a-90)) -- cycle; fi; cas := cas + mojkrok; par := not par; exitif cas > dlzka + offset + 0.1mm; % for rounding errors endfor; enddef; def l_contour_UIS(expr P)(text txt) = T:=identity; pickup PenD; thdraw P; for pnt=txt: if pnt=-2: mark_(P,arctime(arclength(P)/2) of P, 0.2u); elseif pnt>=0: mark_(P,pnt,0.2*u); fi; exitif pnt<0; endfor; enddef; def l_contour_SKBB(expr P)(text txt) = T:=identity; pickup PenD; thdraw P; for pnt=txt: if (pnt=-2) or (pnt=-1): mark_(P,arctime(arclength(P)/2) of P, 0.2u); elseif pnt>=0: mark_(P,pnt,0.2*u); fi; exitif pnt<0; endfor; enddef; def l_rockborder_UIS (expr P) = T:=identity; pickup PenC; if cycle P: thclean P fi; thdraw P; enddef; def l_rockedge_UIS (expr P) = T:=identity; pickup PenD; thdraw P; enddef; def l_border_visible_SKBB (expr Path) = T:=identity; pickup PenC; draw Path; enddef; def l_border_temporary_SKBB (expr Path) = T:=identity; pickup PenC; draw Path dashed evenly scaled optical_zoom; enddef; def l_flowstone_UIS (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, .7u); if (cycle P) and (dlzka < 3.5u): % make at least 5 curls on a cyclic path mojkrok := dlzka/5; fi; pickup PenC; t1:=0; forever: t2 := arctime (cas + mojkrok) of P; thdraw (point t1 of P){dir (angle(thdir(P,t1)) + 60)} .. {dir (angle(thdir(P,t2)) - 60)}(point t2 of P); cas := cas + mojkrok; exitif cas > dlzka + (mojkrok / 3); % for rounding errors t1:=t2; endfor; enddef; def l_moonmilk_UIS (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, .3u); pickup PenC; t1:=0; forever: t2 := arctime (cas + mojkrok) of P; thdraw (point t1 of P){dir (angle(thdir(P,t1)) + 80)} .. {dir (angle(thdir(P,t2)) - 80)}(point t2 of P); cas := cas + mojkrok; exitif cas > dlzka + (mojkrok / 3); % for rounding errors t1:=t2; endfor; enddef; def l_survey_surface_SKBB (expr P) = T:=identity; thdrawoptions(dashed withdots scaled (0.2 * optical_zoom) withpen PenC); thdraw P; thdrawoptions(); enddef; def l_survey_cave_SKBB (expr P) = T:=identity; pickup PenC; if ATTR__scrap_centerline: thdraw P; else: PolygonLine:=.8u; pair zz[]; for t = 0 upto length P - 1: zz1 := point t of P; zz2 := point t+1 of P; if length (zz2-zz1) > 2*PolygonLine: thdraw zz1 -- zz1 + PolygonLine * unitvector(zz2 - zz1); thdraw zz2 -- zz2 + PolygonLine * unitvector(zz1 - zz2); else: thdraw zz1 -- zz2; fi; endfor; fi; enddef; def l_survey_cave_UIS (expr P) = T:=identity; pair zz[]; pickup PenC; for t = 0 upto length P - 1: zz1 := point t of P; zz2 := point t+1 of P; draw zz1 -- zz2; endfor; enddef; def l_waterflow_permanent_UIS (expr Path) = path ppp; T:=identity; cas := 0; dlzka := arclength Path; mojkrok:=adjust_step(dlzka, 0.5u); pickup PenD; vardef azim = 50 + 15*normaldeviate enddef; az1 := azim; sgn := 1; ppp := point 0 of Path; forever: t1 := arctime cas of Path; t2 := arctime (cas+mojkrok) of Path; if cas+1.1*mojkrok > dlzka: az2 := 0; else: az2 := azim; fi; d1 := angle(thdir(Path,t1)) + sgn * az1; d2 := angle(thdir(Path,t2)) - sgn * az2; ppp := ppp & (point t1 of Path){dir d1} .. {dir d2}(point t2 of Path); az1 := az2; sgn := -1 * sgn; cas := cas + mojkrok; exitif cas > dlzka + mojkrok/3; % for rounding errors endfor; % drawarrow ppp; thdraw ppp; thdrawoptions(); oldahlength:=ahlength; ahlength:=ahlength*optical_zoom; thdraw arrowhead ppp; thfill arrowhead ppp; ahlength:=oldahlength; enddef; def l_waterflow_intermittent_SKBB (expr Path) = thdrawoptions(dashed evenly scaled optical_zoom); l_waterflow_permanent_UIS (Path); thdrawoptions(); enddef; def l_waterflow_conjectural_SKBB (expr Path) = thdrawoptions(dashed withdots scaled (0.5 * optical_zoom) withpen PenB); l_waterflow_permanent_UIS (Path); thdrawoptions(); enddef; def l_invisible (expr P) = enddef; def l_undefined (expr P) = T:=identity; pickup PenC; thdraw P withcolor red; thwarning("undefined line symbol used"); enddef; % Q = 0 -- no arrows % 1 -- end % 2 -- begin % 3 -- both def l_arrow_SKBB (expr P, Q) = T:=identity; pickup PenC; thdraw P; p := (-.1u,-.25u)--(0,0)--(.1u,-.25u); if odd Q: draw p rotated (angle(thdir(P,0))+90) shifted (point 0 of P); fi; if Q>1: draw p rotated (angle(thdir(P,length P))-90) shifted (point infinity of P); fi; enddef; def l_mapconnection_SKBB (expr P) = thdrawoptions(dashed withdots scaled (0.5 * optical_zoom) withpen PenB); l_arrow_SKBB(P,3); thdrawoptions(); enddef; def l_section_SKBB (expr P)(text txt) = T:=identity; path Q; Q = punked P; pickup PenC; for t = 0 upto length P - 1: pair zz[]; zz1 := point t of P; zz2 := point t+1 of P; zz3 := postcontrol t of P; zz4 := precontrol t+1 of P; if (length(zz3-1/3[zz1,zz2]) > 0.1pt) or (length(zz4-2/3[zz1,zz2]) > 0.1pt): zz5 = whatever[zz1,zz2]; (zz3-zz5) = whatever * (zz1-zz2) rotated 90; draw zz1--zz5; zz6 = whatever[zz1,zz2]; (zz4-zz6) = whatever * (zz1-zz2) rotated 90; draw zz2--zz6; else: draw zz1--zz2; fi; endfor; for pnt=txt: if pnt=-1: else: T:=identity rotated angle(thdir(Q,pnt)) shifted (point pnt of Q); pickup PenC; thdraw (0,0)--(0,.8u); thdraw (-.1u,.55u)--(0,.8u)--(.1u,.55u); fi; exitif pnt=-1; endfor; enddef; let l_border_invisible = l_invisible; let l_wall_invisible = l_invisible; def l_debug (expr col, pen, P) = T:=identity; pickup if pen=0: PenD else: PenB fi; thdraw P withcolor if col=-2: (1,.85,0) elseif col=-1: black elseif col=0: red else: blue fi; enddef; def l_u (expr P) = T:=identity; pickup PenA; thdraw P withcolor red; enddef; def l_gradient_UIS (expr P) = T:=identity; pickup PenC; thdraw P; p:=(-.15u,-.4u)--(0,0)--(.15u,-.4u)--cycle; thfill (p rotated (angle(thdir(P,length P))-90) shifted (point infinity of P)); thdraw (p rotated (angle(thdir(P,length P))-90) shifted (point infinity of P)); enddef; def l_gradient_BCRA (expr P) = T:=identity; pickup PenC; for t = 0 upto length P - 1: pair zz[]; zz1 := point t of P; zz2 := point t+1 of P; zz3 := unitvector(zz2 - zz1); thfill zz1 + u/3 * zz3 + .25u * (zz3 rotated 90) -- zz2 - u/3 * zz3 -- zz1 + u/3 * zz3 + .25u * (zz3 rotated -90) -- cycle; endfor; enddef; def l_rope_SKBB (expr P,exact) = T:=identity; pickup PenC; if exact: draw P; else: d:=0.5u; for i:=0 upto (length P - 2): x1 := xpart point i of P; y1 := ypart point i of P; x2 := xpart point i+1 of P; y2 := ypart point i+1 of P; dx1:=x1; dy1:=y1; x1:=0; y1:=0; x2:=x2-dx1; y2:=y2-dy1; if y2 > y1: y3 := y1 - d; x3 := x1 + (x2-x1)*sqrt(d)/(sqrt(d)+sqrt(y2-y1+d)); else: y3 := y2 - d; x3 := x1 + (x2-x1)*sqrt(y1-y2+d)/(sqrt(d)+sqrt(y1-y2+d)); fi; numeric a,b,c; a*x1/10*x1 + b/10*x1 + c/10 = y1/10; a*x2/10*x2 + b/10*x2 + c/10 = y2/10; a*x3/10*x3 + b/10*x3 + c/10 = y3/10; draw (x1+dx1,y1+dy1) for t = x1 step (x2-x1)/20 until x2+10*epsilon: -- (t+dx1,a*t*t+b*t+c+dy1) endfor; endfor; pair x; x = point (length P)-1 of P + whatewer * down; x = point (length P) of P + whatever * right; draw point (length P)-1 of P -- x; % thdraw point length P of P withpen pencircle scaled 0.3u withcolor red; fi; for i:=0 upto length P if not exact: -1 fi: thdraw point i of P withpen pencircle scaled 0.3u; endfor; enddef; def l_border_presumed_SKBB (expr Path) = T:=identity; pickup PenC; draw Path dashed evenly scaled (0.25 * optical_zoom); enddef; def l_steps_SKBB (expr P) = if known ATTR_c: c := scantokens ATTR_c; else: c := 2; fi; if ATTR__elevation: if (c < 2): thwarning("Invalid stairs definition (c<2)"); pickup PenA; draw P withcolor red; else: path PP; if (ypart point 0 of P) < (ypart point length P of P): PP := P; else: PP := reverse P; fi; path p; for j:=0 upto ((length PP) - 1): p := (point j of PP) -- (point (j + 1) of PP); c := ceiling(abs((ypart point 0 of p) - (ypart point length p of p)) / (0.2 / Scale * 72 / 2.54)); % 20 cm height if (c < 2): c:=2 fi; pair cp; cp = point length p of p - point 0 of p; dx := (xpart cp) / c; dy := (ypart cp) / c; cp := point 0 of p; for i:= 0 upto c - 1: l_border_visible(cp -- cp + (0,dy) -- cp + (dx,dy)); cp := cp + (dx, dy); endfor; %draw P; endfor; fi; else: if known ATTR_l: l := scantokens ATTR_l; else: l := (length(P)-2)/2; fi; if ((length(P) < 4) or (c < 2)) or ((odd length P) and (not known ATTR_l)): thwarning("Invalid stairs definition" if c<2: &" (c<2)" fi); pickup PenA; draw P withcolor red; else: path p, q; p = subpath (1, 1+l) of P; q = reverse subpath (l+2, length(P)) of P; lp := arclength(p); lq := arclength(q); for i=1 upto c: l_border_visible(point(arctime ((i-1)/(c-1)*lp) of p) of p -- point(arctime ((i-1)/(c-1)*lq) of q) of q); endfor; l_border_visible(p); l_border_visible(q); drawoptions(withcolor 0.3*white); %p_label(decimal c, point 0.5 of P, 0, 6); drawoptions(); fi; fi; enddef; def l_handrail_SKBB (expr P) = if ATTR__elevation: T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, 1u); pickup PenD; pair tmppoint; tmph := 1 / Scale * 72 / 2.54; % 1 m height tmppoint:=(point 0 of P) +(0,tmph); forever: t := arctime cas of P; draw point t of P -- (point t of P)+(0,tmph) withpen PenD; if cas > 0: draw tmppoint -- (point t of P)+(0,tmph) withpen PenC; tmppoint := (point t of P)+(0,tmph); fi; cas := cas + mojkrok; exitif cas > dlzka + (mojkrok / 3); % for rounding errors endfor; else: T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, u); pickup PenD; forever: t := arctime cas of P; thdraw point t of P withpen pencircle scaled .25u; cas := cas + mojkrok; exitif cas > dlzka + (mojkrok / 3); % for rounding errors endfor; pickup PenC; thdraw P; fi; enddef; def l_fixedladder_SKBB (expr P) = pickup PenD; draw P withcolor red; enddef; def l_ropeladder_SKBB (expr P) = pickup PenD; draw P withcolor red; enddef; def l_viaferrata_SKBB (expr P) = pickup PenD; draw P withcolor red; enddef; %%%%% ENDINPUT thLine %%%%% %%%%% INPUT thArea %%%%% %% therion source code %% %% This file defines tiling patterns %% %% $Date: 2003/07/01 09:06:44 $ %% $RCSfile: thPatterns.mp,v $ %% $Revision: 1.6 $ %% %% Copyright (C) 2000-2004 Martin Budaj %% %% -------------------------------------------------------------------- %% This program is free software; you can redistribute it and/or modify %% it under the terms of the GNU General Public License as published by %% the Free Software Foundation; either version 2 of the License, or %% any later version. %% %% This program is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %% GNU General Public License for more details. %% %% You should have received a copy of the GNU General Public License %% along with this program; if not, write to the Free Software %% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA %% -------------------------------------------------------------------- if unknown a_water_UIS: else: endinput fi; % patterns beginpattern(pattern_water_UIS); draw origin--10up withpen pensquare scaled (0.02u); patternxstep(.18u); patterntransform(identity rotated 45); endpattern; beginpattern(pattern_sump_UIS); draw origin--(0,.25u) withpen pensquare scaled (0.02u); draw origin--(.25u,0) withpen pensquare scaled (0.02u); patterntransform(identity rotated 45); endpattern; beginpattern(pattern_sand_UIS); pickup PenC; draw (0.2u,.3u); draw (0.35u,.7u); draw (0.6u,.5u); draw (0.8u,.1u); endpattern; beginpattern(pattern_debris_SKBB); pickup PenC; p:=(-.15u,0)--(.15u,0); draw p rotated -40 shifted (.2u,.3u); draw p rotated 70 shifted (.9u,1.5u); draw p rotated 20 shifted (1.5u,.8u); % draw p rotated 95 shifted (.9u,.8u); endpattern; beginpattern(pattern_moonmilk_SKBB); pickup PenC; p:=(-.5u,0){down} .. {up}(-.1666u,0){down}.. {up}(.1666u,0){down} .. {up}(.5u,0); draw p; draw p shifted (0.5u,0.3u); patternxstep(1.0u); patternystep(0.6u); endpattern; beginpattern(pattern_flowstone_ASF); pickup PenC; p:=(-.35u,0){dir -60} .. {dir 60}(0.35u,0); draw p; draw p shifted (0.35u,0.4u); patternxstep(u); patternystep(0.8u); endpattern; beginpattern(pattern_empty); patternbbox(0,0,10,10); patternstep(10,10); endpattern; % symbols def a_water_UIS (expr Path) = T:=identity; thclean Path; thfill Path withpattern pattern_water_UIS; enddef; def a_sump_UIS (expr Path) = T:=identity; thclean Path; thfill Path withpattern pattern_sump_UIS; enddef; def a_flowstone_ASF (expr Path) = T:=identity; thclean Path; thfill Path withpattern pattern_flowstone_ASF; enddef; def a_moonmilk_SKBB (expr Path) = T:=identity; thclean Path; thfill Path withpattern pattern_moonmilk_SKBB; enddef; def a_sand_UIS (expr p) = T:=identity; % thclean p; pickup PenC; path q; q = bbox p; picture tmp_pic; tmp_pic := image( for i = xpart llcorner q step 1u until xpart urcorner q: for j = ypart llcorner q step 1u until ypart urcorner q: draw origin shifted ((i,j) randomized 0.7u) withpen PenC; endfor; endfor; ); clip tmp_pic to p; drawoptions(); draw tmp_pic; enddef; def a_debris_UIS (expr Path) = T:=identity; % thclean Path; thfill Path withpattern pattern_debris_SKBB; enddef; def a_bedrock_SKBB (expr Path) = T:=identity; thclean Path; enddef; % used to export centerline LRUD envelope for maps created from surveys def a_dimensions_SKBB (expr Path) = T:=identity; thclean Path; enddef; def a_debris_SKBB (expr p) = T:=identity; % thclean p; pickup PenC; path q; q = bbox p; picture tmp_pic; tmp_pic := image( for i = xpart llcorner q step 1u until xpart urcorner q: for j = ypart llcorner q step 1u until ypart urcorner q: draw ((-.2u,0)--(.2u,0)) rotated uniformdeviate(360) shifted ((i,j) randomized 0.6u) withpen PenC; endfor; endfor; ); clip tmp_pic to p; drawoptions(); draw tmp_pic; enddef; def a_clay_SKBB (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.5u until xpart urcorner q: for j = ypart llcorner q step 1.5u until ypart urcorner q: qq := ((-.25u,0){up}..origin{down}..{up}(0.25u,0)) randomized (u/15) shifted ((i,j) randomized 1.3u); if xpart (p intersectiontimes qq) < 0: thdraw qq; fi; endfor; endfor; ); clip tmp_pic to p; drawoptions(); draw tmp_pic; enddef; def a_ice_SKBB (expr p) = T:=identity; pickup PenC; path q; q = bbox p; picture tmp_pic, tmp_ice; pair z; tmp_ice := image ( draw (-.2u,0)--(.2u,0); draw (0,-.2u)--(0,.2u); ); tmp_pic := image( for i = xpart llcorner q step 1.5u until xpart urcorner q: for j = ypart llcorner q step 1.5u until ypart urcorner q: z := ((i,j) randomized 1.3u); if xpart (p intersectiontimes ((bbox tmp_ice) shifted z)) < 0: draw tmp_ice shifted z; fi; endfor; endfor; ); clip tmp_pic to p; drawoptions(); draw tmp_pic; enddef; def a_snow_SKBB (expr P) = T:=identity; pickup PenC; path q; q = bbox P; picture tmp_pic, tmp_sn; pair z; tmp_sn := image( pickup PenC; p := origin--(0,.2*u); draw p; draw p rotated (60); draw p rotated (120); draw p rotated (180); draw p rotated (240); draw p rotated (300); p := ((0,.3u)--(0,0.2u)--(0.1u,0.2u)) rotatedaround ((0,0.2u),45); draw p; draw p rotated (60); draw p rotated (120); draw p rotated (180); draw p rotated (240); draw p rotated (300); ); tmp_pic := image( for i = xpart llcorner q step 1.5u until xpart urcorner q: for j = ypart llcorner q step 1.5u until ypart urcorner q: z:=((i,j) randomized 1.3u); if xpart (P intersectiontimes ((bbox tmp_sn) shifted z)) < 0: draw tmp_sn shifted z; fi; endfor; endfor; ); clip tmp_pic to P; drawoptions(); draw tmp_pic; enddef; def a_blocks_SKBB (expr p) = T:=identity; pickup PenC; path q, qq; q = bbox p; picture tmp_pic; uu := max(u, (xpart urcorner q - xpart llcorner q)/100, (ypart urcorner q - ypart llcorner q)/100); tmp_pic := image( for i = xpart llcorner q step 2uu until xpart urcorner q: for j = ypart llcorner q step 2uu until ypart urcorner q: qq := punked (((-.5uu,-.5uu)--(.5uu,-.5uu)--(.5uu,.5uu)--(-.5uu,.5uu)--cycle) randomized (uu/2)) rotated uniformdeviate(360) shifted ((i,j) randomized 1.6uu); if xpart (p intersectiontimes qq) < 0: thclean qq; thdraw qq; fi; endfor; endfor; ); clip tmp_pic to p; drawoptions(); draw tmp_pic; enddef; def a_blocks_SKBB_ (expr p,o,s_beg,s_end,d_beg,d_end) = T:=identity; orient = 90-o; pickup PenC; path q[], qq; q1 = bbox p; draw q1; draw p; q2 = llcorner q1 .. lrcorner q1 .. urcorner q1 .. ulcorner q1 .. cycle; draw q2; pair zz[]; radius := .5*length(llcorner q1 - urcorner q1); zz1 := .5[llcorner q1,urcorner q1]; zz2 := zz1 - dir(orient)*radius; zz3 = zz1 rotatedaround (zz2,90); draw zz1 withpen pencircle scaled 2mm; draw zz2 withpen pencircle scaled 2mm; draw zz3 withpen pencircle scaled 2mm; picture tmp_pic; tmp_pic := image( j := 0; forever: i := 0; forever: qq := punked (((-.5,-.5)--(.5,-.5)--(.5,.5)--(-.5,.5)--cycle) scaled (0.7(5u-(j/(2*radius))[u*s_beg,u*s_end])) randomized (u/2)) rotated uniformdeviate(360) shifted (((zz3 + (i,j)) rotatedaround (zz3,-o)) randomized 1.6u); draw ((zz3 + (i,j)) rotatedaround (zz3,-o)) withpen pencircle scaled 1mm withcolor red; if xpart (p intersectiontimes qq) < 0: thclean qq; thdraw qq; fi; i := i + (j/(2*radius))[u*d_beg,u*d_end]; exitif i > 2*radius; endfor; j := j + (j/(2*radius))[u*d_beg,u*d_end]; exitif j > 2*radius; endfor; ); % clip tmp_pic to p; drawoptions(); draw tmp_pic; enddef; def a_pebbles_SKBB (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.5u until xpart urcorner q: for j = ypart llcorner q step 1.5u 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.8u); if xpart (p intersectiontimes qq) < 0: thdraw qq; fi; endfor; endfor; ); clip tmp_pic to p; drawoptions(); draw tmp_pic; enddef; def a_water_SKBB (expr Path) = T:=identity; thfill Path; enddef; let a_sump_SKBB = a_water_SKBB; def a_u (expr p) = T:=identity; thfill p withcolor red; enddef; %%%%% ENDINPUT thArea %%%%% %%%%% INPUT thText %%%%% %% therion source code %% %% This file defines macros for labels %% %% $Date: 2003/07/01 09:06:44 $ %% $RCSfile: thText.mp,v $ %% $Revision: 1.6 $ %% %% Copyright (C) 2000-2004 Martin Budaj %% %% -------------------------------------------------------------------- %% This program is free software; you can redistribute it and/or modify %% it under the terms of the GNU General Public License as published by %% the Free Software Foundation; either version 2 of the License, or %% any later version. %% %% This program is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %% GNU General Public License for more details. %% %% You should have received a copy of the GNU General Public License %% along with this program; if not, write to the Free Software %% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA %% -------------------------------------------------------------------- labeloffset:=0bp; def l_label(expr txt,path) = picture pict,pic; pair pos; numeric dx[],dy[],ptime; string ss,ch; pic := thelabel(txt,(0,0)); strl := xpart(lrcorner pic - llcorner pic); pathl := arclength (path); dx0 := xpart(llcorner pic); % dy0 := ypart(llcorner pic); if strl>pathl: txtzoom := pathl / strl; thwarning("text scaled down to fit the path"); else: txtzoom := 1; fi; zoom := pathl / strl; for p within pic: if textual p: ss := textpart p; dx1 := xpart p; dy1 := ypart p; dx2 := dx1; if xxpart p / yypart p <> 1: message("Error: distorted text!") fi; txtscale := txtzoom * xxpart p; l := length(ss); ptime := 0; for i=0 upto (l - 1): ch := substring(i,i+1) of ss; pict := ch infont fontpart p scaled txtscale; charwidth := xpart (lrcorner pict - llcorner pict) / txtzoom; dy2 := ypart lrcorner pict / txtzoom; ptime := (dx2 - dx0 + 0.5*charwidth) * zoom; t := arctime ptime of (path); pos := point t of path + (dy1+dy2)*txtzoom*unitvector((direction t of path) rotated 90); begingroup % interim labeloffset:=0bp; lab:=thelabel.top(pict,pos); process_label(pos,angle direction t of path); endgroup; dx2 := dx2 + charwidth; endfor; else: message("Strange component of line label!"); fi; endfor; % draw path; enddef; vardef p_label@#(expr txt,pos,rot,mode) = if (mode=1) or (mode=7): interim labeloffset:=(u/8) fi; lab:=thelabel@#(txt, pos); if mode>1: pickup PenD fi; if mode=1: pickup pencircle scaled (u/6); drawdot(pos); process_label(pos,0); elseif mode=2: process_uplabel; elseif mode=3: process_downlabel; elseif mode=4: process_updownlabel; elseif mode=5: process_circledlabel; elseif mode=6: process_boxedlabel; elseif mode=7: process_label(pos,rot); % station name elseif mode=8: process_filledlabel(pos, rot); else: process_label(pos,rot); fi; enddef; % at beginfig: save smartll[], smartur[]; pair smartll[], smartur[]; smart_count=0; numeric smart_count, smart_D; boolean smart_quit, smart_inner_quit; def p_smartlabel (expr txt, pos) = begingroup; interim bboxmargin:=0.2pt; lab:=thelabel.rt(txt,pos+(0.4u,0)); q:=bbox lab; smart_D := 0; forever: smart_quit := true; smart_inner_quit := false; for i=1 upto smart_count: if smart_overlap(((point 0 of q) shifted (0,smart_D)), ((point 2 of q) shifted (0,smart_D)), smartll[i], smartur[i]) = 1: smart_quit := false; smart_D := smart_D - 3pt; smart_inner_quit := true; fi; exitif smart_inner_quit; endfor; exitif smart_quit; endfor; smart_U := 0; forever: smart_quit := true; smart_inner_quit := false; for i=1 upto smart_count: if smart_overlap(((point 0 of q) shifted (0,smart_U)), ((point 2 of q) shifted (0,smart_U)), smartll[i], smartur[i]) = 1: smart_quit := false; smart_U := smart_U + 3pt; smart_inner_quit := true; fi; exitif smart_inner_quit; endfor; exitif smart_quit; endfor; if (smart_U < -smart_D): smart_D := smart_U; fi; draw lab shifted (0,smart_D); if (abs(smart_D)>3pt): pickup PenB; draw pos{left}..{right}(pos shifted (.4u, smart_D)) dashed withdots scaled 0.2; pickup PenA; drawdot pos; fi; smart_count := smart_count + 1; smartll[smart_count] := point 0 of (q shifted (0,smart_D)); smartur[smart_count] := point 2 of (q shifted (0,smart_D)); endgroup; enddef; def smart_overlap (expr llA, urA, llB, urB) = if ((xpart llA < xpart urB) and (xpart urA > xpart llB)) and ((ypart llA < ypart urB) and (ypart urA > ypart llB)): 1 else: 0 fi enddef; def p_wallaltitude (expr pprev,pos,pnext,txt) = rot:=angle(unitvector(pnext-pos)+unitvector(pos-pprev)) - 90; pickup PenD; pair zz; % zz:=(pos + 3*unitvector(dir rot)); zz:=(pos + (u/4)*unitvector(dir rot)); draw (pos)--zz; begingroup % interim labeloffset:=2pt; interim labeloffset:=(u/12); if horiz_labels: rot:=rot mod 360; if rot<=22.5: lab:=thelabel.rt(txt, zz); elseif rot<=67.5: lab:=thelabel.urt(txt, zz); elseif rot<=112.5: lab:=thelabel.top(txt, zz); elseif rot<=157.5: lab:=thelabel.ulft(txt, zz); elseif rot<=202.5: lab:=thelabel.lft(txt, zz); elseif rot<=247.5: lab:=thelabel.llft(txt, zz); elseif rot<=292.5: lab:=thelabel.bot(txt, zz); elseif rot<=337.5: lab:=thelabel.lrt(txt, zz); else: lab:=thelabel.rt(txt, zz); fi; else: if (abs rot>90) and (abs rot <=270): rot:=rot-180; lab:=thelabel.lft(txt, pos); else: lab:=thelabel.rt(txt, pos); fi; fi; process_label(pos, if horiz_labels: 0 else: rot fi); endgroup; enddef; %%%%% ENDINPUT thText %%%%% %%%%% INPUT thSpecial %%%%% %% therion source code %% %% This file defines macros for special symbols %% %% $Date: $ %% $RCSfile: $ %% $Revision: $ %% %% Copyright (C) 2004 Martin Budaj %% %% -------------------------------------------------------------------- %% This program is free software; you can redistribute it and/or modify %% it under the terms of the GNU General Public License as published by %% the Free Software Foundation; either version 2 of the License, or %% any later version. %% %% This program is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %% GNU General Public License for more details. %% %% You should have received a copy of the GNU General Public License %% along with this program; if not, write to the Free Software %% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA %% -------------------------------------------------------------------- def s_northarrow_SKBB_old (expr rot) = T:=identity; picture tmp_pic; tmp_pic = image ( begingroup interim defaultscale:=3; label(if (lang="sk") or (lang="cz"): "S" else: "N" fi, origin); endgroup; drawarrow (0,-1cm)--(0,1cm); ); draw tmp_pic rotatedaround(origin, -rot); enddef; def s_northarrow_SKBB (expr rot) = T:=identity scaled 0.7 rotated -rot; thdraw (-.5cm,-1cm)--(0,1.5cm)--(.5cm,-1cm)--(0,-.5cm)--cycle; thfill (-.5cm,-1cm)--(0,1.5cm)--(0,-.5cm)--cycle; enddef; def s_scalebar_SKBB (expr l, units, txt) = begingroup interim warningcheck:=0; tmpl:=l / Scale * cm * units / 2; endgroup; pickup PenC; draw (-tmpl,0)--(tmpl,0); draw (-tmpl,0)--(-tmpl,2bp); draw (tmpl,0)--(tmpl,2bp); begingroup interim labeloffset:=2bp; label.top(thTEX(decimal (l) & "\thinspace" & txt),origin); endgroup enddef; def s_scalebar_SM (expr l, units, txt) = begingroup interim warningcheck:=0; tmpl:=l / Scale * cm * units / 2; endgroup; pickup PenC; draw (-tmpl,0)--(tmpl,0); draw (-tmpl,0)--(-tmpl,2bp); draw (tmpl,0)--(tmpl,2bp); draw (0,0)--(0,2bp); begingroup interim labeloffset:=3.5bp; label.top(thTEX(decimal (0)),(-tmpl,0)); label.top(thTEX(decimal (l/2)),origin); label.top(thTEX(decimal (l) & "\thinspace" & txt),(tmpl,0)); endgroup enddef; def s_hgrid_SM (expr xpos, ypos, xsize, ysize) = pickup PenD; draw ( if xpos < 0: 0 else: -5mm fi, 0 ) -- ( if xpos > 0: 0 else: 5mm fi, 0 ); draw ( 0, if ypos < 0: 0 else: -5mm fi ) -- ( 0, if ypos > 0: 0 else: 5mm fi ); enddef; def s_vgrid_SM (expr xpos, ypos, xsize, ysize) = pickup PenD; draw ( if xpos < 0: 0 else: -xsize/2 fi, 0 ) -- ( if xpos > 0: 0 else: xsize/2 fi, 0 ) dashed evenly; enddef; %%%%% ENDINPUT thSpecial %%%%% %%%%% INPUT uAUT %%%%% % Austrian Symbol Set, author Georg Pacher % color (for Austrian symbol-set) color col_water_bg; col_water_bg :=(226/255,244/255,253/255); %%%%%%%%%%%%%%%%%%%%%%% %% areas % returns true if pair point lies within path q. % outside_point is any pair outside of path q (needed for reference). vardef pointinside(expr pt,q,outside_point)= T:=identity; path test; test:= outside_point--pt; %thdraw test; boolean isinside; isinside:=false; numintersections:=recgetnumintersections(test,q,0); if (numintersections <0): isinside:=true; elseif odd(numintersections): isinside:=true; else: isinside:=false; fi; isinside enddef; % get number of intersection between paths p (length 1!) and q % recnum is needed for limitation of recursions. % If the number of allowed recursions is reached, a negativ number of intersections is returned vardef recgetnumintersections(expr p,q,recnum)= pair inter; save preinter; save postinter; save numintersections; path preinter, postinter; inter:=p intersectiontimes q; %show recnum; if recnum >25: numintersections:=-100; else: if xpart(inter)>0 : %show (xpart inter); % split p into two paths and call yourself again preinter:=subpath (0,xpart(inter)-2eps) of p; postinter:=subpath (xpart(inter)+2eps,1) of p; numintersections:= recgetnumintersections(preinter,q,recnum+1) + recgetnumintersections(postinter,q,recnum+1) + 1; else: numintersections:=0; fi; fi; numintersections enddef; beginpattern(pattern_water_AUT); draw origin--10up withpen pensquare scaled (0.02u); patternxstep(.18u); patterntransform(identity rotated 90); endpattern; beginpattern(pattern_sump_AUT); draw origin--(0,.25u) withpen pensquare scaled (0.02u); draw origin--(.25u,0) withpen pensquare scaled (0.02u); endpattern; beginpattern(pattern_sand_AUT); pickup PenC; p:= origin -- (0.01u,0.01u); for i=0.0u step 0.2u until 2.4u: for j=0.0u step 0.2u until 2.4u: draw p rotated uniformdeviate(360) shifted ((i,j) randomized 0.09u); endfor; endfor; if BaseScale<=2.5: my_step:=2.4u; else: my_step:=2.6u; fi; patternstep(my_step,my_step); endpattern; beginpattern(pattern_pebbles_AUT); pickup PenC; path qq; for i=0.0u step 0.3u until 5.1u: for j=0.0u step 0.3u until 5.1u: qq := (superellipse((.1u,0),(0,.05u),(-.1u,0),(0,.-.05u),.75)) randomized (u/45) scaled (uniformdeviate(0.4)+.55) rotated uniformdeviate(360) shifted ((i,j) randomized 0.15u); draw qq; endfor; endfor; patternstep(5.1u,5.1u); endpattern; beginpattern(pattern_ice_AUT); pickup PenC; p:=(-.15u,.0u) -- (0.15u,.0u); draw p; draw p shifted (0.25u,.0u) rotated (90); draw p shifted (0.45u,0.25u); draw p shifted (0.0u,0.45u) rotated (90); patternxstep(.9u); patternystep(0.5u); endpattern; def a_water_AUT (expr Path) = T:=identity; thclean Path; pickup PenC; thfill Path withcolor col_water_bg; thfill Path withpattern pattern_water_AUT; thdraw Path; enddef; def a_sump_AUT (expr Path) = T:=identity; thclean Path; pickup PenC; thfill Path withcolor col_water_bg; thfill Path withpattern pattern_sump_AUT; thdraw Path; enddef; def a_sand_AUT (expr Path) = T:=identity; % thclean Path; thfill Path withpattern pattern_sand_AUT ; enddef; let a_clay_AUT = a_sand_AUT; def a_pebbles_AUT (expr p) = T:=identity; thfill p withpattern pattern_pebbles_AUT; enddef; def a_debris_AUT (expr p) = T:=identity; symbol_distance:=1.0; scale_factor:= 0.3; pickup PenC; path q, qq; q = bbox p; pair outside; outside:= ulcorner q + up; picture tmp_pic; uu := max(u, (xpart urcorner q - xpart llcorner q)/100, (ypart urcorner q - ypart llcorner q)/100); tmp_pic := image( for i = xpart llcorner q step symbol_distance*uu until xpart urcorner q: for j = ypart llcorner q step symbol_distance*uu until ypart urcorner q: qq := punked (((-.5uu,-.5uu)--(.5uu,-.5uu)--(1.05uu,0.01uu)--(.5uu,.5uu)--(-.5uu,.5uu)--cycle) randomized (uu/2)) scaled (uniformdeviate(0.4)+scale_factor ) rotated uniformdeviate(360) shifted ((i,j) randomized 0.5uu); if xpart (p intersectiontimes qq) < 0: if pointinside((i,j),p,outside): thclean qq; thdraw qq; fi; else: qq:= qq scaled (uniformdeviate(.2)+.5 ) if xpart (p intersectiontimes qq) < 0: if pointinside((i,j),p,outside): thclean qq; thdraw qq; fi; fi; fi; endfor; endfor; ); clip tmp_pic to p; drawoptions(); draw tmp_pic; enddef; def a_ice_AUT (expr p) = T:=identity; thclean p; thfill p withpattern pattern_ice_AUT; pickup PenC; thdraw p; enddef; def a_snow_AUT (expr P) = T:=identity; pickup PenC; path q; q = bbox P; picture tmp_pic, tmp_sn; pair z; tmp_sn := image( pickup PenC; p := origin--(0,.2*u); draw p; draw p rotated (60); draw p rotated (120); draw p rotated (180); draw p rotated (240); draw p rotated (300); p := ((0,.3u)--(0,0.2u)--(0.1u,0.2u)) rotatedaround ((0,0.2u),45); draw p; draw p rotated (60); draw p rotated (120); draw p rotated (180); draw p rotated (240); draw p rotated (300); ); tmp_pic := image( for i = xpart llcorner q step 1.0u until xpart urcorner q: for j = ypart llcorner q step 1.0u until ypart urcorner q: z:=((i,j) randomized 0.5u); if xpart (P intersectiontimes ((bbox tmp_sn) shifted z)) < 0: draw tmp_sn shifted z; fi; endfor; endfor; ); clip tmp_pic to P; draw tmp_pic; thdraw P; enddef; def a_blocks_AUT (expr p) = T:=identity; symbol_distance:=1.6; scale_factor:= 0.8; pickup PenC; path q, qq; q = bbox p; pair outside; outside:= ulcorner q + up; picture tmp_pic; uu := max(u, (xpart urcorner q - xpart llcorner q)/100, (ypart urcorner q - ypart llcorner q)/100); tmp_pic := image( for i = xpart llcorner q step symbol_distance*uu until xpart urcorner q: for j = ypart llcorner q step symbol_distance*uu until ypart urcorner q: qq := punked (((-.5uu,-.5uu)--(.5uu,-.5uu)--(1.05uu,0.01uu)--(.5uu,.5uu)--(-.5uu,.5uu)--cycle) randomized (uu/2)) scaled (uniformdeviate(0.7)+scale_factor ) rotated uniformdeviate(360) shifted ((i,j) randomized 0.75uu); if xpart (p intersectiontimes qq) < 0: if pointinside((i,j),p,outside): thclean qq; thdraw qq; fi; else: qq:= qq scaled (uniformdeviate(.2)+.5 ) if xpart (p intersectiontimes qq) < 0: if pointinside((i,j),p,outside): thclean qq; thdraw qq; fi; fi; fi; endfor; endfor; ); clip tmp_pic to p; drawoptions(); draw tmp_pic; enddef; %% lines def l_wall_pit_AUT (expr P) = T:=identity; % draw outer path pickup PenA; thdraw P; laenge:= arclength P; pair inner[],innerdir[], inter; pair test; samplingdistance:=max(0.15u,laenge/1500); path testcircle; % testcircle, used to test, whether the path makes a 'v'-like bend, % where normal sampling and offsetting gives poor results for the parallel line % size of testcircle= size PenA/2 + 2* (distance between outer and inner line) % + PenC (inner line) testcircle := halfcircle scaled (.5*u/10+2*.125u+.5*u/10) shifted (0,.5*u/10); cur:=samplingdistance/2; count:=0; forever: t:= arctime cur of P; inter:=P intersectiontimes (testcircle rotated (angle thdir(P,t)) shifted (point t of P)); %thdraw testcircle rotated (angle thdir(P,t)) shifted (point t of P) withpen (pencircle scaled 0.01u) ; if (xpart inter) >=0: % we are at a 'sharp bend', so set next point to intersectionpoint cur:=cur+samplingdistance; t := max( xpart inter, arctime cur of P); %thdraw point t of P withcolor 0.7*green; forever: t:= arctime cur of P; inter:=P intersectiontimes (testcircle rotated (angle thdir(P,t)) shifted (point t of P)); exitif (xpart inter <0); cur := cur + samplingdistance; exitif (cur >=laenge); endfor; if (cur =laenge); endfor; if count>2: % draw inner path pickup PenC; path innerpath; innerpath = for i=0 upto count-2: inner[i]{(innerdir[i])} .. endfor if cycle P: cycle; else: inner[count-1]; fi; thdraw innerpath; % draw the triangles path draw_triangle; pair l_triangle; laenge:= arclength innerpath; symsize:= adjust_step(laenge,0.5u); triangle_width:=symsize/2; cur:=(symsize/2); t := arctime (cur) of innerpath; t1:= arctime (cur-triangle_width/2) of innerpath; t2:= arctime (cur+triangle_width/2) of innerpath; l_triangle := (point t of innerpath); if ATTR__height >= 10: thfill else: thdraw fi (subpath (t1,t2) of innerpath) -- ((point t of innerpath) + symsize/2 * unitvector(thdir(innerpath,t) rotated 90)) -- cycle; for cur=(symsize/2) step symsize until laenge: t := arctime (cur) of innerpath; test := (point t of innerpath); my_dist := length(test-l_triangle); if (abs(my_dist-symsize) < 0.05u) or (my_dist>symsize): t1:= arctime (cur-triangle_width/2) of innerpath; t2:= arctime (cur+triangle_width/2) of innerpath; draw_triangle:=(subpath (t1,t2) of innerpath) -- ((point t of innerpath) + symsize/2 * unitvector(thdir(innerpath,t) rotated 90)) -- cycle; if xpart (draw_triangle intersectiontimes P) < 0: if ATTR__height >= 10: thfill draw_triangle; else: thclean draw_triangle; thdraw draw_triangle; fi; l_triangle:= test; fi; fi; endfor; fi; enddef; def l_wall_sand_AUT (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, 0.1u); pickup PenC; forever: t := arctime cas of P; thdraw (((0.01u,0.01u)--origin) rotated uniformdeviate(360) shifted ((point t of P) + (uniformdeviate 1) * .4u * unitvector(thdir(P,t) rotated -90))); cas := cas + mojkrok; exitif cas > dlzka + (mojkrok / 3); % for rounding errors endfor; pickup PenC; thdraw P; enddef; def l_wall_pebbles_AUT (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, .18u); pickup PenC; q:=superellipse((.1u,0),(0,.05u),(-.1u,0),(0,.-.05u),.75); forever: t := arctime (cas + mojkrok/2) of P; thdraw q randomized (u/45) rotated (angle(thdir(P,t)) + (normaldeviate*40)) shifted point t of P; cas := cas + mojkrok; exitif cas > dlzka - (2*mojkrok/3); % for rounding errors endfor; enddef; let l_wall_clay_AUT = l_wall_sand_AUT; def l_wall_debris_AUT (expr P) = T:=identity; pickup PenC; laenge := arclength P; path block; path old_block; cur := 0; t:= arctime cur of P; % draw first block old_block := (((-.0u,-.0u)--(.25u,-.15u)--(.45u,0.01u)--(.2u,.25u)--(.05u,.15u)--cycle)); block_width := (xpart urcorner old_block - xpart ulcorner old_block); old_block:=old_block rotated angle(thdir(P,0)) shifted point t of P; thclean old_block; thdraw old_block; cur := cur + 0.9*block_width; t:= arctime cur of P; % proceed with path forever: % generate random block block := punked (((-.25u,-.25u)--(0.25.u,-.25u)--(0.50u,0.01u)--(0.25u,.25u)--(-.25u,.25u)--cycle) randomized (u/4)) scaled (uniformdeviate(0.3)+.4) rotated uniformdeviate(360); % check width of block block_width := (xpart urcorner block - xpart ulcorner block); exitif cur > (laenge- 2.5*block_width/2); % find next position where the block fits in without intersecting the previous one forever: exitif xpart ( (block rotated angle(-direction t of P) shifted point t of P) intersectiontimes old_block) < 0; cur:=cur+0.01u; t:= arctime cur of P; exitif cur > (laenge- 2.5*block_width/2); endfor; exitif cur > (laenge- 2.5*block_width/2); old_block:= block rotated angle(-direction t of P) shifted point t of P; thclean old_block; thdraw old_block; cur := cur + block_width/2; t:= arctime cur of P; endfor; t:= arctime laenge-eps of P; % generate last block block := (((-.0u,-.0u)--(.25u,-.15u)--(.45u,0.01u)--(.2u,.25u)--(.1u,.15u)--cycle)); block_width := (xpart urcorner block - xpart ulcorner block); % scale last block to fit in the remaining gap scale_factor:=1.5*(laenge-cur)/block_width; forever: exitif scale_factor < 0; % bruces stab at preventing endless loop at large scales exitif xpart ( (block rotated angle(-direction t of P) scaled scale_factor shifted (point t of P)) intersectiontimes old_block) < 0; scale_factor:=scale_factor-0.01; endfor; if scale_factor > 0: thclean block rotated angle(-direction t of P) scaled scale_factor shifted (point t of P); thdraw block rotated angle(-direction t of P) scaled scale_factor shifted (point t of P); fi; enddef; def l_wall_blocks_AUT (expr P) = T:=identity; pickup PenC; laenge := arclength P; path block; path old_block; cur := 0; t:= arctime cur of P; % draw first block old_block := ( (.7u,-.35u)--(.85u,0.01u)--(.4u,.5u)--(.1u,.3u)--(-.0u,-.0u) ); block_width := (xpart urcorner old_block - xpart ulcorner old_block); old_block:=old_block rotated angle( thdir(P,0) ) shifted point t of P; thclean (old_block--cycle); thdraw old_block; cur := cur + block_width/2; t:= arctime cur of P; forever: % generate random block block := punked ( ( (.8u,-.35u)--(.85u,0.01u)--(.6u,.4u)--(.1u,.1u)--(-.0u,-.3u) ) randomized (0.3u) ) scaled (uniformdeviate(0.3)+.65) rotated (uniformdeviate(45)-15); % check width of block block_width := (xpart urcorner block - xpart ulcorner block); exitif cur > (laenge- 3.5*block_width/2); % find next position where the block fits in without intersecting the previous one forever: exitif xpart ( ((block--cycle) rotated angle(direction t of P) shifted point t of P) intersectiontimes old_block) < 0; cur:=cur+0.01u; t:= arctime cur of P; exitif cur > (laenge- 3.5*block_width/2); endfor; exitif cur > (laenge- 3.5*block_width/2); old_block:= block rotated angle(direction t of P) shifted point t of P; thclean (old_block--cycle); thdraw old_block; cur := cur + block_width/2; t:= arctime cur of P; endfor; % generate last block t:= arctime laenge-eps of P; block := (( (-.15u,-.35u)--(.0u,.0u)--(-.45u,.5u)--(-.75u,.3u)--(-.85u,-.0u)) ); block_width := (xpart urcorner block - xpart ulcorner block); % scale last block to fit in the remaining gap scale_factor:=(laenge-cur)/block_width; forever: exitif scale_factor < 0; exitif xpart ( ( (block) rotated angle (direction t of P) scaled scale_factor shifted (point t of P) ) intersectiontimes old_block) < 0; scale_factor:=scale_factor-0.001; endfor; if scale_factor > 0: thclean (block--cycle) rotated angle (direction t of P) scaled scale_factor shifted (point t of P); thdraw (block) rotated angle (direction t of P) scaled scale_factor shifted (point t of P); fi; enddef; def l_wall_ice_AUT (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, .6u); pickup PenC; p := (-.15u,0)--(.15u,0); q := p rotated 90 shifted (.25u,.0u); picture symbol,test_symbol; symbol:= image ( thdraw p; thdraw q; ); path bound,old_bound,test_bound; begingroup; interim bboxmargin:=0; bound := bbox (symbol); endgroup; t := arctime (cas + mojkrok/2) of P; thdraw symbol rotated angle(thdir(P,t)) shifted (point t of P + .25u * unitvector(thdir(P,t) rotated -90)); old_bound:=bound rotated angle(thdir(P,t)) shifted (point t of P + .25u * unitvector(thdir(P,t) rotated -90)); forever: t := arctime (cas + mojkrok/2) of P; test_bound:= bound rotated angle(thdir(P,t)) shifted (point t of P + .25u * unitvector(thdir(P,t) rotated -90)); if xpart ((old_bound) intersectiontimes (test_bound))<0: if xpart (P intersectiontimes (test_bound))<0: thdraw symbol rotated angle(thdir(P,t)) shifted (point t of P + .25u * unitvector(thdir(P,t) rotated -90)); old_bound:=bound rotated angle(thdir(P,t)) shifted (point t of P + .25u * unitvector(thdir(P,t) rotated -90)); fi; fi; cas := cas + mojkrok; exitif cas > dlzka - (2*mojkrok/3); % for rounding errors endfor; thdraw P; enddef; def l_wall_underlying_AUT (expr P) = T:=identity; pickup PenA; laenge:= arclength P; t1 := arctime (0.5u) of P; t2 := arctime (laenge-.5u) of P; thdraw (subpath (t1,t2) of P) dashed evenly scaled optical_zoom; enddef; def l_wall_overlying_AUT (expr P) = T:=identity; laenge:= arclength P; t1 := arctime (0.25u) of P; t2 := arctime (laenge-.25u) of P; t3 :=arctime (laenge) of P; pickup pensquare scaled (3.5*u/10); thdraw (subpath (t1,t2) of P) withcolor background; pickup PenA; thdraw subpath(0,t1) of P; thdraw subpath(t2,t3) of P; thdraw (subpath (t1,t2) of P) dashed dashpattern(on 2bp off 2bp on .5bp off 2bp on 2bp) scaled optical_zoom; enddef; def l_wall_moonmilk_AUT (expr P) = T:=identity; laenge:= arclength P; symsize:=adjust_step(laenge,0.8u); circle_width:=symsize/2; cur:=(symsize-circle_width)/2; pickup PenC; forever: t1 := arctime (cur) of P; t2 := arctime (cur + circle_width) of P; thdraw (point t1 of P){dir (angle(thdir(P,t1)) + 90)} .. {dir (angle(thdir(P,t2)) - 90)}(point t2 of P); cur := cur + symsize; exitif cur > laenge + (symsize / 3); % for rounding errors endfor; pickup PenA; thdraw P; enddef; def l_wall_flowstone_AUT (expr P) = T:=identity; laenge:= arclength P; symsize:=adjust_step(laenge,0.8u); circle_width:=symsize/2; cur:=(symsize-circle_width)/2; pickup PenC; forever: t1 := arctime (cur) of P; t2 := arctime (cur + circle_width) of P; thdraw (point t1 of P){dir (angle(thdir(P,t1)) + 90)} .. {dir (angle(thdir(P,t2)) - 90)}(point t2 of P); thfill (point t1 of P){dir (angle(thdir(P,t1)) + 90)} .. {dir (angle(thdir(P,t2)) - 90)}(point t2 of P) -- (point t1 of P)--cycle; cur := cur + symsize; exitif cur > laenge + (symsize / 3); % for rounding errors endfor; pickup PenA; thdraw P; enddef; def l_pit_AUT (expr P) = T:=identity; laenge:= arclength P; symsize:=adjust_step(laenge,0.5u); triangle_width:=symsize/2; cur:=(symsize-triangle_width)/2; pickup PenC; forever: t1 := arctime (cur) of P; t := arctime (cur + triangle_width/2) of P; t2 := arctime (cur + triangle_width) of P; if ATTR__height >= 10: thfill (subpath (t1,t2) of P) -- ((point t of P) + symsize/2 * unitvector(thdir(P,t) rotated 90)) -- cycle; else: thclean (subpath (t1,t2) of P) -- ((point t of P) + symsize/2 * unitvector(thdir(P,t) rotated 90)) -- cycle; thdraw (point t2 of P) --((point t of P) + symsize/2 * unitvector(thdir(P,t) rotated 90)) -- (point t1 of P); fi; cur := cur + symsize; exitif cur > laenge - (1*symsize/3); % for rounding errors t1:=arctime (cur) of P; endfor; thdraw P; enddef; let l_overhang_AUT = l_pit_AUT; let l_floorstep_AUT = l_floorstep_UIS; let l_contour_AUT =l_contour_SKBB; def l_flowstone_AUT (expr P) = T:=identity; pickup PenC; thdraw P dashed evenly scaled optical_zoom; enddef; def l_survey_cave_AUT (expr P) = T:=identity; pair zz[]; pickup PenD; thdraw P; enddef; %% points def p_stalactite_AUT(expr pos,theta,sc,al) = pickup PenC; if ATTR__elevation: U:=(.15u, .4u); T:=identity aligned al rotated theta scaled sc shifted pos; thdraw (0,-.4u) -- (0,.15u) -- (-.15u,.4u); thdraw (0,.15u) -- (.15u,.4u); else: U:=(.175u, .175u); T:=identity aligned al rotated theta scaled sc shifted pos; thclean fullcircle scaled 0.35u; thdraw fullcircle scaled 0.35u; fi; enddef; let p_icestalactite_AUT = p_stalactite_AUT; def p_stalagmite_AUT(expr pos,theta,sc,al) = pickup PenC; if ATTR__elevation: U:=(.15u,.4u); T:=identity aligned al rotated theta scaled sc shifted pos; thdraw (0,.4u) -- (0,-.15u) -- (-.15u,-.4u); thdraw (0,-.15u) -- (.15u,-.4u); else: U:=(.15u,.15u); T:=identity aligned al rotated theta scaled sc shifted pos; thfill fullcircle scaled 0.3u; fi; enddef; let p_icestalagmite_AUT = p_stalagmite_AUT; def p_pillar_AUT(expr pos,theta,sc,al) = pickup PenC; if ATTR__elevation: U:=(.15u,.4u); T:=identity aligned al rotated theta scaled sc shifted pos; thdraw (0,.15u)--(0,-.15u); thdraw (-.15u,-.4u)--(0,-.15u)--(.15u,-.4u); thdraw (-.15u,.4u)--(0,.15u)--(.15u,.4u); else: U:=(.225u,.225u); T:=identity aligned al rotated theta scaled sc shifted pos; thclean fullcircle scaled 0.45u; thdraw fullcircle scaled 0.45u; thfill fullcircle scaled 0.3u; fi; enddef; let p_icepillar_AUT = p_pillar_AUT; def p_crystal_AUT (expr pos,theta,sc,al)= U:=(.35u,.35u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p := ((-.35*u,0)--(.35*u,0)); thdraw p; thdraw p rotated (45); thdraw p rotated (90); thdraw p rotated (135); thdrawoptions(); enddef; def p_spring_AUT (expr pos,theta,sc,al)= U:=(.3u,.2u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.3u,.1u)..(0,-.1u)..(.3u,.1u); enddef; def p_sink_AUT (expr pos,theta,sc,al)= U:=(.3u,.2u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (-.3u,-.1u)..(0,.1u)..(.3u,-.1u); enddef; def p_breakdownchoke_AUT (expr pos,theta,sc,al)= U:=(.4u,.4u); T:=identity rotated -theta aligned al rotated theta scaled sc shifted pos; pickup PenC; thclean (-.4u,-.4u)--(.4u,-.4u)--(.4u,.4u)--(-.4u,.4u)--cycle; thdraw (-.4u,-.4u)--(.4u,-.4u)--(.4u,.4u)--(-.4u,.4u)--cycle; thdraw (-.21u,.305u)--(.0u,-.305u)--(.21u,.305u); enddef; def p_sand_AUT (expr pos,theta,sc,al)= U:=(.2u,.2u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p:= origin -- (0.01u,0.01u); for i=-0.1u step 0.2u until .15u: for j=-0.1u step 0.2u until .15u: thdraw p rotated uniformdeviate(360) shifted ((i,j) randomized 0.09u); endfor; endfor; thdrawoptions(); enddef; let p_clay_AUT = p_sand_AUT; def p_pebbles_AUT (expr pos,theta,sc,al)= U:=(.4u,.4u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; path qq; for i=-0.15u step 0.3u until .2u: for j=-0.15u step 0.3u until .2u: qq := (superellipse((.1u,0),(0,.05u),(-.1u,0),(0,.-.05u),.75)) randomized (u/45) scaled (uniformdeviate(0.4)+.55) rotated uniformdeviate(360) shifted ((i,j) randomized 0.15u); thdraw qq; endfor; endfor; enddef; def p_debris_AUT (expr pos,theta,sc,al)= U:=(.5u,.5u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; path block,q; block := ((-.15u,-.15u)--(.15u,-.15u)--(.3u,0.01u)--(.15u,.15u)--(-.15u,.15u)--cycle) ; q:= (punked (block randomized (0.15u))) rotated uniformdeviate(360) scaled (uniformdeviate(0.3)+0.3) shifted (0.0u,0.15u); thclean q; thdraw q; q:= (punked (block randomized (0.15u))) rotated uniformdeviate(360) scaled (uniformdeviate(0.5)+0.7) shifted (-0.15u,-0.15u); thclean q; thdraw q; q:= (punked (block randomized (0.15u))) rotated uniformdeviate(360) shifted (0.15u,-0.15u); thclean q; thdraw q; enddef; def p_blocks_AUT (expr pos,theta,sc,al)= U:=(u,u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; path block,q; block := ((-.25u,-.25u)--(.25u,-.25u)--(.5u,0.01u)--(.25u,.25u)--(-.25u,.25u)--cycle) ; q:= (punked (block randomized (0.3u))) rotated uniformdeviate(360) scaled (uniformdeviate(0.3)+0.3) shifted (0.0u,0.25u); thclean q; thdraw q; q:= (punked (block randomized (0.3u))) rotated uniformdeviate(360) scaled (uniformdeviate(0.5)+0.7) shifted (-0.25u,-0.25u); thclean q; thdraw q; q:= (punked (block randomized (0.3u))) rotated uniformdeviate(360) shifted (0.25u,-0.25u); thclean q; thdraw q; enddef; def p_water_AUT (expr pos,theta,sc,al)= U:=(.425u,.3u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenD; p:=fullcircle xscaled (.85u) yscaled (.6u); thfill p withcolor col_water_bg; thfill p withpattern pattern_water_AUT; thdraw p; enddef; def p_ice_AUT (expr pos,theta,sc,al)= U:=(.6u,.4u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p:=(-.15u,.0u) -- (0.15u,.0u); thdraw p rotated 90; thdraw p shifted (0.45u,.0u); thdraw p shifted (-0.45u,.0u); thdraw p rotated 90 shifted (-0.45u,0.25u); thdraw p shifted (0u,0.25u); thdraw p rotated 90 shifted (0.45u,.25u); enddef; def p_entrance_AUT (expr pos,theta,sc,al)= U:=(.3u,.75u); T:=identity aligned al rotated theta scaled sc shifted pos; path slice; for i= -0.5 step 0.01 until 0.5: slice:= (-.3u*(0.5-i),1.5*i*u)--(0,.75u)--(.3u*(0.5-i),1.5i*u)--cycle; thfill slice withcolor (min(0.95,0.5-1.75i),min(0.95,.5-1.75i),min(0.95,.5-1.75i)); endfor; thdraw ((-.3u,-0.75u)--(0,.75u)--(.3u,-0.75u)--cycle); enddef; def p_gradient_AUT (expr pos,theta,sc,al)= U:=(.15u,u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (0,-0.5u)--(0,0.5u); p:=(-.15u,.3u)--(0,0.7u)--(.15u,.3u)--cycle; thfill p; thdraw p; enddef; def p_airdraught_AUT (expr pos,theta,sc,al)= U:=(.2u,u); T:=identity aligned al rotated theta scaled 1 shifted pos; pickup PenC; thdraw (0,.5u)--(0,-0.8u); p:=(-.2u,.2u)--(0,.55u)--(.2u,.2u)--cycle; thfill p; for i:=1 upto round(3+2*mlog(sc)/mlog 2): thdraw (0,-(1-0.2i)*u)--(.2u,-(1-0.2(i-1))*u); thdraw (0,-(1-0.2i)*u)--(-.2u,-(1-0.2(i-1))*u); endfor; enddef; def p_station_temporary_AUT (expr pos)= T:=identity shifted pos; pickup PenD; thclean fullcircle scaled 0.15u; thdraw fullcircle scaled 0.15u; enddef; let p_station_painted_AUT = p_station_temporary_AUT ; let p_station_fixed_AUT = p_station_temporary_AUT ; def p_claychoke_AUT (expr pos,theta,sc,al)= U:=(.4u,.4u); T:=identity rotated -theta aligned al rotated theta scaled sc shifted pos; pickup PenC; thclean (-.4u,-.4u)--(.4u,-.4u)--(.4u,.4u)--(-.4u,.4u)--cycle; thdraw (-.4u,-.4u)--(.4u,-.4u)--(.4u,.4u)--(-.4u,.4u)--cycle; thdraw (-.15u,.3u)--(-.15u,-.25u)--(.15u,-.25u); enddef; def p_claytree_AUT (expr pos,theta,sc,al)= U:=(.55u,.6u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p:= (-.15u,.15u)--(.0u,.6u)--(.15u,.15u); thdraw p ; thdraw p shifted (-.4u,-.3u); thdraw p shifted (.4u,-.2u) ; enddef; %%%%% ENDINPUT uAUT %%%%% %%%%% INPUT thTrans %%%%% % default translations let p_station_fixed = p_station_fixed_ASF; let p_station_painted = p_station_painted_SKBB; let p_station_natural = p_station_natural_ASF; let p_station_temporary = p_station_temporary_ASF; let p_waterflow_paleo = p_waterflow_paleo_UIS; let p_waterflow_permanent = p_waterflow_permanent_UIS; let p_waterflow_intermittent = p_waterflow_intermittent_UIS; let p_stalactite = p_stalactite_UIS; let p_stalagmite = p_stalagmite_UIS; let p_pillar = p_pillar_UIS; let p_icestalactite = p_icestalactite_AUT; let p_icestalagmite = p_icestalagmite_AUT; let p_icepillar = p_icepillar_AUT; let p_curtain = p_curtain_UIS; let p_helictite = p_helictite_UIS; let p_sodastraw = p_sodastraw_UIS; let p_crystal = p_crystal_UIS; let p_flowstone = p_flowstone_UIS; let p_moonmilk = p_moonmilk_UIS; let p_wallcalcite = p_wallcalcite_UIS; let p_popcorn = p_popcorn_UIS; let p_disk = p_disk_UIS; let p_gypsum = p_gypsum_NSS; let p_aragonite = p_aragonite_NSS; let p_cavepearl = p_cavepearl_SKBB; let p_gypsumflower = p_gypsumflower_NSS; let p_rimstonepool = p_rimstonepool_ASF; let p_rimstonedam = p_rimstonedam_ASF; let p_anastomosis = p_anastomosis_UIS; let p_karren = p_karren_UIS; let p_scallop = p_scallop_UIS; let p_flute = p_flute_UIS; let p_raft = p_raft_NSS; let p_raftcone = p_raftcone_NSS; let p_spring = p_spring_SKBB; let p_sink = p_sink_SKBB; let p_narrowend = p_narrowend_UIS; let p_lowend = p_lowend_UIS; let p_flowstonechoke = p_flowstonechoke_NSS; let p_breakdownchoke = p_breakdownchoke_NSS; let p_claychoke = p_claychoke_AUT; let p_claytree = p_claytree_AUT; let p_bedrock = p_bedrock_ASF; let p_clay = p_clay_SKBB; let p_sand = p_sand_UIS; let p_pebbles = p_pebbles_UIS; let p_debris = p_debris_UIS; let p_blocks = p_blocks_UIS; let p_water = p_water_UIS; let p_ice = p_ice_UIS; let p_snow = p_snow_SKBB; let p_archeomaterial = p_archeomaterial_UIS; let p_paleomaterial = p_paleomaterial_UIS; let p_guano = p_guano_UIS; let p_vegetabledebris = p_vegetabledebris_ASF; let p_root = p_root_ASF; let p_entrance = p_entrance_UIS; let p_gradient = p_gradient_UIS; let p_rope = p_rope_SKBB; let p_fixedladder = p_fixedladder_SKBB; let p_ropeladder = p_ropeladder_SKBB; let p_steps = p_steps_SKBB; let p_bridge = p_bridge_SKBB; let p_traverse = p_traverse_SKBB; let p_anchor = p_anchor_SKBB; let p_camp = p_camp_SKBB; let p_dig = p_dig_UIS; let p_noequipment = p_noequipment_SKBB; let p_sectionarrow = p_sectionarrow_SKBB; let p_continuation = p_continuation_UIS; let p_airdraught = p_airdraught_UIS; let p_airdraught_winter = p_airdraught_winter_UIS; let p_airdraught_summer = p_airdraught_summer_UIS; let p_station = p_station_SKBB; let p_handrail = p_handrail_SKBB; let p_viaferrata = p_viaferrata_SKBB; let p_stalactites = p_stalactites_UIS; let p_stalagmites = p_stalagmites_UIS; let p_pillars = p_pillars_UIS; let l_wall_bedrock = l_wall_bedrock_UIS; let l_wall_sand = l_wall_sand_SKBB; let l_wall_clay = l_wall_clay_SKBB; let l_wall_pebbles = l_wall_pebbles_SKBB; let l_wall_debris = l_wall_debris_SKBB; let l_wall_blocks = l_wall_blocks_SKBB; let l_wall_ice = l_wall_ice_SKBB; let l_wall_underlying = l_wall_underlying_UIS; let l_wall_unsurveyed = l_wall_unsurveyed_SKBB; let l_wall_presumed = l_wall_presumed_UIS; %let l_wall_invisible = l_wall_invisible; let l_wall_pit = l_wall_pit_AUT; let l_wall_overlying = l_wall_overlying_AUT; let l_wall_flowstone = l_wall_flowstone_AUT; let l_wall_moonmilk = l_wall_moonmilk_AUT; let l_waterflow_permanent = l_waterflow_permanent_UIS; let l_waterflow_intermittent = l_waterflow_intermittent_SKBB; let l_waterflow_conjectural = l_waterflow_conjectural_SKBB; let l_border_visible = l_border_visible_SKBB; let l_border_temporary = l_border_temporary_SKBB; let l_border_presumed = l_border_presumed_SKBB; %let l_border_invisible = l_border_invisible; let l_floorstep = l_floorstep_UIS; let l_pit = l_pit_UIS; let l_ceilingstep = l_ceilingstep_SKBB; let l_chimney = l_chimney_UIS; let l_overhang = l_overhang_SKBB; let l_slope = l_slope_SKBB; let l_ceilingmeander = l_ceilingmeander_SKBB; let l_floormeander = l_floormeander_SKBB; let l_contour = l_contour_SKBB; let l_rockborder = l_rockborder_UIS; let l_rockedge = l_rockedge_UIS; let l_flowstone = l_flowstone_UIS; let l_moonmilk = l_moonmilk_UIS; let l_section = l_section_SKBB; let l_survey_cave = l_survey_cave_SKBB; let l_survey_surface = l_survey_surface_SKBB; let l_arrow = l_arrow_SKBB; let l_gradient = l_gradient_UIS; let l_mapconnection = l_mapconnection_SKBB; let l_handrail = l_handrail_SKBB; let l_steps = l_steps_SKBB; let l_fixedladder = l_fixedladder_SKBB; let l_ropeladder = l_ropeladder_SKBB; let l_rope = l_rope_SKBB; let l_viaferrata = l_viaferrata_SKBB; let a_water = a_water_UIS; let a_sump = a_sump_UIS; let a_sand = a_sand_UIS; let a_debris = a_debris_SKBB; let a_blocks = a_blocks_SKBB; let a_snow = a_snow_SKBB; let a_ice = a_ice_SKBB; let a_pebbles = a_pebbles_SKBB; let a_clay = a_clay_SKBB; let a_bedrock = a_bedrock_SKBB; let a_flowstone = a_flowstone_ASF; let a_moonmilk = a_moonmilk_SKBB; let a_dimensions = a_dimensions_SKBB; let s_northarrow = s_northarrow_SKBB; let s_scalebar = s_scalebar_SKBB; let s_hgrid = s_hgrid_SM; let s_vgrid = s_vgrid_SM; %%%%% ENDINPUT thTrans %%%%% nonstopmode; initsymbol("s_hgrid_SM"); initsymbol("s_northarrow_SKBB"); initsymbol("s_scalebar_SKBB"); initsymbol("s_scalebar_SM"); initsymbol("s_vgrid_SM"); initsymbol("p_airdraught_AUT"); initsymbol("p_airdraught_UIS"); initsymbol("p_airdraught_summer_UIS"); initsymbol("p_airdraught_winter_UIS"); initsymbol("p_anastomosis_UIS"); initsymbol("p_anchor_SKBB"); initsymbol("p_aragonite_NSS"); initsymbol("p_archeomaterial_UIS"); initsymbol("p_bedrock_ASF"); initsymbol("p_blocks_AUT"); initsymbol("p_blocks_UIS"); initsymbol("p_breakdownchoke_AUT"); initsymbol("p_breakdownchoke_NSS"); initsymbol("p_bridge_SKBB"); initsymbol("p_camp_SKBB"); initsymbol("p_cavepearl_SKBB"); initsymbol("p_clay_AUT"); initsymbol("p_clay_SKBB"); initsymbol("p_claychoke_AUT"); initsymbol("p_claytree_AUT"); initsymbol("p_continuation_UIS"); initsymbol("p_crystal_AUT"); initsymbol("p_crystal_UIS"); initsymbol("p_curtain_UIS"); initsymbol("p_debris_AUT"); initsymbol("p_debris_UIS"); initsymbol("p_dig_UIS"); initsymbol("p_disk_UIS"); initsymbol("p_entrance_AUT"); initsymbol("p_entrance_UIS"); initsymbol("p_fixedladder_SKBB"); initsymbol("p_flowstone_UIS"); initsymbol("p_flowstonechoke_NSS"); initsymbol("p_flute_UIS"); initsymbol("p_gradient_AUT"); initsymbol("p_gradient_BCRA"); initsymbol("p_gradient_NSS"); initsymbol("p_gradient_SKBB"); initsymbol("p_gradient_UIS"); initsymbol("p_guano_UIS"); initsymbol("p_gypsum_NSS"); initsymbol("p_gypsumflower_NSS"); initsymbol("p_handrail_SKBB"); initsymbol("p_helictite_UIS"); initsymbol("p_ice_AUT"); initsymbol("p_ice_UIS"); initsymbol("p_icepillar_AUT"); initsymbol("p_icestalactite_AUT"); initsymbol("p_icestalagmite_AUT"); initsymbol("p_karren_UIS"); initsymbol("p_lowend_NSS"); initsymbol("p_lowend_UIS"); initsymbol("p_moonmilk_UIS"); initsymbol("p_narrowend_UIS"); initsymbol("p_noequipment_SKBB"); initsymbol("p_paleomaterial_UIS"); initsymbol("p_pebbles_AUT"); initsymbol("p_pebbles_UIS"); initsymbol("p_pillar_AUT"); initsymbol("p_pillar_UIS"); initsymbol("p_pillars_UIS"); initsymbol("p_popcorn_UIS"); initsymbol("p_raft_NSS"); initsymbol("p_raftcone_NSS"); initsymbol("p_rimstonedam_ASF"); initsymbol("p_rimstonepool_ASF"); initsymbol("p_root_ASF"); initsymbol("p_rope_SKBB"); initsymbol("p_ropeladder_SKBB"); initsymbol("p_sand_AUT"); initsymbol("p_sand_UIS"); initsymbol("p_scallop_UIS"); initsymbol("p_sink_AUT"); initsymbol("p_sink_SKBB"); initsymbol("p_snow_SKBB"); initsymbol("p_sodastraw_UIS"); initsymbol("p_spring_AUT"); initsymbol("p_spring_SKBB"); initsymbol("p_stalactite_AUT"); initsymbol("p_stalactite_UIS"); initsymbol("p_stalactites_UIS"); initsymbol("p_stalagmite_AUT"); initsymbol("p_stalagmite_UIS"); initsymbol("p_stalagmites_UIS"); initsymbol("p_station_SKBB"); initsymbol("p_station_fixed_ASF"); initsymbol("p_station_fixed_AUT"); initsymbol("p_station_natural_ASF"); initsymbol("p_station_painted_AUT"); initsymbol("p_station_painted_SKBB"); initsymbol("p_station_temporary_ASF"); initsymbol("p_station_temporary_AUT"); initsymbol("p_station_temporary_SKBB"); initsymbol("p_steps_SKBB"); initsymbol("p_traverse_SKBB"); initsymbol("p_vegetabledebris_ASF"); initsymbol("p_viaferrata_SKBB"); initsymbol("p_wallcalcite_UIS"); initsymbol("p_water_AUT"); initsymbol("p_water_UIS"); initsymbol("p_waterflow_intermittent_UIS"); initsymbol("p_waterflow_paleo_UIS"); initsymbol("p_waterflow_permanent_UIS"); initsymbol("l_arrow_SKBB"); initsymbol("l_border_presumed_SKBB"); initsymbol("l_border_temporary_SKBB"); initsymbol("l_border_visible_SKBB"); initsymbol("l_ceilingmeander_NZSS"); initsymbol("l_ceilingmeander_SKBB"); initsymbol("l_ceilingmeander_UIS"); initsymbol("l_ceilingstep_NZSS"); initsymbol("l_ceilingstep_SKBB"); initsymbol("l_ceilingstep_UIS"); initsymbol("l_chimney_NZSS"); initsymbol("l_chimney_UIS"); initsymbol("l_contour_AUT"); initsymbol("l_contour_SKBB"); initsymbol("l_contour_UIS"); initsymbol("l_fixedladder_SKBB"); initsymbol("l_floormeander_SKBB"); initsymbol("l_floorstep_AUT"); initsymbol("l_floorstep_UIS"); initsymbol("l_flowstone_AUT"); initsymbol("l_flowstone_UIS"); initsymbol("l_gradient_BCRA"); initsymbol("l_gradient_UIS"); initsymbol("l_handrail_SKBB"); initsymbol("l_mapconnection_SKBB"); initsymbol("l_moonmilk_UIS"); initsymbol("l_overhang_AUT"); initsymbol("l_overhang_SKBB"); initsymbol("l_pit_AUT"); initsymbol("l_pit_UIS"); initsymbol("l_rockborder_UIS"); initsymbol("l_rockedge_UIS"); initsymbol("l_rope_SKBB"); initsymbol("l_ropeladder_SKBB"); initsymbol("l_section_SKBB"); initsymbol("l_slope_BCRA"); initsymbol("l_slope_SKBB"); initsymbol("l_steps_SKBB"); initsymbol("l_survey_cave_AUT"); initsymbol("l_survey_cave_SKBB"); initsymbol("l_survey_cave_UIS"); initsymbol("l_survey_surface_SKBB"); initsymbol("l_viaferrata_SKBB"); initsymbol("l_wall_bedrock_UIS"); initsymbol("l_wall_blocks_AUT"); initsymbol("l_wall_blocks_SKBB"); initsymbol("l_wall_clay_AUT"); initsymbol("l_wall_clay_SKBB"); initsymbol("l_wall_debris_AUT"); initsymbol("l_wall_debris_SKBB"); initsymbol("l_wall_flowstone_AUT"); initsymbol("l_wall_ice_AUT"); initsymbol("l_wall_ice_SKBB"); initsymbol("l_wall_moonmilk_AUT"); initsymbol("l_wall_overlying_AUT"); initsymbol("l_wall_pebbles_AUT"); initsymbol("l_wall_pebbles_SKBB"); initsymbol("l_wall_pit_AUT"); initsymbol("l_wall_presumed_NZSS"); initsymbol("l_wall_presumed_UIS"); initsymbol("l_wall_sand_AUT"); initsymbol("l_wall_sand_SKBB"); initsymbol("l_wall_underlying_AUT"); initsymbol("l_wall_underlying_UIS"); initsymbol("l_wall_unsurveyed_SKBB"); initsymbol("l_waterflow_conjectural_SKBB"); initsymbol("l_waterflow_intermittent_SKBB"); initsymbol("l_waterflow_permanent_UIS"); initsymbol("a_bedrock_SKBB"); initsymbol("a_blocks_AUT"); initsymbol("a_blocks_SKBB"); initsymbol("a_clay_AUT"); initsymbol("a_clay_SKBB"); initsymbol("a_debris_AUT"); initsymbol("a_debris_SKBB"); initsymbol("a_debris_UIS"); initsymbol("a_dimensions_SKBB"); initsymbol("a_flowstone_ASF"); initsymbol("a_ice_AUT"); initsymbol("a_ice_SKBB"); initsymbol("a_moonmilk_SKBB"); initsymbol("a_pebbles_AUT"); initsymbol("a_pebbles_SKBB"); initsymbol("a_sand_AUT"); initsymbol("a_sand_UIS"); initsymbol("a_snow_AUT"); initsymbol("a_snow_SKBB"); initsymbol("a_sump_AUT"); initsymbol("a_sump_SKBB"); initsymbol("a_sump_UIS"); initsymbol("a_water_AUT"); initsymbol("a_water_SKBB"); initsymbol("a_water_UIS"); lang:="en_UK"; ATTR__elevation:=false; % user defined symbols defaults % end of user defined symbols defaultfont:="cmss10"; fonts_setup(6,8,10,12,16); def l_survey_cave (expr p) = pickup PenC; draw p withcolor 0.5green; enddef; def p_entrance (expr pos,theta,sc,al)= U:=(.2u,.5u); T:=identity aligned al rotated theta scaled sc shifted pos; path p; p = (-.3u,-.25u) -- (-.2u,-.25u){dir 135} .. (0u, .25u) .. {dir 225}(.2u,-.25u) -- (.3u,-.25u); thdraw p withpen PenA; thdraw unitsquare scaled u shifted (-0.5u,-0.5u) rotated 45 withpen PenD; enddef; def p_u_boss (expr pos,theta,sc,al)= T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenD; p := (0.08u,0.25u)..(0,0.29u)..(-0.08u,0.25u); q := (0.16u,0.5u)..(0u,0.58u)..(-0.16u,0.5u); for i=0 upto 9: thdraw p rotated 36i; thdraw q rotated 36i; endfor p := fullcircle scaled 0.15u; thdraw p; enddef; def p_u_block(expr pos,theta,sc,al) = U:=(.5u,.5u); T:=identity aligned al rotated theta scaled sc shifted pos; path p q; p := (2.3u,0.9u)--(0.65u,1u)--(-0.9u,0.6u)--(-2.15u,-0.1u)--(-2.35u,-0.25u)--(-2.5u,-0.5u)--(-2u,-0.65u)--(-0.75u,-0.65u)--(0.6u,-0.7u)--(1.1u,-0.5u)--(2.1u,-0.15u)--cycle; pickup PenB; thdraw p; if known colour_block_bg: thfill p withcolor colour_block_bg; else: thfill p withcolor (0.75,0.75,0.75); fi; q := (-2.5u,-0.5u)--(-2u,-0.65u)--(-0.75u,-0.65u)--(0.6u,-0.7u)--(1.1u,-0.5u)--(2.1u,-0.15u)--(2.3u,0.9u)--(2.5u,0.7u)--(2.5u,0.5u)--(2.25u,-0.9u)--(1.1u,-1.3u)--(0.5u,-1.5u)--(-0.75u,-1.4u)--(-2u,-1.15u)--(-2.35u,-0.65u)--cycle; thdraw q; if known colour_block_side: thfill q withcolor colour_block_side; else: thfill q withcolor(0.6,0.6,0.6); fi; pickup PenD; path p; p := (-2u,-0.65u)--(-1.9u,-1u); thdraw p; path p; p := (0.6u,-0.7u)--(0.5u,-1.3u); thdraw p; path p; p := (2.1u,-0.15u)--(2.3u,-0.4u); thdraw p; enddef; def p_u_rblock (expr pos,theta,sc,al) = T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenB; path p; path q; p = (-1u,-1.6u)..(-0.8u,-1.8u){right}--(0.6u,-1.8u)..(0.8u,-1.6u){up}--(0.74u,1.8u)..(0.54u,2u){left}--(0.6u,2u)..(0.9u,1.6u){down}--(1u,-1.8u)..(0.8u,-2u){left}--(-0.8u,-2u)..(-1u,-1.8u){up}--cycle; q = (-1u,-1.6u)..(-0.8u,-1.8u){right}--(0.6u,-1.8u)..(0.8u,-1.6u){up}--(0.74u,1.8u)..(0.54u,2u){left}--(-0.54u,2u)..(-0.74u,1.8u){down}--cycle; thdraw p; thfill p withcolor(.6,.6,.6); thdraw q; thfill q withcolor(0.73, 0.71, 0.75); pickup PenD; path p; p = (-.8u,-1.6u)--(-0.1u,-1u)--(-0.1u,1.4u)--(-.6u,1.9u); thdraw p; path q; q = (.4u,1.9u)--(-0.1u,1.4u); thdraw q; path qq; qq = (0.6u,-1.6u)--(-0.1u,-1u); thdraw qq; enddef; def l_contour(expr P)(text txt) = T:=identity; pickup PenD; thdraw P withcolor (0.5, 0 ,0); for pnt=txt: if (pnt=-2) or (pnt=-1): mark_(P,arctime(arclength(P)/2) of P, 0.2u); elseif pnt>=0: mark_(P,pnt,0.2*u); fi; exitif pnt<0; endfor; enddef; def l_rockborder (expr P) = T:=identity; pickup PenC; if cycle P: thfill P withcolor (0.73, 0.71, 0.75) fi; thdraw P; enddef; def a_u_green(expr p) = T:=identity; thfill p withcolor(0.75,1,0); enddef; def a_u_brown(expr p) = T:=identity; thfill p withcolor(0.94,0.77,0.22); enddef; def a_u_pink (expr p) = T:=identity; thfill p withcolor (1, 0.85, 0.83); enddef; def a_u_dgrey (expr p) = T:=identity; thfill p withcolor (0.60, 0.60, 0.60); enddef; def a_u_mgrey (expr p) = T:=identity; thfill p withcolor (0.73, 0.71, 0.75); enddef; def a_u_lgrey (expr p) = T:=identity; thfill p withcolor (.9, .9, .9); enddef; def a_u_lpink (expr p) = T:=identity; thfill p withcolor (1, 0.94, 0.94); enddef; def a_u_black (expr p) = T:=identity; thfill p withcolor (0.1, 0.05, 0.05); enddef; def l_u_fungi (expr P) = T:=identity; pickup PenC; if cycle P: thfill P withcolor (1, 0.98, 0.95) fi; thdraw P; enddef; def a_u_sandpebbles (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.5u until xpart urcorner q: for j = ypart llcorner q step 1.5u 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.8u); if xpart (p intersectiontimes qq) < 0: thdraw qq; thfill qq withcolor(1, 0.85, 0.83); fi; endfor; endfor; ); clip tmp_pic to p; draw tmp_pic; enddef; def p_u_sandpebbles (expr pos,theta,sc,al)= U:=(.45u,.35u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p:=superellipse((.2u,0),(0,.1u),(-.2u,0),(0,.-.1u),.75); thdraw p rotated 20 shifted (0,.25u); thfill p rotated 20 shifted (0,.25u) withcolor(1, 0.85, 0.83); thdraw p rotated -37 shifted (.25u,-.25u); thfill p rotated -37 shifted (.25u,-.25u) withcolor(1, 0.85, 0.83); thdraw p rotated -62 shifted (-.25u,-.25u); thfill p rotated -62 shifted (-.25u,-.25u) withcolor(1, 0.85, 0.83); enddef; def a_blocks_SKBB_ (expr p,o,s_beg,s_end,d_beg,d_end) = T:=identity; orient = 90-o; pickup PenC; path q[], qq; q1 = bbox p; draw q1; draw p; q2 = llcorner q1 .. lrcorner q1 .. urcorner q1 .. ulcorner q1 .. cycle; draw q2; pair zz[]; radius := .5*length(llcorner q1 - urcorner q1); zz1 := .5[llcorner q1,urcorner q1]; zz2 := zz1 - dir(orient)*radius; zz3 = zz1 rotatedaround (zz2,90); draw zz1 withpen pencircle scaled 2mm; draw zz2 withpen pencircle scaled 2mm; draw zz3 withpen pencircle scaled 2mm; picture tmp_pic; tmp_pic := image( j := 0; forever: i := 0; forever: qq := punked (((-.5,-.5)--(.5,-.5)--(.5,.5)--(-.5,.5)--cycle) scaled (0.7(5u-(j/(2*radius))[u*s_beg,u*s_end])) randomized (u/2)) rotated uniformdeviate(360) shifted (((zz3 + (i,j)) rotatedaround (zz3,-o)) randomized 1.6u); draw ((zz3 + (i,j)) rotatedaround (zz3,-o)) withpen pencircle scaled 1mm withcolor red; if xpart (p intersectiontimes qq) < 0: thclean qq; thdraw qq; thfill qq withcolor(brown); fi; i := i + (j/(2*radius))[u*d_beg,u*d_end]; exitif i > 2*radius; endfor; j := j + (j/(2*radius))[u*d_beg,u*d_end]; exitif j > 2*radius; endfor; ); % clip tmp_pic to p; draw tmp_pic; enddef; def a_blocks (expr p) = if known block_spacing: distance:=block_spacing; else: distance:=4; fi; T:=identity; pickup PenC; path q, qq; q = bbox p; picture tmp_pic; uu := max(u, (xpart urcorner q - xpart llcorner q)/100, (ypart urcorner q - ypart llcorner q)/100); tmp_pic := image( for i = xpart llcorner q step distance*uu until xpart urcorner q: for j = ypart llcorner q step distance*uu until ypart urcorner q: qq := punked (((-.5uu,-.5uu)--(.5uu,-.5uu)--(.5uu,.5uu)--(-.5uu,.5uu)--cycle) randomized (uu/2)) rotated uniformdeviate(360) shifted ((i,j) randomized 1.0uu); if xpart (p intersectiontimes qq) < 0: thclean qq; thdraw qq; fi; endfor; endfor; ); clip tmp_pic to p; draw tmp_pic; enddef; def p_u_gradient (expr P,R,S,A)= tmplength:=0.3u; if known ATTR_length: if ATTR_length="big": tmplength:=.4u; elseif ATTR_length="small": tmplength:=0.2u; fi; fi; U:=(.2u,.6u); T:=identity aligned A rotated R scaled S shifted P; thfill (-.1u,-tmplength)--(0,tmplength)--(.1u,-tmplength)--cycle; enddef; def l_u_plankwalk (expr P) = T:=identity; pair zz[]; for t = 0 upto length P - 1: zz1 := point t of P; zz2 := point t+1 of P; zz3 := 0.5[zz1,zz2]; zz4 := 0.25[zz1,zz2]; zz5 := 0.75[zz1,zz2]; pickup PenA; thdraw zz1 -- zz2 withcolor(.67,.41,.28); %planks thdraw zz1 shifted (0,1.6u) .. zz4 shifted (0,1.2u) .. zz3 shifted (0,1.6u) .. zz5 shifted (0,1.3u) .. zz2 shifted (0,1.6u) withcolor(.67,.41,.28); pickup pencircle scaled 1pt; thdraw zz1 shifted (0,-1.2u) -- zz1 shifted (0,2u) withcolor(.67,.41,.28); %first post thdraw zz3 -- zz3 shifted (0,2u) withcolor(.67,.41,.28); %mid post endfor; thdraw zz2 shifted (0,-6u) -- zz2 shifted (0,2u) withcolor(.67,.41,.30); %last post enddef; def a_blocks (expr p) = T:=identity; pickup PenC; path q, qq; q = bbox p; picture tmp_pic; uu := max(u, (xpart urcorner q - xpart llcorner q)/100, (ypart urcorner q - ypart llcorner q)/100); tmp_pic := image( for i = xpart llcorner q step 2uu until xpart urcorner q: for j = ypart llcorner q step 2uu until ypart urcorner q: qq := punked (((-.5uu,-.5uu)--(.5uu,-.5uu)--(.5uu,.5uu)--(-.5uu,.5uu)--cycle) randomized (uu/2)) rotated uniformdeviate(360) shifted ((i,j) randomized 1.6uu); if xpart (p intersectiontimes qq) < 0: thclean qq; thdraw qq; thfill qq withcolor (.8,.8,.8); fi; endfor; endfor; ); clip tmp_pic to p; drawoptions(); draw tmp_pic; enddef; def l_u_joint (expr P) = T:=identity; laenge:= arclength P; t1 := arctime (0.25u) of P; t2 := arctime (laenge-.25u) of P; t3 :=arctime (laenge) of P; pickup pensquare scaled (3.5*u/10); thdraw (subpath (t1,t2) of P) withcolor background; pickup PenA; thdraw subpath(0,t1) of P; thdraw subpath(t2,t3) of P; thdraw (subpath (t1,t2) of P) dashed dashpattern(on 2bp off 2bp on .5bp off 2bp on 2bp) scaled optical_zoom; enddef; def l_u_path (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok := adjust_step(dlzka, 0.25u); pickup PenD; forever: t := arctime cas of P; thdraw ((point t of P) + 0.4 * u * unitvector(thdir(P,t) rotated 90)) -- ((point t of P) - 0.4 * u * unitvector(thdir(P,t) rotated 90) ); cas := cas + mojkrok; exitif cas > dlzka + (mojkrok/3); % for rounding errors endfor; pickup PenC; %thdraw P; %draw path withcolor (0.5, 0 ,0) enddef; initsymbol("l_u_path"); def l_u_bedrock (expr P) = pair Pp; pair Pd; pair Pv; T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, 0.8u); pickup PenC; forever: t := arctime (cas + mojkrok/2) of P; Pp := (point t of P); Pd := unitvector(thdir(P,t)); Pv := Pd rotated 90; thdraw (Pp - 0u * Pv) -- (Pp - 0.4u * Pv) withcolor blue; thdraw (Pp - 0.4u * Pv + 0.2u * Pd) -- (Pp - 0.4u * Pv - 0.2u * Pd) withcolor blue; cas := cas + mojkrok; exitif cas > dlzka - (2*mojkrok/3); % for rounding errors endfor; thdraw P; enddef; def l_u_cliff (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok := adjust_step(dlzka, 0.8u); pickup PenD; forever: t := arctime cas of P; thdraw ((point t of P) + 0.4 * u * unitvector(thdir(P,t) rotated 75)) -- ((point t of P) - 0.4 * u * unitvector(thdir(P,t) rotated 75) ); cas := cas + mojkrok; exitif cas > dlzka + (mojkrok/3); % for rounding errors endfor; pickup PenA; thdraw P; %draw path enddef; def a_u_river (expr p) = T:=identity; thclean p; thfill p withcolor (0.0, 1.0, 1.0); enddef; initsymbol("a_u_river"); fonts_setup(30,40,50,70,100); def PenXXL = pencircle scaled (2.4*u/10) enddef; vardef getdistance(expr A,B) = dx := xpart A - xpart B; dy := ypart A - ypart B; sqrt((dx,dy) dotprod (dx,dy)) enddef; def l_u_river (expr Path) = T:=identity; pickup PenXXL; draw Path withcolor (0.0, 1.0, 1.0); enddef; initsymbol("l_u_river"); def l_u_doline (expr P) = T:=identity; laenge:= arclength P; symsize:=adjust_step(laenge,2u); triangle_width:=symsize/10; cur:=(symsize-triangle_width)/2; pickup PenC; forever: t1 := arctime (cur) of P; t := arctime (cur + triangle_width/2) of P; t2 := arctime (cur + triangle_width) of P; thfill (subpath (t1,t2) of P) -- ((point t of P) + symsize/2 * unitvector(thdir(P,t) rotated 90)) -- cycle; thdraw (point t2 of P) --((point t of P) + symsize/2 * unitvector(thdir(P,t) rotated 90)) -- (point t1 of P) withcolor (0.5, 0, 0); cur := cur + symsize; exitif cur > laenge - (1*symsize/3); % for rounding errors t1:=arctime (cur) of P; endfor; enddef; def l_contour(expr P)(text txt) = T:=identity; pickup PenD; thdraw P withcolor (0.5, 0, 0); for pnt=txt: if pnt=-2: mark_(P,arctime(arclength(P)/2) of P, 0.2u); elseif pnt>=0: mark_(P,pnt,0.2*u); fi; exitif pnt<0; endfor; enddef; def p_u_mud (expr pos,theta,sc,al)= U:=(.45u,.1u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p := ((-.15*u,0)--(.15*u,0)); thdraw p shifted (.3u,-.1u); thdraw p shifted (-.3u,-.1u); thdraw p shifted (0,.1u); enddef; def l_u_mud (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, .5u); pickup PenC; q := (-0.15u,0){up}..{down}origin..{up}(0.15u,0); forever: t := arctime (cas + mojkrok/2) of P; thdraw q shifted (point t of P + .25u * unitvector(thdir(P,t) rotated -90)); cas := cas + mojkrok; exitif cas > dlzka - (2*mojkrok/3); % for rounding errors endfor; pickup PenA; thdraw P; enddef; def a_u_mud (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.5u until xpart urcorner q: for j = ypart llcorner q step 1.5u until ypart urcorner q: qq := ((-.25u,0){up}..origin{down}..{up}(0.25u,0)) randomized (u/15) shifted ((i,j) randomized 1.3u); if xpart (p intersectiontimes qq) < 0: thdraw qq; fi; endfor; endfor; ); clip tmp_pic to p; draw tmp_pic; enddef; def l_u_steps (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok := adjust_step(dlzka, 0.5u); pickup PenD; forever: t := arctime cas of P; thdraw ((point t of P) + 0.2 * u * unitvector(thdir(P,t) rotated 90)) -- ((point t of P) - 0.2 * u * unitvector(thdir(P,t) rotated 90) ); cas := cas + mojkrok; exitif cas > dlzka + (mojkrok/3); % for rounding errors endfor; pickup PenC; %thdraw P; enddef; def p_u_daylight (expr pos,theta,sc,al)= U:=(1u,1u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p := origin--(0,.25*u); q := ((0,.35u)--(0,0.25u)--(0.1u,0.25u)) rotatedaround ((0,0.25u),45); thdraw p withcolor (0.98, 0.87, 0.38); thdraw p rotated (60) withcolor (0.98, 0.87, 0.38); thdraw p rotated (120) withcolor (0.98, 0.87, 0.38); thdraw p rotated (180) withcolor (0.98, 0.87, 0.38); thdraw p rotated (240) withcolor (0.98, 0.87, 0.38); thdraw p rotated (300) withcolor (0.98, 0.87, 0.38); thdraw q withcolor (0.98, 0.87, 0.38); thdraw q rotated (60) withcolor (0.98, 0.87, 0.38); thdraw q rotated (120) withcolor (0.98, 0.87, 0.38); thdraw q rotated (180) withcolor (0.98, 0.87, 0.38); thdraw q rotated (240) withcolor (0.98, 0.87, 0.38); thdraw q rotated (300) withcolor (0.98, 0.87, 0.38); thclean fullcircle scaled 0.25u; thdraw fullcircle scaled 0.25u withcolor (0.98, 0.87, 0.38); enddef; initsymbol("l_u_steps"); initsymbol("p_u_mud"); initsymbol("l_u_mud"); initsymbol("a_u_mud"); initsymbol("l_u_contour"); initsymbol("l_u_doline"); initsymbol("p_u_daylight"); % BCRA symbol set. mapsymbol("a_bedrock","BCRA",false); mapsymbol("a_blocks","BCRA",false); mapsymbol("a_clay","BCRA",false); mapsymbol("a_debris","BCRA",false); mapsymbol("a_dimensions","BCRA",false); mapsymbol("a_flowstone","BCRA",false); mapsymbol("a_ice","BCRA",false); mapsymbol("a_moonmilk","BCRA",false); mapsymbol("a_pebbles","BCRA",false); mapsymbol("a_sand","BCRA",false); mapsymbol("a_snow","BCRA",false); mapsymbol("a_sump","BCRA",false); mapsymbol("a_u","BCRA",false); mapsymbol("a_water","BCRA",false); mapsymbol("l_arrow","BCRA",false); mapsymbol("l_border_invisible","BCRA",false); mapsymbol("l_border_presumed","BCRA",false); mapsymbol("l_border_temporary","BCRA",false); mapsymbol("l_border_visible","BCRA",false); mapsymbol("l_ceilingmeander","BCRA",false); mapsymbol("l_ceilingstep","BCRA",false); mapsymbol("l_chimney","BCRA",false); mapsymbol("l_contour","BCRA",false); mapsymbol("l_fixedladder","BCRA",false); mapsymbol("l_floormeander","BCRA",false); mapsymbol("l_floorstep","BCRA",false); mapsymbol("l_flowstone","BCRA",false); mapsymbol("l_gradient","BCRA",false); mapsymbol("l_handrail","BCRA",false); mapsymbol("l_mapconnection","BCRA",false); mapsymbol("l_moonmilk","BCRA",false); mapsymbol("l_overhang","BCRA",false); mapsymbol("l_pit","BCRA",false); mapsymbol("l_rockborder","BCRA",false); mapsymbol("l_rockedge","BCRA",false); mapsymbol("l_ropeladder","BCRA",false); mapsymbol("l_section","BCRA",false); mapsymbol("l_slope","BCRA",false); mapsymbol("l_steps","BCRA",false); mapsymbol("l_survey_cave","BCRA",false); mapsymbol("l_survey_surface","BCRA",false); mapsymbol("l_u","BCRA",false); mapsymbol("l_viaferrata","BCRA",false); mapsymbol("l_wall_bedrock","BCRA",false); mapsymbol("l_wall_blocks","BCRA",false); mapsymbol("l_wall_clay","BCRA",false); mapsymbol("l_wall_debris","BCRA",false); mapsymbol("l_wall_flowstone","BCRA",false); mapsymbol("l_wall_ice","BCRA",false); mapsymbol("l_wall_invisible","BCRA",false); mapsymbol("l_wall_moonmilk","BCRA",false); mapsymbol("l_wall_overlying","BCRA",false); mapsymbol("l_wall_pebbles","BCRA",false); mapsymbol("l_wall_pit","BCRA",false); mapsymbol("l_wall_presumed","BCRA",false); mapsymbol("l_wall_sand","BCRA",false); mapsymbol("l_wall_underlying","BCRA",false); mapsymbol("l_wall_unsurveyed","BCRA",false); mapsymbol("l_waterflow_conjectural","BCRA",false); mapsymbol("l_waterflow_intermittent","BCRA",false); mapsymbol("l_waterflow_permanent","BCRA",false); mapsymbol("p_airdraught","BCRA",false); mapsymbol("p_airdraught_summer","BCRA",false); mapsymbol("p_airdraught_winter","BCRA",false); mapsymbol("p_anastomosis","BCRA",false); mapsymbol("p_anchor","BCRA",false); mapsymbol("p_aragonite","BCRA",false); mapsymbol("p_archeomaterial","BCRA",false); mapsymbol("p_bedrock","BCRA",false); mapsymbol("p_blocks","BCRA",false); mapsymbol("p_breakdownchoke","BCRA",false); mapsymbol("p_bridge","BCRA",false); mapsymbol("p_camp","BCRA",false); mapsymbol("p_cavepearl","BCRA",false); mapsymbol("p_clay","BCRA",false); mapsymbol("p_claychoke","BCRA",false); mapsymbol("p_claytree","BCRA",false); mapsymbol("p_continuation","BCRA",false); mapsymbol("p_crystal","BCRA",false); mapsymbol("p_curtain","BCRA",false); mapsymbol("p_debris","BCRA",false); mapsymbol("p_dig","BCRA",false); mapsymbol("p_disk","BCRA",false); mapsymbol("p_entrance","BCRA",false); mapsymbol("p_fixedladder","BCRA",false); mapsymbol("p_flowstone","BCRA",false); mapsymbol("p_flowstonechoke","BCRA",false); mapsymbol("p_flute","BCRA",false); mapsymbol("p_gradient","BCRA",false); mapsymbol("p_guano","BCRA",false); mapsymbol("p_gypsum","BCRA",false); mapsymbol("p_gypsumflower","BCRA",false); mapsymbol("p_handrail","BCRA",false); mapsymbol("p_helictite","BCRA",false); mapsymbol("p_ice","BCRA",false); mapsymbol("p_icepillar","BCRA",false); mapsymbol("p_icestalactite","BCRA",false); mapsymbol("p_icestalagmite","BCRA",false); mapsymbol("p_karren","BCRA",false); mapsymbol("p_lowend","BCRA",false); mapsymbol("p_moonmilk","BCRA",false); mapsymbol("p_narrowend","BCRA",false); mapsymbol("p_noequipment","BCRA",false); mapsymbol("p_paleomaterial","BCRA",false); mapsymbol("p_pebbles","BCRA",false); mapsymbol("p_pillar","BCRA",false); mapsymbol("p_pillars","BCRA",false); mapsymbol("p_popcorn","BCRA",false); mapsymbol("p_raft","BCRA",false); mapsymbol("p_raftcone","BCRA",false); mapsymbol("p_rimstonedam","BCRA",false); mapsymbol("p_rimstonepool","BCRA",false); mapsymbol("p_root","BCRA",false); mapsymbol("p_rope","BCRA",false); mapsymbol("p_ropeladder","BCRA",false); mapsymbol("p_sand","BCRA",false); mapsymbol("p_scallop","BCRA",false); mapsymbol("p_sectionarrow","BCRA",false); mapsymbol("p_sink","BCRA",false); mapsymbol("p_snow","BCRA",false); mapsymbol("p_sodastraw","BCRA",false); mapsymbol("p_spring","BCRA",false); mapsymbol("p_stalactite","BCRA",false); mapsymbol("p_stalactites","BCRA",false); mapsymbol("p_stalagmite","BCRA",false); mapsymbol("p_stalagmites","BCRA",false); mapsymbol("p_station","BCRA",false); mapsymbol("p_station_fixed","BCRA",false); mapsymbol("p_station_natural","BCRA",false); mapsymbol("p_station_painted","BCRA",false); mapsymbol("p_station_temporary","BCRA",false); mapsymbol("p_steps","BCRA",false); mapsymbol("p_traverse","BCRA",false); mapsymbol("p_u","BCRA",false); mapsymbol("p_vegetabledebris","BCRA",false); mapsymbol("p_viaferrata","BCRA",false); mapsymbol("p_wallcalcite","BCRA",false); mapsymbol("p_water","BCRA",false); mapsymbol("p_waterflow_intermittent","BCRA",false); mapsymbol("p_waterflow_paleo","BCRA",false); mapsymbol("p_waterflow_permanent","BCRA",false); mapsymbol("s_hgrid","BCRA",false); mapsymbol("s_northarrow","BCRA",false); mapsymbol("s_scalebar","BCRA",false); mapsymbol("s_vgrid","BCRA",false); mapsymbol("l_gradient","BCRA",true); transparency:=true; background:=(1.00000,1.00000,1.00000); def_transparent_rgb(tr_bg, 1.00000, 1.00000, 1.00000); current_scrap := "janets_way_s1"; ATTR__scrap := "janets_way_s1"; beginfig(1); current_src := "janets_way.th2 [241]"; string area_border[]; area_border[1] := "l203-846--312"; drawoptions(); a_blocks(buildcycle(((593.07,-101.77) .. controls (593.07,-101.77) and (636.39,-80.12) .. (610.99,-70.70) .. controls (585.59,-61.27) and (480.35,-59.51) .. (480.35,-59.51) .. controls (480.35,-59.51) and (458.60,-78.24) .. (451.05,-80.90) .. controls (443.46,-83.58) and (447.44,-87.30) .. (459.69,-87.68) .. controls (471.84,-88.05) and (511.80,-97.97) .. (523.60,-92.96) .. controls (535.49,-87.92) and (533.15,-80.89) .. (533.19,-77.77) .. controls (533.22,-74.64) and (573.49,-88.56) .. (579.44,-94.64) .. controls (585.38,-100.72) and (593.07,-101.77) .. cycle ))); current_src := "janets_way.th2 [223]"; string area_border[]; area_border[1] := "l205-760--720"; drawoptions(); a_blocks(buildcycle(((390.30,-62.47) .. controls (392.43,-62.51) and (410.15,-64.71) .. (411.10,-64.49) .. controls (412.05,-64.27) and (440.09,-48.92) .. (438.30,-38.26) .. controls (436.49,-27.53) and (421.37,-18.12) .. (421.37,-18.12) -- (312.61,-2.12) -- (262.98,-14.90) -- (269.54,-52.72) -- (369.30,-50.77) .. controls (369.30,-50.77) and (389.01,-43.65) .. (388.91,-49.22) .. controls (388.82,-54.82) and (388.17,-62.43) .. cycle ))); current_src := "janets_way.th2 [208]"; string area_border[]; area_border[1] := "l207-703--1320"; drawoptions(); a_blocks(buildcycle(((225.47,-49.86) -- (224.26,-31.48) -- (158.31,-1.31) -- (-8.02,109.02) -- (-50.99,93.72) -- (-47.35,63.43) -- (91.09,-23.46) -- cycle ))); current_src := "janets_way.th2 [196]"; string area_border[]; area_border[1] := "l209-518--1733"; drawoptions(); a_blocks(buildcycle(((-113.96,74.01) -- (-93.19,63.24) .. controls (-93.19,63.24) and (-66.48,74.26) .. (-80.26,80.14) .. controls (-94.04,86.02) and (-113.96,74.01) .. cycle ))); current_src := "janets_way.th2 [180]"; string area_border[]; area_border[1] := "l211-524--1902"; drawoptions(); a_blocks(buildcycle(((-154.49,62.10) .. controls (-154.49,62.10) and (-128.73,72.95) .. (-146.42,77.31) .. controls (-164.04,81.65) and (-169.82,69.39) .. (-169.82,69.39) -- (-186.16,63.41) .. controls (-186.16,63.41) and (-202.07,77.03) .. (-211.28,73.55) .. controls (-220.53,70.06) and (-217.50,61.23) .. (-213.25,59.56) .. controls (-209.03,57.89) and (-154.49,62.10) .. cycle ))); current_src := "janets_way.th2 [162]"; string area_border[]; area_border[1] := "l213-522--2392"; drawoptions(); a_blocks(buildcycle(((-359.75,75.23) .. controls (-359.75,75.23) and (-348.97,85.12) .. (-355.43,90.12) .. controls (-361.82,95.06) and (-380.25,94.78) .. (-386.08,91.28) .. controls (-391.91,87.78) and (-407.84,80.08) .. (-421.34,85.33) .. controls (-434.85,90.57) and (-444.32,85.29) .. (-446.48,84.84) .. controls (-448.65,84.39) and (-454.85,87.04) .. (-460.60,87.31) .. controls (-466.34,87.58) and (-468.77,81.13) .. (-462.81,75.85) .. controls (-456.85,70.56) and (-450.11,62.51) .. (-448.69,58.74) .. controls (-447.27,54.98) and (-364.02,69.60) .. (-364.02,69.60) -- cycle ))); current_src := "janets_way.th2 [150]"; string area_border[]; area_border[1] := "l215-497--2834"; drawoptions(); a_blocks(buildcycle(((-627.49,67.63) -- (-595.33,90.04) -- (-611.39,125.45) -- (-637.41,116.04) -- cycle ))); ATTR__height := -1; drawoptions(); l_floorstep(((448.05,-48.23) .. controls (461.80,-54.94) and (447.07,-69.34) .. (447.07,-69.34) -- (440.17,-78.85) .. controls (440.17,-78.85) and (436.46,-80.54) .. (423.80,-73.04) )); ATTR__height := -1; drawoptions(); l_rockborder(((428.35,-68.13) .. controls (427.65,-69.08) and (438.79,-71.54) .. (438.79,-71.54) -- (446.59,-65.34) -- (439.13,-53.39) .. controls (439.13,-53.39) and (428.33,-49.25) .. (428.35,-68.13) )); ATTR__height := -1; drawoptions(); l_rockborder(((381.46,-71.05) -- (398.29,-65.93) -- (406.07,-68.43) -- (400.61,-77.65) -- (390.47,-81.96) -- (384.03,-79.53) -- (381.68,-72.75) -- cycle )); ATTR__height := -1; drawoptions(); l_rockborder(((-200.97,67.08) -- (-197.18,68.94) -- (-193.18,68.19) -- (-195.32,66.09) -- cycle )); ATTR__height := -1; drawoptions(); l_rockborder(((-221.68,77.64) -- (-222.89,71.69) -- (-236.97,82.01) -- (-229.54,83.89) -- cycle )); ATTR__height := -1; drawoptions(); l_rockborder(((-277.40,84.82) -- (-270.72,81.20) -- (-281.99,75.75) -- (-289.38,81.77) -- (-279.31,85.79) -- cycle )); ATTR__height := -1; drawoptions(); l_pit(((-102.86,66.20) .. controls (-102.86,66.20) and (-108.43,66.72) .. (-122.45,72.35) .. controls (-123.26,72.68) and (-131.18,71.43) .. (-141.87,63.97) )); ATTR__height := -1; drawoptions(); l_pit(((-187.54,65.78) .. controls (-187.54,65.78) and (-207.39,84.39) .. (-222.89,71.69) )); ATTR__height := -1; drawoptions(); l_pit(((-222.89,71.69) -- (-227.92,68.13) .. controls (-227.92,68.13) and (-241.51,84.19) .. (-268.61,69.95) )); ATTR__height := -1; drawoptions(); l_pit(((-284.16,71.21) .. controls (-284.16,71.21) and (-299.65,86.12) .. (-329.39,73.09) )); ATTR__height := -1; drawoptions(); l_floormeander(((-352.08,81.80) .. controls (-352.08,81.80) and (-344.90,81.77) .. (-342.98,83.68) .. controls (-341.05,85.58) and (-337.21,89.63) .. (-335.06,90.10) )); ATTR__height := -1; drawoptions(); l_pit(((-480.23,84.05) .. controls (-480.23,84.05) and (-478.36,73.28) .. (-481.50,67.56) )); ATTR__height := -1; drawoptions(); l_rockedge(((-451.82,71.74) .. controls (-451.82,71.74) and (-432.80,73.55) .. (-428.36,82.20) )); ATTR__height := -1; drawoptions(); l_rockedge(((-401.30,76.15) .. controls (-401.30,76.15) and (-377.26,74.67) .. (-377.48,76.07) )); ATTR__height := -1; drawoptions(); l_rockborder(((-481.19,82.86) .. controls (-480.42,87.24) and (-494.60,80.28) .. (-494.60,80.28) -- (-493.92,70.24) -- (-483.89,67.57) .. controls (-483.89,67.57) and (-484.52,64.02) .. cycle )); ATTR__height := -1; drawoptions(); l_rockborder(((-503.92,80.08) -- (-491.49,79.79) -- (-489.13,71.41) -- (-495.37,68.33) -- (-503.03,68.61) -- cycle )); ATTR__height := -1; drawoptions(); l_rockborder(((-516.61,83.39) .. controls (-516.61,83.39) and (-502.73,78.40) .. (-502.03,76.25) .. controls (-501.32,74.09) and (-506.40,67.68) .. (-506.40,67.68) -- (-514.79,63.54) -- (-525.53,70.02) -- cycle )); ATTR__height := -1; drawoptions(); l_rockborder(((-535.99,79.37) -- (-523.21,81.73) -- (-522.26,78.42) -- (-536.69,74.94) -- cycle )); ATTR__height := -1; drawoptions(); l_rockborder(((-537.63,73.55) -- (-547.42,73.81) -- (-546.49,69.38) -- (-540.20,69.13) -- cycle )); ATTR__height := -1; drawoptions(); l_rockborder(((-579.76,79.14) -- (-573.29,79.54) -- (-571.81,73.76) .. controls (-571.81,73.76) and (-580.62,73.43) .. (-581.35,74.17) .. controls (-582.08,74.90) and (-579.76,79.14) .. cycle )); ATTR__height := -1; drawoptions(); l_rockborder(((-581.48,81.10) -- (-578.55,78.38) -- (-585.23,76.35) -- cycle )); ATTR__height := -1; drawoptions(); l_rockborder(((-596.14,83.59) -- (-586.26,79.93) -- (-588.36,77.29) -- (-596.04,79.06) -- cycle )); ATTR__height := -1; drawoptions(); l_rockborder(((-601.28,78.71) -- (-588.36,77.29) -- (-600.35,63.82) -- (-602.79,61.27) -- (-608.19,68.06) -- cycle )); ATTR__height := -1; drawoptions(); l_rockedge(((-601.28,78.71) -- (-596.89,74.27) -- (-588.36,77.29) )); ATTR__height := -1; drawoptions(); l_rockedge(((-596.89,74.27) -- (-602.79,61.27) )); ATTR__height := -1; drawoptions(); l_pit(((-589.51,75.13) .. controls (-589.51,75.13) and (-582.42,67.01) .. (-580.17,56.71) )); ATTR__height := -1; drawoptions(); l_flowstone(((312.42,-62.58) .. controls (312.42,-62.58) and (308.48,-60.10) .. (306.46,-61.49) .. controls (304.46,-62.87) and (306.76,-58.86) .. (300.56,-58.21) )); ATTR__height := -1; drawoptions(); l_floorstep(((448.83,-90.62) .. controls (448.83,-90.62) and (459.21,-88.63) .. (468.68,-99.76) )); ATTR__height := -1; drawoptions(); l_pit(((494.34,-50.82) .. controls (491.24,-53.20) and (471.71,-35.90) .. (471.71,-35.90) )); ATTR__height := -1; drawoptions(); l_flowstone(((308.14,-65.59) .. controls (308.14,-65.59) and (304.49,-60.72) .. (297.11,-61.41) )); ATTR__height := -1; drawoptions(); l_rockborder(((89.00,2.24) .. controls (89.96,3.44) and (88.03,1.05) .. cycle )); ATTR__height := -1; drawoptions(); l_rockedge(((213.95,-37.49) -- (216.47,-35.41) -- (220.38,-38.39) -- (218.09,-40.46) -- (215.10,-40.01) -- cycle )); ATTR__height := -1; drawoptions(); l_pit(((90.46,8.48) .. controls (90.46,8.48) and (93.78,-2.58) .. (102.65,-5.73) .. controls (118.33,-11.30) and (104.32,-6.69) .. (104.32,-6.69) .. controls (104.32,-6.69) and (115.60,-8.41) .. (119.20,-7.47) )); ATTR__height := -1; drawoptions(); l_floormeander(((421.68,-90.08) .. controls (421.68,-90.08) and (426.17,-92.47) .. (429.01,-92.01) .. controls (431.84,-91.55) and (435.37,-91.56) .. (437.95,-93.23) )); ATTR__id := "l203-846--312"; ATTR__height := -1; drawoptions(); l_border_invisible(((593.07,-101.77) .. controls (593.07,-101.77) and (636.39,-80.12) .. (610.99,-70.70) .. controls (585.59,-61.27) and (480.35,-59.51) .. (480.35,-59.51) .. controls (480.35,-59.51) and (458.60,-78.24) .. (451.05,-80.90) .. controls (443.46,-83.58) and (447.44,-87.30) .. (459.69,-87.68) .. controls (471.84,-88.05) and (511.80,-97.97) .. (523.60,-92.96) .. controls (535.49,-87.92) and (533.15,-80.89) .. (533.19,-77.77) .. controls (533.22,-74.64) and (573.49,-88.56) .. (579.44,-94.64) .. controls (585.38,-100.72) and (593.07,-101.77) .. cycle )); ATTR__id := "l205-760--720"; ATTR__height := -1; drawoptions(); l_border_invisible(((390.30,-62.47) .. controls (392.43,-62.51) and (410.15,-64.71) .. (411.10,-64.49) .. controls (412.05,-64.27) and (440.09,-48.92) .. (438.30,-38.26) .. controls (436.49,-27.53) and (421.37,-18.12) .. (421.37,-18.12) -- (312.61,-2.12) -- (262.98,-14.90) -- (269.54,-52.72) -- (369.30,-50.77) .. controls (369.30,-50.77) and (389.01,-43.65) .. (388.91,-49.22) .. controls (388.82,-54.82) and (388.17,-62.43) .. cycle )); ATTR__id := "l207-703--1320"; ATTR__height := -1; drawoptions(); l_border_invisible(((225.47,-49.86) -- (224.26,-31.48) -- (158.31,-1.31) -- (-8.02,109.02) -- (-50.99,93.72) -- (-47.35,63.43) -- (91.09,-23.46) -- cycle )); ATTR__id := "l209-518--1733"; ATTR__height := -1; drawoptions(); l_border_invisible(((-113.96,74.01) -- (-93.19,63.24) .. controls (-93.19,63.24) and (-66.48,74.26) .. (-80.26,80.14) .. controls (-94.04,86.02) and (-113.96,74.01) .. cycle )); ATTR__id := "l211-524--1902"; ATTR__height := -1; drawoptions(); l_border_invisible(((-154.49,62.10) .. controls (-154.49,62.10) and (-128.73,72.95) .. (-146.42,77.31) .. controls (-164.04,81.65) and (-169.82,69.39) .. (-169.82,69.39) -- (-186.16,63.41) .. controls (-186.16,63.41) and (-202.07,77.03) .. (-211.28,73.55) .. controls (-220.53,70.06) and (-217.50,61.23) .. (-213.25,59.56) .. controls (-209.03,57.89) and (-154.49,62.10) .. cycle )); ATTR__id := "l213-522--2392"; ATTR__height := -1; drawoptions(); l_border_invisible(((-359.75,75.23) .. controls (-359.75,75.23) and (-348.97,85.12) .. (-355.43,90.12) .. controls (-361.82,95.06) and (-380.25,94.78) .. (-386.08,91.28) .. controls (-391.91,87.78) and (-407.84,80.08) .. (-421.34,85.33) .. controls (-434.85,90.57) and (-444.32,85.29) .. (-446.48,84.84) .. controls (-448.65,84.39) and (-454.85,87.04) .. (-460.60,87.31) .. controls (-466.34,87.58) and (-468.77,81.13) .. (-462.81,75.85) .. controls (-456.85,70.56) and (-450.11,62.51) .. (-448.69,58.74) .. controls (-447.27,54.98) and (-364.02,69.60) .. (-364.02,69.60) -- cycle )); ATTR__id := "l215-497--2834"; ATTR__height := -1; drawoptions(); l_border_invisible(((-627.49,67.63) -- (-595.33,90.04) -- (-611.39,125.45) -- (-637.41,116.04) -- cycle )); ATTR__id := ""; ATTR__height := -1; drawoptions(); l_chimney(((-377.24,77.71) .. controls (-377.24,77.71) and (-371.17,78.15) .. (-371.62,82.36) .. controls (-372.08,86.57) and (-377.68,89.62) .. (-380.71,87.99) .. controls (-383.75,86.37) and (-386.33,84.04) .. (-385.40,82.17) .. controls (-384.47,80.30) and (-377.24,77.71) .. cycle )); endfig; beginfig(2); draw_upscrap(1)(1,((-539.21,44.98) .. controls (-537.50,55.09) and (-529.39,52.62) .. (-528.45,53.08) .. controls (-527.52,53.54) and (-516.93,58.61) .. (-511.49,58.79) .. controls (-506.01,58.96) and (-488.96,61.85) .. (-475.78,60.85) .. controls (-462.59,59.85) and (-402.50,63.07) .. (-393.63,66.08) .. controls (-384.76,69.09) and (-374.51,70.20) .. (-371.24,71.35) .. controls (-367.97,72.49) and (-342.31,74.58) .. (-329.39,73.09) .. controls (-316.47,71.59) and (-285.60,71.22) .. (-284.16,71.21) .. controls (-282.73,71.21) and (-269.57,69.95) .. (-268.61,69.95) .. controls (-267.66,69.94) and (-229.60,67.89) .. (-227.92,68.13) .. controls (-226.25,68.37) and (-207.22,63.94) .. (-192.14,65.47) .. controls (-192.14,65.47) and (-112.82,61.89) .. (-105.29,65.00) .. controls (-97.76,68.11) and (-70.62,70.40) .. (-64.08,69.64) .. controls (-57.54,68.88) and (-32.70,68.95) .. (-26.64,70.01) .. controls (-20.58,71.07) and (-11.20,73.13) .. (3.56,57.77) .. controls (18.74,41.96) and (21.65,38.09) .. (22.84,35.16) .. controls (24.02,32.25) and (30.97,25.24) .. (36.03,25.47) .. controls (41.08,25.71) and (64.78,8.81) .. (76.28,2.53) .. controls (87.77,-3.75) and (124.42,-25.49) .. (124.42,-25.49) .. controls (124.42,-25.49) and (136.17,-27.45) .. (139.04,-30.82) .. controls (141.92,-34.20) and (150.53,-39.59) .. (157.45,-38.36) .. controls (164.32,-37.14) and (195.57,-38.92) .. (199.94,-40.98) .. controls (204.31,-43.03) and (222.01,-44.59) .. (227.53,-46.41) .. controls (233.04,-48.23) and (254.87,-49.77) .. (257.85,-49.07) .. controls (260.84,-48.37) and (269.32,-51.07) .. (277.80,-50.63) .. controls (286.23,-50.19) and (297.17,-52.63) .. (297.17,-52.63) .. controls (297.17,-52.63) and (306.78,-57.32) .. (296.39,-58.30) .. controls (286.37,-59.24) and (282.15,-62.35) .. (282.14,-64.98) .. controls (282.13,-67.61) and (284.96,-68.85) .. (289.47,-68.66) .. controls (293.99,-68.47) and (303.89,-72.57) .. (308.32,-71.31) .. controls (312.80,-70.02) and (317.80,-68.46) .. (320.04,-68.49) .. controls (322.28,-68.53) and (326.03,-65.39) .. (322.84,-61.70) .. controls (319.66,-58.00) and (313.26,-54.04) .. (320.67,-54.31) .. controls (328.06,-54.58) and (355.02,-62.70) .. (368.06,-75.63) .. controls (380.89,-88.35) and (375.53,-82.84) .. (370.30,-85.11) ), 1,((369.47,-94.37) .. controls (369.47,-94.37) and (378.32,-94.31) .. (385.55,-106.78) .. controls (388.28,-111.47) and (391.32,-120.32) .. (391.32,-120.32) .. controls (391.32,-120.32) and (396.17,-145.79) .. (384.29,-173.51) ), 1,((400.43,-179.42) .. controls (400.43,-179.42) and (412.60,-154.25) .. (420.98,-143.70) .. controls (440.19,-119.52) and (448.02,-105.29) .. (455.51,-103.38) .. controls (465.47,-100.83) and (467.39,-102.16) .. (469.83,-102.62) .. controls (471.70,-102.98) and (483.23,-114.03) .. (498.18,-114.86) .. controls (513.14,-115.68) and (520.33,-107.36) .. (631.83,-119.26) ), 1,((634.08,-71.43) .. controls (634.08,-71.43) and (528.85,-52.93) .. (519.68,-53.79) .. controls (510.49,-54.66) and (489.57,-53.20) .. (506.34,-48.68) ), 1,((493.25,-34.47) .. controls (493.25,-34.47) and (473.58,-36.82) .. (471.71,-35.90) .. controls (469.85,-34.99) and (451.25,-30.94) .. (447.28,-30.69) .. controls (443.30,-30.45) and (398.96,-19.38) .. (392.24,-18.49) .. controls (368.88,-15.43) and (365.41,-18.57) .. (343.69,14.84) ), 1,((306.44,8.49) .. controls (306.44,8.49) and (324.89,-5.94) .. (313.79,-9.20) .. controls (302.86,-12.40) and (283.06,-9.44) .. (278.16,-14.16) .. controls (273.29,-18.84) and (261.36,-25.33) .. (255.19,-24.91) .. controls (249.01,-24.49) and (196.00,-23.30) .. (187.05,-26.55) .. controls (178.09,-29.79) and (148.66,-25.44) .. (168.65,-14.91) ), 1,((158.76,-8.64) .. controls (158.76,-8.64) and (146.31,-20.13) .. (136.46,-16.19) .. controls (126.64,-12.26) and (119.20,-7.47) .. (119.20,-7.47) -- (125.02,0.62) ), 1,((97.69,15.16) -- (90.46,8.48) .. controls (90.46,8.48) and (70.34,20.55) .. (66.75,23.92) .. controls (63.17,27.29) and (22.08,50.46) .. (16.11,71.15) .. controls (15.01,74.96) and (4.05,89.75) .. (4.05,89.75) .. controls (4.05,89.75) and (-1.71,92.97) .. (6.35,97.89) .. controls (14.35,102.77) and (15.51,110.33) .. (15.51,110.33) ), 1,((2.13,118.27) .. controls (2.13,118.27) and (-16.57,91.16) .. (-41.81,89.32) .. controls (-67.13,87.48) and (-132.59,84.26) .. (-140.11,81.39) .. controls (-148.09,78.35) and (-193.06,81.16) .. (-197.99,82.87) .. controls (-202.91,84.57) and (-223.06,84.09) .. (-228.80,86.04) .. controls (-234.54,87.98) and (-243.16,88.98) .. (-252.74,87.83) .. controls (-262.32,86.67) and (-273.32,89.11) .. (-286.00,88.69) .. controls (-298.69,88.27) and (-315.42,92.65) .. (-324.52,91.49) .. controls (-333.62,90.33) and (-358.72,99.36) .. (-366.98,96.73) .. controls (-375.15,94.12) and (-404.02,96.96) .. (-409.14,97.46) .. controls (-414.25,97.96) and (-452.83,97.90) .. (-458.36,94.89) .. controls (-463.92,91.86) and (-494.59,91.04) .. (-505.14,88.17) .. controls (-515.66,85.30) and (-564.96,79.47) .. (-574.75,81.77) .. controls (-584.65,84.09) and (-595.41,82.65) .. (-601.55,90.86) .. controls (-607.70,99.07) and (-612.85,116.12) .. (-612.85,116.12) ), 1,((-633.86,106.59) .. controls (-633.86,106.59) and (-619.38,67.34) .. (-619.88,46.84) ), 1,((-600.73,39.40) -- (-600.35,63.82) -- (-589.51,75.13) .. controls (-589.51,75.13) and (-584.42,58.68) .. (-580.17,56.71) .. controls (-575.95,54.76) and (-546.82,52.80) .. (-546.82,52.80) .. controls (-546.82,52.80) and (-540.99,54.41) .. (-544.78,46.45) )); draw_downscrap; endfig; beginfig(3); drawoptions(); p_gradient((-614.23,71.27),172.8,1.00,(0,0)); drawoptions(); p_gradient((-567.09,63.48),266.3,1.00,(0,0)); drawoptions(); p_gradient((-530.02,61.13),282.6,1.00,(0,0)); drawoptions(); p_gradient((-536.49,65.62),-24.2,1.00,(0,0)); drawoptions(); p_gradient((-437.42,90.89),91.1,1.00,(0,0)); drawoptions(); p_gradient((-393.55,91.31),91.1,1.00,(0,0)); drawoptions(); p_stalagmite((-347.28,90.38),0.0,1.00,(0,0)); drawoptions(); p_stalagmite((-166.54,67.47),0.0,1.00,(0,0)); drawoptions(); p_gradient((-17.85,93.16),131.2,1.00,(0,0)); drawoptions(); p_gradient((34.44,39.39),238.3,1.00,(0,0)); drawoptions(); p_gradient((11.62,111.53),127.8,1.00,(0,0)); drawoptions(); p_gradient((136.90,-25.29),65.7,1.00,(0,0)); drawoptions(); p_gradient((154.78,-17.07),289.9,1.00,(0,0)); drawoptions(); p_waterflow_permanent((105.58,6.98),141.0,1.00,(0,0)); drawoptions(); p_waterflow_permanent((110.86,5.27),141.0,1.00,(0,0)); drawoptions(); p_waterflow_permanent((116.61,2.13),141.0,1.00,(0,0)); drawoptions(); p_gradient((279.56,-35.15),93.8,1.00,(0,0)); drawoptions(); p_gradient((308.42,-17.09),150.0,1.00,(0,0)); drawoptions(); p_gradient((328.29,-20.12),168.0,1.00,(0,0)); drawoptions(); p_gradient((323.44,2.97),42.5,1.00,(0,0)); picture ATTR__text; ATTR__text := btex \thcomment \thfb\char117 \char110 \char109 \char97 \char114 \char107 \char101 \char100 \mainfont{}etex; drawoptions(); p_continuation((116.93,15.01),0.0,1.00,(0,0)); save ATTR__text; picture ATTR__text; ATTR__text := btex \thcomment \thfb\char117 \char110 \char109 \char97 \char114 \char107 \char101 \char100 \mainfont{}etex; drawoptions(); p_continuation((12.55,120.97),0.0,1.00,(0,0)); save ATTR__text; drawoptions(); p_gradient((337.91,2.38),42.5,1.00,(0,0)); drawoptions(); p_gradient((349.63,-17.07),233.3,1.00,(0,0)); drawoptions(); p_gradient((287.80,-63.40),273.5,1.00,(0,0)); drawoptions(); p_stalagmite((293.75,-66.56),0.0,1.00,(0,0)); drawoptions(); p_stalagmite((316.41,-61.65),0.0,1.00,(0,0)); drawoptions(); p_stalactite((311.86,-65.93),0.0,1.00,(0,0)); drawoptions(); p_stalactite((318.85,-64.84),0.0,1.00,(0,0)); drawoptions(); p_stalactite((307.35,-68.90),0.0,1.00,(0,0)); drawoptions(); p_stalactite((299.76,-66.97),0.0,1.00,(0,0)); drawoptions(); p_stalactite((288.51,-65.31),0.0,1.00,(0,0)); drawoptions(); p_gradient((376.25,-20.27),154.7,1.00,(0,0)); drawoptions(); p_gradient((390.55,-25.38),154.7,1.00,(0,0)); drawoptions(); p_gradient((419.49,-44.11),89.6,1.00,(0,0)); drawoptions(); p_gradient((399.46,-85.84),158.8,1.00,(0,0)); drawoptions(); p_gradient((442.04,-40.89),158.8,1.00,(0,0)); drawoptions(); p_gradient((447.29,-102.93),-35.3,1.00,(0,0)); drawoptions(); p_gradient((460.05,-124.58),27.7,1.00,(0,0)); picture ATTR__text; ATTR__text := btex \thcomment \thfb\char76 \char101 \char97 \char100 \mainfont{}etex; drawoptions(); p_continuation((508.99,-38.01),0.0,1.00,(0,0)); save ATTR__text; drawoptions(); p_gradient((475.20,-61.20),153.2,1.00,(0,0)); drawoptions(); p_waterflow_permanent((432.03,-102.20),-26.0,1.00,(0,0)); drawoptions(); p_waterflow_permanent((426.40,-99.82),-26.0,1.00,(0,0)); ATTR__height := -1; drawoptions(); l_wall_bedrock(((369.47,-94.37) .. controls (369.47,-94.37) and (378.32,-94.31) .. (385.55,-106.78) .. controls (388.28,-111.47) and (391.32,-120.32) .. (391.32,-120.32) .. controls (391.32,-120.32) and (396.17,-145.79) .. (384.29,-173.51) )); ATTR__height := -1; drawoptions(); l_wall_bedrock(((-600.73,39.40) -- (-600.35,63.82) -- (-589.51,75.13) .. controls (-589.51,75.13) and (-584.42,58.68) .. (-580.17,56.71) .. controls (-575.95,54.76) and (-546.82,52.80) .. (-546.82,52.80) .. controls (-546.82,52.80) and (-540.99,54.41) .. (-544.78,46.45) )); ATTR__height := -1; drawoptions(); l_wall_bedrock(((-539.21,44.98) .. controls (-537.50,55.09) and (-529.39,52.62) .. (-528.45,53.08) .. controls (-527.52,53.54) and (-516.93,58.61) .. (-511.49,58.79) .. controls (-506.01,58.96) and (-488.96,61.85) .. (-475.78,60.85) .. controls (-462.59,59.85) and (-402.50,63.07) .. (-393.63,66.08) .. controls (-384.76,69.09) and (-374.51,70.20) .. (-371.24,71.35) .. controls (-367.97,72.49) and (-342.31,74.58) .. (-329.39,73.09) .. controls (-316.47,71.59) and (-285.60,71.22) .. (-284.16,71.21) .. controls (-282.73,71.21) and (-269.57,69.95) .. (-268.61,69.95) .. controls (-267.66,69.94) and (-229.60,67.89) .. (-227.92,68.13) .. controls (-226.25,68.37) and (-207.22,63.94) .. (-192.14,65.47) .. controls (-192.14,65.47) and (-112.82,61.89) .. (-105.29,65.00) .. controls (-97.76,68.11) and (-70.62,70.40) .. (-64.08,69.64) .. controls (-57.54,68.88) and (-32.70,68.95) .. (-26.64,70.01) .. controls (-20.58,71.07) and (-11.20,73.13) .. (3.56,57.77) .. controls (18.74,41.96) and (21.65,38.09) .. (22.84,35.16) .. controls (24.02,32.25) and (30.97,25.24) .. (36.03,25.47) .. controls (41.08,25.71) and (64.78,8.81) .. (76.28,2.53) .. controls (87.77,-3.75) and (124.42,-25.49) .. (124.42,-25.49) .. controls (124.42,-25.49) and (136.17,-27.45) .. (139.04,-30.82) .. controls (141.92,-34.20) and (150.53,-39.59) .. (157.45,-38.36) .. controls (164.32,-37.14) and (195.57,-38.92) .. (199.94,-40.98) .. controls (204.31,-43.03) and (222.01,-44.59) .. (227.53,-46.41) .. controls (233.04,-48.23) and (254.87,-49.77) .. (257.85,-49.07) .. controls (260.84,-48.37) and (269.32,-51.07) .. (277.80,-50.63) .. controls (286.23,-50.19) and (297.17,-52.63) .. (297.17,-52.63) .. controls (297.17,-52.63) and (306.78,-57.32) .. (296.39,-58.30) .. controls (286.37,-59.24) and (282.15,-62.35) .. (282.14,-64.98) .. controls (282.13,-67.61) and (284.96,-68.85) .. (289.47,-68.66) .. controls (293.99,-68.47) and (303.89,-72.57) .. (308.32,-71.31) .. controls (312.80,-70.02) and (317.80,-68.46) .. (320.04,-68.49) .. controls (322.28,-68.53) and (326.03,-65.39) .. (322.84,-61.70) .. controls (319.66,-58.00) and (313.26,-54.04) .. (320.67,-54.31) .. controls (328.06,-54.58) and (355.02,-62.70) .. (368.06,-75.63) .. controls (380.89,-88.35) and (375.53,-82.84) .. (370.30,-85.11) )); ATTR__height := -1; drawoptions(); l_wall_bedrock(((2.13,118.27) .. controls (2.13,118.27) and (-16.57,91.16) .. (-41.81,89.32) .. controls (-67.13,87.48) and (-132.59,84.26) .. (-140.11,81.39) .. controls (-148.09,78.35) and (-193.06,81.16) .. (-197.99,82.87) .. controls (-202.91,84.57) and (-223.06,84.09) .. (-228.80,86.04) .. controls (-234.54,87.98) and (-243.16,88.98) .. (-252.74,87.83) .. controls (-262.32,86.67) and (-273.32,89.11) .. (-286.00,88.69) .. controls (-298.69,88.27) and (-315.42,92.65) .. (-324.52,91.49) .. controls (-333.62,90.33) and (-358.72,99.36) .. (-366.98,96.73) .. controls (-375.15,94.12) and (-404.02,96.96) .. (-409.14,97.46) .. controls (-414.25,97.96) and (-452.83,97.90) .. (-458.36,94.89) .. controls (-463.92,91.86) and (-494.59,91.04) .. (-505.14,88.17) .. controls (-515.66,85.30) and (-564.96,79.47) .. (-574.75,81.77) .. controls (-584.65,84.09) and (-595.41,82.65) .. (-601.55,90.86) .. controls (-607.70,99.07) and (-612.85,116.12) .. (-612.85,116.12) )); ATTR__height := -1; drawoptions(); l_wall_bedrock(((-633.86,106.59) .. controls (-633.86,106.59) and (-619.38,67.34) .. (-619.88,46.84) )); ATTR__height := -1; drawoptions(); l_wall_bedrock(((400.43,-179.42) .. controls (400.43,-179.42) and (412.60,-154.25) .. (420.98,-143.70) .. controls (440.19,-119.52) and (448.02,-105.29) .. (455.51,-103.38) .. controls (465.47,-100.83) and (467.39,-102.16) .. (469.83,-102.62) .. controls (471.70,-102.98) and (483.23,-114.03) .. (498.18,-114.86) .. controls (513.14,-115.68) and (520.33,-107.36) .. (631.83,-119.26) )); ATTR__height := -1; drawoptions(); l_wall_bedrock(((634.08,-71.43) .. controls (634.08,-71.43) and (528.85,-52.93) .. (519.68,-53.79) .. controls (510.49,-54.66) and (489.57,-53.20) .. (506.34,-48.68) )); ATTR__height := -1; drawoptions(); l_wall_bedrock(((306.44,8.49) .. controls (306.44,8.49) and (324.89,-5.94) .. (313.79,-9.20) .. controls (302.86,-12.40) and (283.06,-9.44) .. (278.16,-14.16) .. controls (273.29,-18.84) and (261.36,-25.33) .. (255.19,-24.91) .. controls (249.01,-24.49) and (196.00,-23.30) .. (187.05,-26.55) .. controls (178.09,-29.79) and (148.66,-25.44) .. (168.65,-14.91) )); ATTR__height := -1; drawoptions(); l_wall_bedrock(((493.25,-34.47) .. controls (493.25,-34.47) and (473.58,-36.82) .. (471.71,-35.90) .. controls (469.85,-34.99) and (451.25,-30.94) .. (447.28,-30.69) .. controls (443.30,-30.45) and (398.96,-19.38) .. (392.24,-18.49) .. controls (368.88,-15.43) and (365.41,-18.57) .. (343.69,14.84) )); ATTR__height := -1; drawoptions(); l_wall_bedrock(((158.76,-8.64) .. controls (158.76,-8.64) and (146.31,-20.13) .. (136.46,-16.19) .. controls (126.64,-12.26) and (119.20,-7.47) .. (119.20,-7.47) -- (125.02,0.62) )); ATTR__height := -1; drawoptions(); l_wall_bedrock(((97.69,15.16) -- (90.46,8.48) .. controls (90.46,8.48) and (70.34,20.55) .. (66.75,23.92) .. controls (63.17,27.29) and (22.08,50.46) .. (16.11,71.15) .. controls (15.01,74.96) and (4.05,89.75) .. (4.05,89.75) .. controls (4.05,89.75) and (-1.71,92.97) .. (6.35,97.89) .. controls (14.35,102.77) and (15.51,110.33) .. (15.51,110.33) )); endfig; beginfig(4); ATTR__height := -1; drawoptions(); l_label(btex \thnormalsize \thfb\char74 {}\char97 {}\char110 {}\char101 {}\char116 {}\char39 {}\char115 {}\ \char87 {}\char97 {}\char121 {}\mainfont{} etex,((-464.17,89.47) -- (-400.78,89.69) )); ATTR__height := -1; drawoptions(); l_label(btex \thnormalsize \vbox{\halign{#\hfil\cr\thfb\char83 {}\char121 {}\char114 {}\char105 {}\char97 {}\char39 {}\char115 {}\cr\thfb \char80 {}\char97 {}\char108 {}\char97 {}\char99 {}\char101 {}\cr}}\mainfont{} etex,((293.09,-82.04) -- (312.97,-82.13) )); drawoptions(); p_label(btex \thlabel\thnormalsize \thfb\char80 \char49 \char48 \mainfont{} etex,(473.13,-17.37),0.0,0); endfig; beginfig(5); s_northarrow(60); endfig; beginfig(6); s_scalebar(100, 1, "\thfb\char109 \mainfont{}"); endfig; background:=(1.00000,1.00000,1.00000); transparency:=false; beginfig(7); clean_legend_box; drawoptions(); l_wall_bedrock(((-.3,0.5) .. (.3,.3) .. (.7,.7) .. (1.3,.5)) inscale); draw_legend_box; endfig; beginfig(8); clean_legend_box; drawoptions(withcolor HelpSymbolColor); l_wall_bedrock(((0,.2){dir 30} .. {dir 0}(.5,.4)) inscale); l_wall_bedrock(((.5,.6){dir 180} .. {dir 210}(0,.8)) inscale); drawoptions(); drawoptions(); p_continuation((.6,.5) inscale,270.0,1.0,(0,1)); draw_legend_box; endfig; beginfig(9); clean_legend_box; drawoptions(); l_floorstep((((.1,.6) .. (.5,.4) .. (.9,.6)) inscale)); draw_legend_box; endfig; beginfig(10); clean_legend_box; drawoptions(); l_floormeander((((.1,.6) .. (.5,.4) .. (.9,.6)) inscale)); draw_legend_box; endfig; beginfig(11); clean_legend_box; drawoptions(); l_pit((((.85,.5){dir 90} .. (.5,.85){dir 180} .. (.4,.15){dir 0} .. cycle) inscale)); draw_legend_box; endfig; beginfig(12); clean_legend_box; drawoptions(); l_chimney((((.85,.5){dir 90} .. (.5,.85){dir 180} .. (.4,.15){dir 0} .. cycle) inscale)); draw_legend_box; endfig; drawoptions(); beginfig(13); clean_legend_box; drawoptions(); p_gradient((0.5,0.5) inscale,270.0,1.0,(0,0)); draw_legend_box; endfig; beginfig(14); clean_legend_box; drawoptions(); l_rockborder(((.16,.36) -- (.61,.21) -- (.91,.46) -- (.84,.78) -- (.38,.86) -- (.20,.55) -- cycle) inscale)draw_legend_box; endfig; beginfig(15); clean_legend_box; drawoptions(withcolor HelpSymbolColor); l_rockborder(((.16,.36) -- (.61,.21) -- (.91,.46) -- (.84,.78) -- (.38,.86) -- (.20,.55) -- cycle) inscale)drawoptions(); drawoptions(); l_rockedge(((.16,.36) -- (.42,.62) -- (.38,.86) -- (.42,.62) -- (.6,.55) -- (.61,.21) -- (.6,.55) -- (.84,.78)) inscale)draw_legend_box; endfig; beginfig(16); clean_legend_box; drawoptions(); a_blocks(buildcycle((((-4,-4) -- (4,-4) -- (4,4) -- (-4,4) -- (-4,-4)) inscale))); draw_legend_box; endfig; beginfig(17); clean_legend_box; drawoptions(); p_waterflow_permanent((0.5,0.5) inscale,270.0,1.0,(0,0)); draw_legend_box; endfig; beginfig(18); clean_legend_box; drawoptions(); l_flowstone((((.1,.6) .. (.5,.4) .. (.9,.6)) inscale)); draw_legend_box; endfig; beginfig(19); clean_legend_box; drawoptions(); p_stalactite((0.5,0.5) inscale,0.0,1.0,(0,0)); draw_legend_box; endfig; beginfig(20); clean_legend_box; drawoptions(); p_stalagmite((0.5,0.5) inscale,0.0,1.0,(0,0)); draw_legend_box; endfig; end;