Re: [NTG-context] Hatch an area with Metapost (Metafun)
On Feb 9, 2015, at 1:46 PM, Fabrice
Great, but I did not know the macro numberstriped. Is it a Metapost or Metafun macro?
It is a MetaFun macro in mp-tool, afaik. The idea of filling a path is sometimes clipping to a path. Here is a way to do your task with (almost) only MetaPost: \startMPpage[offset=2mm] path p, q ; p := unitsquare scaled 4cm ; z1 = point 3.6 of p ; q := z1 -- urcorner p -- lrcorner p -- llcorner p -- cycle; for i = 8 step -.5 until 0: draw (i,0)*cm -- (i-4,4)*cm withpen pencircle scaled 2pt withcolor blue; endfor; clip currentpicture to q; draw p ; draw q ; label.llft("B", llcorner p) ; label.lrt ("C", lrcorner p) ; label.ulft("A", ulcorner p) ; label.urt ("D", urcorner p) ; label.lft ("M", z1) ; \stopMPpage …just in case it helps to clarify. John
Hi John, Thank you for that other solution with Metapost. I am in front of learning Metapost and Metafun, I'm still far from mastering! Fabrice
participants (2)
-
Fabrice
-
John Kitzmiller