Prev Up Top Next Contents

6.4 Small cave maps

The maps of small caves require that the symbols are rendered differently than on maps of large caves, because they are usually drawn at a larger scale, so that the symbol density needs to be higher than for large caves.
The relevant change to the thconfig file is the layout scale options. For example,
  scale 1 100
Next there are the MetaPost redefinitions for symbols and lines.
Modification of area type "debris". This differ from the original definition in Therion by the steps (0.6 instead of 1.0) and the random scale (0.4 instead of 0.6).
   def a_debris (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 0.6u until xpart urcorner q:
     for j = ypart llcorner q step 0.6u until ypart urcorner q:
      draw ((-.2u,0)--(.2u,0))
      rotated uniformdeviate(360)
      shifted ((i,j) randomized 0.4u) withpen PenC;
     endfor;
   endfor;
  );
  clip tmp_pic to p;
  draw tmp_pic;
  enddef;
Modification of area type "blocks". As before the steps are reduced from 2.0 to 1.0 and the random scale is reduced from 1.6 to 1.0.
    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 1.0uu until xpart urcorner q:
      for j = ypart llcorner q step 1.0uu 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;
Modification of area "sand": use steps 0.4, random scale 0.3, and PenA.
Modification of area "blocks" and "pebbles": use steps 0.65 and random scale 0.6.
Modification of area "clay": use steps 0.7 and random scale 0.6.
Modification of area "ice" and "snow": use steps 1.5 and random scale 1.3.
Modification of line "slope": replace 5 with 2 in the line "mojkrok:=adjust_step(dlzka,1.4u) / 5;".
Modification of line "overhang":
  def l_overhang (expr P) =
    T:=identity;
    cas := 0;
    dlzka := arclength P;
    mojkrok:=adjust_step(dlzka, 0.3u);
    pickup PenC;
    t1:=0;
    forever:
      t := arctime (cas + mojkrok/5) 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;

therion users - Mon Feb 20 17:32:12 2012
Prev Up Top Next Contents

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.