From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/90183 Path: news.gmane.org!not-for-mail From: John Kitzmiller Newsgroups: gmane.comp.tex.context Subject: Re: Hatch an area with Metapost (Metafun) Date: Mon, 9 Feb 2015 19:07:42 -0500 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/mixed; boundary="===============1392483001==" X-Trace: ger.gmane.org 1423526912 2452 80.91.229.3 (10 Feb 2015 00:08:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Feb 2015 00:08:32 +0000 (UTC) Cc: couvreur.fabrice@wanadoo.fr To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Feb 10 01:08:31 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YKyNR-0004kB-59 for gctc-ntg-context-518@m.gmane.org; Tue, 10 Feb 2015 01:08:29 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 23F7D10229 for ; Tue, 10 Feb 2015 01:08:28 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id xWi9mhY6vwyo for ; Tue, 10 Feb 2015 01:08:27 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 9A7F310231 for ; Tue, 10 Feb 2015 01:07:58 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 06EE3101EA for ; Tue, 10 Feb 2015 01:07:53 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RKdvdY7fZ-Ff for ; Tue, 10 Feb 2015 01:07:52 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 2E0FF101E6 for ; Tue, 10 Feb 2015 01:07:51 +0100 (CET) Original-Received: from bosmailout07.eigbox.net (bosmailout07.eigbox.net [66.96.189.7]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t1A07oRn028635 for ; Tue, 10 Feb 2015 01:07:50 +0100 Original-Received: from bosmailscan15.eigbox.net ([10.20.15.15]) by bosmailout07.eigbox.net with esmtp (Exim) id 1YKyMn-0001y5-Po for ntg-context@ntg.nl; Mon, 09 Feb 2015 19:07:49 -0500 Original-Received: from [10.115.3.31] (helo=bosimpout11) by bosmailscan15.eigbox.net with esmtp (Exim) id 1YKyMn-0003R6-MT for ntg-context@ntg.nl; Mon, 09 Feb 2015 19:07:49 -0500 Original-Received: from bosauthsmtp08.yourhostingaccount.com ([10.20.18.8]) by bosimpout11 with id qQ7m1p0080ASroS01Q7pwt; Mon, 09 Feb 2015 19:07:49 -0500 X-Authority-Analysis: v=2.1 cv=b5M8472x c=1 sm=1 tr=0 a=BF10AaGwQl41phDg7WSPyA==:117 a=zZnF5NfzC91SodgphIyqyQ==:17 a=pq4jwCggAAAA:8 a=QPcu4mC3AAAA:8 a=esbi5I81GEsA:10 a=y85PGfU6AAAA:8 a=C_IRinGWAAAA:8 a=0HtSIViG9nkA:10 a=lfG9WxcOb2p3qloWwV0A:9 a=QEXdDO2ut3YA:10 a=ytAm9NAO0Hrtd3oW9BAA:9 a=JhGUDgrpj6sAUdNx:21 a=_W_S_7VecoQA:10 Original-Received: from c-24-128-163-193.hsd1.nh.comcast.net ([24.128.163.193]:63520 helo=[10.0.0.3]) by bosauthsmtp08.eigbox.net with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim) id 1YKyMj-0008C9-RN; Mon, 09 Feb 2015 19:07:45 -0500 In-Reply-To: X-Mailer: Apple Mail (2.1993) X-EN-UserInfo: 08df34410b47fe835bedcf202d0c2be6:931c98230c6409dcc37fa7e93b490c27 X-EN-AuthUser: kitz@inradius.net X-EN-OrigIP: 24.128.163.193 X-EN-OrigHost: c-24-128-163-193.hsd1.nh.comcast.net X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=66.96.189.7; country=US; region=Massachusetts; city=Burlington; latitude=42.5048; longitude=-71.1956; http://maps.google.com/maps?q=42.5048,-71.1956&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QNOo7OJv - 018f15631e8d - 20150210 (trained as not-spam) Received-SPF: pass (filter2-ams.mf.surf.net: domain of SRS0=LryJq2=C4=inradius.net=kitz@eigbox.net designates 66.96.189.7 as permitted sender) receiver=filter2-ams.mf.surf.net; client-ip=66.96.189.7; envelope-from=; helo=bosmailout07.eigbox.net; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:90183 Archived-At: --===============1392483001== Content-Type: multipart/alternative; boundary="Apple-Mail=_BFC11519-6FBC-4F99-8544-46FC592F8759" --Apple-Mail=_BFC11519-6FBC-4F99-8544-46FC592F8759 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On Feb 9, 2015, at 1:46 PM, Fabrice > wrote: >=20 > Great, but I did not know the macro numberstriped. Is it a Metapost or=20= > 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=3D2mm] path p, q ; p :=3D unitsquare scaled 4cm ; z1 =3D point 3.6 of p ; q :=3D z1 -- urcorner p -- lrcorner p -- llcorner p -- cycle; for i =3D 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 =E2=80=A6just in case it helps to clarify. John= --Apple-Mail=_BFC11519-6FBC-4F99-8544-46FC592F8759 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 On Feb 9, 2015, at 1:46 PM, Fabrice <couvreur.fabrice@wanadoo.fr> wrote:

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=3D2mm]
 path p, = q ;
 p :=3D unitsquare scaled 4cm ;
 z1 =3D point 3.6 of p ;
 q :=3D= z1 -- urcorner p -- lrcorner p -- llcorner p -- cycle;
 for i =3D 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

=E2=80=A6just in case it helps to = clarify.

John
= --Apple-Mail=_BFC11519-6FBC-4F99-8544-46FC592F8759-- --===============1392483001== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============1392483001==--