[Therion] A bunch of symbols needed

Andrew Atkinson andrew at wotcc.org.uk
Thu Jan 3 16:07:42 CET 2019



On 03/01/2019 02:20, Bill Gee via Therion wrote:
> I was at the cave a few days ago.  I think I will need symbols for the following items:
> 
> Tiled floor

You can use the blocks code I have been working on

https://therion.speleo.sk/wiki/metapost#customisable_area_blocks_with_different_number_of_sides

For squares use

symbol_distance:=0.85; % Distance between the blocks as set out in a
rectangular grid
block_randomisation:=0; % Max each point of the base block can be moved.
Too big and they can intersect themselves
base_rotation:= 45; % Rotation from 0 of base block, can be used to set
all blocks to the same angle
random_rotation:= 0; % Rotation either side of base rotation eg 20 will
be plus or minus 10 each side
min_scale_factor:=1; % Minimum multiplier used for the base shape
add_scale_factor:= 0; % Added to the minimum multiplier to get the
maximum scale
block_rectangle:=1; % How much longer the block is than it is wide,
before randomising
shift_randomisation:=0; % Max random amount block can be moved from the
original grid
%Now set the proportions of different sided block
b_tri:=0;
b_quad:=1;
b_pent:=0;
b_hex:=0;

If you do not want the grouting (gaps) use symbol_distance:=0.707;

This misses out all the ones on the edge

To improve this a bit change

exitif xpart (p intersectiontimes qq) < 0;

to

exitif xpart (p intersectiontimes qq) < 10;

This does not fix if fully to do that you will need to comment out, or
remove 2 more lines

            %if pointinside((i,j),p,outside): % Cleans lines on border,
assumably ones outside with just an edge touching
               thclean qq;
               thclean qq;
               thclean qq;
               thclean qq;
               thdraw qq;
            %fi;

I really wish I knew exactly what this line did, but I just copied it
from another area blocks.

Hexagons also tessellate giving a nice effect, but need code
modification to align

These settings

symbol_distance:=0.95; % Distance between the blocks as set out in a
rectangular grid
block_randomisation:=0; % 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:= 0; % Rotation either side of base rotation eg 20 will
be plus or minus 10 each side
min_scale_factor:=1; % Minimum multiplier used for the base shape
add_scale_factor:= 0; % Added to the minimum multiplier to get the
maximum scale
block_rectangle:=1; % How much longer the block is than it is wide,
before randomising
shift_randomisation:=0; % Max random amount block can be moved from the
original grid
%Now set the proportions of different sided block
b_tri:=0;
b_quad:=0;
b_pent:=0;
b_hex:=1;

and put this bit of code in the appropriate place (first and last 2
lines not modified

iu := uu * block_rectangle;
blocks := b_tri+b_quad + b_pent + b_hex;
k:=0;
tmp_pic := image(
   for i = xpart llcorner q step (symbol_distance * block_rectangle *
uu) until xpart urcorner q:
      k:=k+1;
      for j = ypart llcorner q step (symbol_distance*uu) until ypart
urcorner q:
        m:= j- (k mod 2) * 0.5 * uu * symbol_distance;
        pick_sides := uniformdeviate(blocks);
        if pick_sides < b_tri:

Plus 16 lines later on change (j to an m)

          shifted ((i ,j) randomized (shift_randomisation * uu));

to

          shifted ((i ,m) randomized (shift_randomisation * uu));


> 
> Hand rails

https://therion.speleo.sk/wiki/metapost#line_-_hand_rail

I've been meaning to put this one up for a while, so thanks for the prod

Good luck

Andrew



More information about the Therion mailing list