encoding utf-8 source WhiteScarIndex.th # Change name to the main therion file #Surveys to output #----------------- export map -proj plan -layout local -o Output/WhiteScarCave.pdf export map -o Output/WhiteScarCave.kml #export model -fmt survex -o Output/WhiteScarCave.3d #export map -fmt survex -o Output/WhiteScarCaveWalls.3d #export model -o Output/WSSC.lox ####################layout Local################### ########################################### ####Uncomment (#) to activate or deactivate layout comands as needed#### ####Any line with a # at the begining will be ignored#### layout local scale 1 300 symbol-set BCRA #debug station-names #debug on #colour map-fg altitude #colour map-fg scrap colour map-fg [97 86 38] ##Pale Yellow## colour map-bg [90 90 90] ##Light Grey## north grid #grid top #grid bottom #grid-size 10 10 10 m #grid-coords all #border ####Puts grid coords on intersections or at border if that is selected#### #rotate -90 #map-header 5 5 sw #legend on #transparency on symbol-colour area water [25 50 100] ##Blue## #symbol-colour area sump [10 10 100] ##Lighter Blue## #symbol-colour area flowstone [20 20 20] ## ## symbol-colour line water-flow [22 22 95] ##Light Blue## #symbol-colour point water-flow [22 22 95] ##Light Blue## #symbol-colour point station [0 0 0] #symbol-colour group centerline [100 0 0] ##Red## symbol-hide group centerline # 1. Hides all centerline and survey station symbols in cave. #symbol-hide point cave-station # 2. Hides all survey stations in the cave but not centerline. symbol-assign area blocks BCA ##need this line to make AA's blocks work### ########Andrews Blocks############ code metapost initsymbol("a_blocks_BCA"); def a_blocks_BCA (expr p) = T:=identity; symbol_distance:=0.7; % Distance between the blocks as set out in a rectangular grid block_randomisation:=0.7; % Max each point of the base block can be moved. Too big and they can intersect themselves base_rotation:= 0; % Rotation from 0 of base block, can be used to set all blocks to the same angle random_rotation:= 360; % Rotation either side of base rotation eg 20 will be plus or minus 10 each side min_scale_factor:=0.7; % Minimum multiplier used for the base shape add_scale_factor:= 0.6; % Added to the minimum multiplier to get the maximum scale block_rectangle:=1.5; % How much longer the block is than it is wide, before randomising shift_randomisation:=0.75; % Max random amount block can be moved from the original grid %Now set the proportions of different sided block b_tri:=1; b_quad:=3; b_pent:=4; b_hex:=2; pickup PenC; path q, regular, 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); iu := uu * block_rectangle; blocks := b_tri+b_quad + b_pent + b_hex; tmp_pic := image( for i = xpart llcorner q step symbol_distance * block_rectangle * uu until xpart urcorner q: for j = ypart llcorner q step symbol_distance*uu until ypart urcorner q: pick_sides := uniformdeviate(blocks); if pick_sides < b_tri: sides:=3; elseif pick_sides < b_tri + b_quad: sides:=4; elseif pick_sides < b_tri + b_quad +b_pent: sides:=5; else: sides:=6 fi; qq := for n:=0 upto sides-1: ((cosd(360*n/sides))*iu/2,(sind(360*n/sides))*uu/2) -- endfor cycle; %radius is 0.5 divide by 2 qq := punked ((qq) randomized (block_randomisation * uu)) scaled (uniformdeviate(add_scale_factor)+min_scale_factor) rotated (base_rotation + random_rotation / 2 - uniformdeviate(random_rotation) ) shifted ((i,j) randomized (shift_randomisation * uu)); forever: % Repeatedly reduces the size of the image, as this is done round zero it also moves it to the zero location, until it fits in the area exitif xpart (p intersectiontimes qq) < 0; qq:= qq scaled (0.99 ); endfor; if pointinside((i,j),p,outside): % Cleans lines on border, assumably ones outside with jut an edge touching thclean qq; thclean qq; thclean qq; thclean qq; thdraw qq; fi; endfor; endfor; ); clip tmp_pic to p; drawoptions(); draw tmp_pic; enddef; endcode endlayout