This post from January 2014 explains the rectangle with number of steps specified. https://www.mail-archive.com/therion@speleo.sk/msg04814.html Bruce -----Original Message----- From: Therion [mailto:therion-bounces@speleo.sk] On Behalf Of Martin Sluka via Therion Sent: Wednesday, 25 January 2017 7:45 PM To: List for Therion users <therion@speleo.sk> Cc: Martin Sluka <martinsluka@mac.com> Subject: Re: [Therion] Symbol for fixed ladder Isn't there one on wiki? The principle was to draw rectangle and to add the parameter as number of steps. Odesláno z iPhonu 24. 1. 2017 v 23:51, Benedikt Hallinger via Therion <therion@speleo.sk>:
Hello, i get gray hair with metapost while i want to make a line symbol for ladders, so i can nicely draw them in my maps as the cave have alot of them.
The basic idea i had was, t define a symbol of one "rung" segment (rung and a little of either sides, like the letter "H") as a symbol picture. Then i wanted to apply this image seamlessly over the length of the given path (straight lines) What i have for now is the following, however it does not show at all (still shows a red line with symbol set AUT in effect), so i have no clue how to even debug this.
I tried to start with the example from thbook salted a little with peeks to the internal metapost codes.
Can someone assist please?
Thank you very much!
# Symbol for fixed ladder def l_fixedladder_SKBB (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, 1.0u);
pickup PenC; sideL := (-.20u,0)--(-.20u,0.20u); sideR := (.20u,0)--(.20u,0.20u); rung := (-.20u,0.10u)--(.20u,0.10u);
picture symbol,test_symbol; symbol:= image ( thdraw sideL; thdraw sideR; thdraw rung; );
forever: t := arctime cas of P; thdraw symbol shifted (point t of P) withcolor black; cas := cas + mojkrok; exitif cas > dlzka + (mojkrok / 3); % for rounding errors endfor;
enddef;
_______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion