From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/93037 Path: news.gmane.org!not-for-mail From: Context NTG Newsgroups: gmane.comp.tex.context Subject: Re: MetaPost Question Date: Mon, 7 Dec 2015 16:58:29 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1953433188155380987==" X-Trace: ger.gmane.org 1449503973 12034 80.91.229.3 (7 Dec 2015 15:59:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Dec 2015 15:59:33 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Dec 07 16:59:19 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a5yBl-0003oT-6E for gctc-ntg-context-518@m.gmane.org; Mon, 07 Dec 2015 16:58:57 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 240F951B5; Mon, 7 Dec 2015 16:58:45 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6TE6mXyuiOV1; Mon, 7 Dec 2015 16:58:44 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 5EA9551AF; Mon, 7 Dec 2015 16:58:44 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id BC06B51AA for ; Mon, 7 Dec 2015 16:58:43 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OzOyD4b7EMHr for ; Mon, 7 Dec 2015 16:58:42 +0100 (CET) Original-Received: from mail-ob0-f177.google.com (mail-ob0-f177.google.com [209.85.214.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 9CF6251A9 for ; Mon, 7 Dec 2015 16:58:32 +0100 (CET) Original-Received: by obbnk6 with SMTP id nk6so117075847obb.2 for ; Mon, 07 Dec 2015 07:58:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=4cgRUny6ZOyYjeRvFUt/qIwsgyecd7Eo9MWZ+Ka7GVY=; b=ElYhqXR81wnmjdl+6svsRYjOCWXyfVZBFLW7a9t+J/UWoal0M2x8w7WHWrDEWC9OQB Vo87LBs7+eEtAxRPARtaHFWoN2WsGqdFng03OWBKwMmKZIAAA3hcALTnb4YO/vChS6vL /O+IA19rYAHrdEitQgbVt2/q0qvCCKG5c+6RytHcXsG/RH+y1IJDEoynNgucBUROn8A8 N5/qjVKW2bBFGZVZMNma0H57NF6IH7G4Q3vDN2qRuQr3ljfLHNzfdm6ToRvLezgbgVSM wZJusmcazJqJwHRFy5+a3bN0jTDxXmfKYYDZGy+l1koiEfuhPXvHfgivFotdwvlLeF/V /vjA== X-Received: by 10.60.67.234 with SMTP id q10mr22959775oet.73.1449503909943; Mon, 07 Dec 2015 07:58:29 -0800 (PST) Original-Received: by 10.182.177.41 with HTTP; Mon, 7 Dec 2015 07:58:29 -0800 (PST) In-Reply-To: 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:93037 Archived-At: --===============1953433188155380987== Content-Type: multipart/alternative; boundary=001a11c3229ca75817052650edb7 --001a11c3229ca75817052650edb7 Content-Type: text/plain; charset=UTF-8 I guess the code I am looking for is the below to hatch the cut-out section. How can I load the MetaPost hatching package in Context minimals so it understands the hatchfill command? Thanks Jeroen \startMPinclusions input hatching; \stopMPinclusions \starttext \placefigure[here,force][fig:tubing]{Tubular Linear Volumetric Capacity} {\startMPcode % inner circle draw fullcircle xscaled 2.5cm yscaled 0.7cm shifted (1.25cm,0); draw (0,0) -- (0,-5cm) dashed evenly; draw (2.5cm,0) -- (2.5cm,-5cm) dashed evenly; draw fullcircle xscaled 2.5cm yscaled 0.7cm shifted (1.25cm,-5cm) dashed evenly; %outer circle draw fullcircle xscaled 2.9cm yscaled 1cm shifted (1.25cm,0); draw (-.2cm,0) -- (-.2cm,-5cm); draw (2.7cm,0) -- (2.7cm,-5cm); draw halfcircle scaled 2.9cm yscaled 0.012cm shifted (1.25cm,-5cm) dashed evenly; draw halfcircle scaled 2.9cm yscaled 0.012cm rotated 180 shifted (1.25cm,-5cm); %cut-out section hatchfill circle withcolor (45, 5mm, -.5bp); fill fullcircle xscaled 2.5cm yscaled 0.7cm shifted (1.25cm,-2.7cm) withcolor (.6,.6,.6); label.top("tubular",(1.26cm,-1.3cm)); label.top("inside area",(1.28cm,-1.8cm)); label.top("($in^2$)",(1.28cm,-2.4cm)); %arrows and label ID drawarrow (0,-4.1cm) -- (2.5cm,-4.1cm); drawarrow (2.5cm,-4.1cm) -- (0,-4.1cm); label.top("ID ($in$)",(1.26cm,-4.15cm)); %arrows and label tubular length draw (3.25cm,-5cm) -- (3.25cm,0); drawarrow (3.25cm,-5) -- (3.25cm,0); drawarrow (3.25cm,0) -- (3.25cm,-5cm); label.top("tubular length ($in$)",(5.2cm,-2.75cm)); \stopMPcode} \stoptext 2015-12-06 21:54 GMT+01:00 Context NTG : > I am trying to graph a cylinder. Is there a way to draw a more elliptic > top/bottom. This one seems some flattened at the top and bottom. I would > like to hatch the mid elliptic that is collored grey now. Is there a way to > do this. > > Thanks > Jeroen > > > > \placefigure > > [here,force] > > [fig:tubing] > > {Tubular Linear Volumetric Capacity} > > {\startMPcode > > > draw (0,0){up} ... (1.25cm, 2mm) ... (2.5cm,0){down} ... (1.25cm, -2mm) > ... cycle; > > draw (0,0) -- (0,-5cm) dashed evenly; > > draw (2.5cm,0) -- (2.5cm,-5cm) dashed evenly; > > draw (0,-5cm){up} ... (1.25cm, -4.8cm) ... (2.5cm,-5cm){down} ... (1.25cm, > -5.2cm) ... cycle dashed evenly; > > > draw (-.2cm,0){up} ... (1.25cm, 3.5mm) ... (2.7cm,0){down} ... (1.25cm, > -3.5mm) ... cycle; > > draw (-.2cm,0) -- (-.2cm,-5cm); > > draw (2.7cm,0) -- (2.7cm,-5cm); > > draw (-.2cm,-5cm){up} ... (1.25cm, -4.7cm) ... (2.7cm,-5cm){down} dashed > evenly; > > draw (-.2cm,-5cm){down} ... (1.25cm, -5.3cm) ... (2.7cm,-5cm){up}; > > > fill (0,-2.5cm){up} ... (1.25cm, -2.3cm) ... (2.5cm,-2.5cm){down} ... > (1.25cm, -2.7cm) ... cycle withcolor (.6,.6,.6) dashed evenly; > > label.top("tubular",(1.26cm,-1.1cm)); > > label.top("inside area",(1.28cm,-1.6cm)); > > label.top("($in^2$)",(1.28cm,-2.2cm)); > > > draw (3.25cm,-5cm) -- (3.25cm,0); > > drawarrow (3.25cm,-5) -- (3.25cm,0); > > drawarrow (3.25cm,0) -- (3.25cm,-5cm); > > label.top("tubular length ($in$)",(5.2cm,-2.75cm)); > > > \stopMPcode} > --001a11c3229ca75817052650edb7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I guess the code I am looking for is the below to hat= ch the cut-out section. How can I load the MetaPost hatching package in Con= text minimals so it understands the hatchfill command?

=
Thanks
Jeroen

\startMPinclusions

input hatching;

\stopMPinclusions


\starttext


\placefigure[here,force][fig:tubing= ]{Tubular Linear Volumetric Capacity}

{\startMPcode


% inner circle

draw fullcircle xscaled 2.5cm yscal= ed 0.7cm shifted (1.25cm,0);

draw (0,0) -- (0,-5cm) dashed evenl= y;

draw (2.5cm,0) -- (2.5cm,-5cm) dash= ed evenly;

draw fullcircle xscaled 2.5cm yscal= ed 0.7cm shifted (1.25cm,-5cm) dashed evenly;


%outer circle

draw fullcircle xscaled 2.9cm yscal= ed 1cm shifted (1.25cm,0);

draw (-.2cm,0) -- (-.2cm,-5cm);

draw (2.7cm,0) -- (2.7cm,-5cm);

draw halfcircle scaled 2.9cm yscale= d 0.012cm shifted (1.25cm,-5cm) dashed evenly;

draw halfcircle scaled 2.9cm yscale= d 0.012cm rotated 180 shifted (1.25cm,-5cm);


%cut-out section

hatchfill circle withcolor (45, 5mm= , -.5bp);

fill fullcircle xscaled 2.5cm yscal= ed 0.7cm shifted (1.25cm,-2.7cm) withcolor (.6,.6,.6);

label.top("tubular",(1.26= cm,-1.3cm));

label.top("inside area",(= 1.28cm,-1.8cm));

label.top("($in^2$)",(1.2= 8cm,-2.4cm));


%arrows and label ID

drawarrow (0,-4.1cm) -- (2.5cm,-4.1= cm);

drawarrow (2.5cm,-4.1cm) -- (0,-4.1= cm);

label.top("ID ($in$)",(1.= 26cm,-4.15cm));


%arrows and label tubular length

draw (3.25cm,-5cm) -- (3.25cm,0);

drawarrow (3.25cm,-5) -- (3.25cm,0)= ;

drawarrow (3.25cm,0) -- (3.25cm,-5c= m);

label.top("tubular length ($in= $)",(5.2cm,-2.75cm));


\stopMPcode}


\stoptext


2015-12-06 21:54 GMT+01:00 = Context NTG <contextntg@gmail.com>:
I am trying to graph a cylinder. Is the= re a way to draw a more elliptic top/bottom. This one seems some flattened = at the top and bottom. I would like to hatch the mid elliptic that is collo= red grey now. Is there a way to do this.

Thanks
Jeroen



\plac= efigure

[here,force]

[fig:tubing]

{Tubular Linear Volumetric Capacity= }

{\startMPcode


draw (0,0){up} ... (1.25cm, 2mm) ..= . (2.5cm,0){down} ... (1.25cm, -2mm) ... cycle;

draw (0,0) -- (0,-5cm) dashed evenl= y;

draw (2.5cm,0) -- (2.5cm,-5cm) dash= ed evenly;

draw (0,-5cm){up} ... (1.25cm, -4.8= cm) ... (2.5cm,-5cm){down} ... (1.25cm, -5.2cm) ... cycle dashed evenly;


draw (-.2cm,0){up} ... (1.25cm, 3.5= mm) ... (2.7cm,0){down} ... (1.25cm, -3.5mm) ... cycle;

draw (-.2cm,0) -- (-.2cm,-5cm);

draw (2.7cm,0) -- (2.7cm,-5cm);

draw (-.2cm,-5cm){up} ... (1.25cm, = -4.7cm) ... (2.7cm,-5cm){down} dashed evenly;

draw (-.2cm,-5cm){down} ... (1.25cm= , -5.3cm) ... (2.7cm,-5cm){up};


fill (0,-2.5cm){up} ... (1.25cm, -2= .3cm) ... (2.5cm,-2.5cm){down} ... (1.25cm, -2.7cm) ... cycle withcolor (.6= ,.6,.6) dashed evenly;

label.top("tubular",(1.26= cm,-1.1cm));

label.top("inside area",(= 1.28cm,-1.6cm));

label.top("($in^2$)",(1.2= 8cm,-2.2cm));


draw (3.25cm,-5cm) -- (3.25cm,0);

drawarrow (3.25cm,-5) -- (3.25cm,0)= ;

drawarrow (3.25cm,0) -- (3.25cm,-5c= m);

label.top("tubular length ($in= $)",(5.2cm,-2.75cm));


\stopMPcode}


--001a11c3229ca75817052650edb7-- --===============1953433188155380987== 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= --===============1953433188155380987==--