[Therion] Symbol for fixed ladder

Benedikt Hallinger beni at hallinger.org
Wed Jan 25 11:46:31 CET 2017


Hello again,
my idea somewhat worked... see attached picture.

The ladder segments are overlapping, this is still hacky.
However it gives me the desired result and also works with curved lines.

An optimisation cold be to draw the outer sides just as a single line 
following the Path slope, however
i have (yet) no idea how to code this in metapost.


What do you think of the results?

current code is as following:
---------------------
def l_fixedladder_SKBB (expr P) =
       pair Pp;
       pair Pd;
       pair Pv;
       T:=identity;
       cas := 0;
       dlzka := arclength P;
       mojkrok:=adjust_step(dlzka, 0.6u);
       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.5u * Pv + 0.5u * Pd) --  % left side
                (Pp + 0.5u * Pv - 0.5u * Pd);
         thdraw (Pp - 0.5u * Pv + 0.5u * Pd) --  % right side
                (Pp - 0.5u * Pv - 0.5u * Pd);
         thdraw (Pp - 0.5u * Pv) --              % rung
                (Pp + 0.5u * Pv);
         cas := cas + mojkrok;
         exitif cas > dlzka - (2*mojkrok/3); % for rounding errors
       endfor;
     enddef;
     let l_fixedladder_AUT = l_fixedladder_SKBB ;  % code in AUT übernehmen
     initsymbol("l_fixedladder_AUT");              % Symbol bereitstellen

---------------------


Am 2017-01-25 10:58, schrieb Martin Sluka via Therion:
>> 2. the width is too much for my taste and the relation to the height of 
>> the rung-spacing.
>
> Draw more narrow rectangle. BTW it couldn’t be only rectangle. It could be 
> s-shape, etc.
>
> m.
> _______________________________________________
> Therion mailing list
> Therion at speleo.sk
> https://mailman.speleo.sk/listinfo/therion
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ladder1.jpg
Type: application/octet-stream
Size: 12703 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20170125/0fdb94b8/attachment.obj>


More information about the Therion mailing list