[NTG-context] 'debug' version of METAPOST draw?
mckaymeister at gmail.com
Thu May 28 21:24:52 CEST 2020
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.
width := PaperWidth ; height := PaperHeight ; unit := cm ;
path p ;
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);
pat := pat -- (x*cm,y*cm);
draw pat withpen pencircle scaled 5mm withcolor .5green;
drawcontrollines pat withcolor .625red ;
%%%%%%%%%%%%%%% end MWE %%%%%%%%%%%%%%%%%
A better coder than me may be able to incorporate it into what you require.
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?
> If your question is of interest to others as well, please add an entry to the Wiki!
> maillist : ntg-context at 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ntg-context