[Therion] Symbol for fixed ladder
Martin Sluka
martinsluka at mac.com
Wed Jan 25 11:55:06 CET 2017
What is the difference from standard definition?
That standard definition was created to draw steps in caves for tourists where such steps are in different shapes and with irregular width.
Try to modify its source code.
m.
On Jan 25, 2017, at 11:48 AM, Benedikt Hallinger via Therion <therion at speleo.sk> wrote:
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
_______________________________________________
Therion mailing list
Therion at speleo.sk
https://mailman.speleo.sk/listinfo/therion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20170125/382e12f1/attachment.htm>
More information about the Therion
mailing list