I would like to be able (during development) to draw paths where the points of the path (and maybe thing slike directions) are visualised. E.g. a path where each pair in teh path is also drawn as a dot and maybe teh directions drawn as small arrows. Does someone have such a beast lying around? G
Would Chapter 11, section 11.1 Showing Paths of the MetaPost manual, be any help here? Below is a MWE of a random path of curves and straight lines. The points are shown using drawpoints. The arrow path and control lines are also shown and are better described in the Metapost manual. %%%%%%%%%%%%MWE%%%%%%%%%%% \setuppapersize [A4,landscape] \starttext \startMPpage[instance=doublefun] StartPage; width := PaperWidth ; height := PaperHeight ; unit := cm ; path p ; path pat; pat := (5cm,5cm); for a = 1 step 1 until 10: x:= uniformdeviate(10) +10; y:= uniformdeviate(10) +10; if odd a: pat := pat .. (x*cm,y*cm); else: pat := pat -- (x*cm,y*cm); fi; draw pat withpen pencircle scaled 5mm withcolor .5green; endfor; drawarrowpath pat; drawpoints pat; drawcontrollines pat withcolor .625red ; StopPage; \stopMPpage \stoptext %%%%%%%%%%%%%%% end MWE %%%%%%%%%%%%%%%%% A better coder than me may be able to incorporate it into what you require. Best Wishes Keith McKay On 28/05/2020 12:33, Gerben Wierda wrote:
I would like to be able (during development) to draw paths where the points of the path (and maybe thing slike directions) are visualised. E.g. a path where each pair in teh path is also drawn as a dot and maybe teh directions drawn as small arrows.
Does someone have such a beast lying around?
G ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
participants (2)
-
Gerben Wierda
-
Keith McKay