Hatch an area with Metapost (Metafun)
Hi, How hatched trapezoid MBCD ? Best regards, Fabrice \starttext \startMPcode path p ; p=unitsquare scaled 4cm ; draw p ; pair z ; z=point 3.6 of p ; draw z--urcorner p ; label.llft(btex B etex,llcorner p) ; label.lrt(btex C etex,lrcorner p) ; label.ulft(btex A etex,ulcorner p) ; label.urt(btex D etex, urcorner p) ; label.lft(btex M etex, z) ; \stopMPcode \stoptext
On 2/9/2015 3:30 PM, Fabrice Couvreur wrote:
Hi, How hatched trapezoid MBCD? Best regards, Fabrice
\starttext \startMPcode path p ; p=unitsquare scaled 4cm ; draw p ; pair z ; z=point 3.6 of p ; draw z--urcorner p ; label.llft(btex B etex,llcorner p) ; label.lrt(btex C etex,lrcorner p) ; label.ulft(btex A etex,ulcorner p) ; label.urt(btex D etex, urcorner p) ; label.lft(btex M etex, z) ; \stopMPcode \stoptext
\startMPpage[offset=2pt] path p, q, r ; pair z ; p := unitsquare scaled 4cm ; z := point 3.6 of p ; q := z--urcorner p ; r := q -- reverse bottomboundary p -- cycle ; draw p ; draw q ; draw r numberstriped (.25,10,5) withcolor blue ; draw thetextext.llft("B", llcorner p) ; draw thetextext.lrt ("C", lrcorner p) ; draw thetextext.ulft("A", ulcorner p) ; draw thetextext.urt ("D", urcorner p) ; draw thetextext.lft ("M", z) ; \stopMPpage ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hi Hans, Great, but I did not know the macro numberstriped. Is it a Metapostor Metafun macro? Fabrice
On 2/9/2015 7:22 PM, Fabrice wrote:
Hi Hans, Great, but I did not know the macro numberstriped. Is it a Metapostor Metafun macro?
yes ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hi Hans, Is it possible to have some explanation of the parameters of the macro numberstriped(#1,#2,#3) ? How to have horizontal hatching ? (How to change the slope hatching ?) I just noticed that the position of labels is not quite the same when using macros and macro Metafun Metapost: I think the labels are too near to the corners of the square with the macro Metafun. thank you, Fabrice
participants (3)
-
Fabrice
-
Fabrice Couvreur
-
Hans Hagen