From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/70222 Path: news.gmane.org!not-for-mail From: Peter Rolf Newsgroups: gmane.comp.tex.context Subject: Re: metapost question (bug?) Date: Fri, 22 Jul 2011 11:35:25 +0200 Message-ID: <4E29445D.3020504@gmx.net> References: <20110721143941.GC5493@iram-ha-003840.extra.cea.fr> <4E284844.6050709@gmx.net> <20110721212156.GA20841@drec-ha-002479.extra.cea.fr> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1311327345 24253 80.91.229.12 (22 Jul 2011 09:35:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 22 Jul 2011 09:35:45 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jul 22 11:35:41 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QkC8z-00033y-6B for gctc-ntg-context-518@m.gmane.org; Fri, 22 Jul 2011 11:35:41 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5B536CAE64; Fri, 22 Jul 2011 11:35:40 +0200 (CEST) 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 Z8IcX-sf84Vh; Fri, 22 Jul 2011 11:35:36 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 76085CAE58; Fri, 22 Jul 2011 11:35:36 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 13B87CAE58 for ; Fri, 22 Jul 2011 11:35:35 +0200 (CEST) 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 kcsPR6rOlkmH for ; Fri, 22 Jul 2011 11:35:32 +0200 (CEST) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id C4939CAE55 for ; Fri, 22 Jul 2011 11:35:32 +0200 (CEST) Original-Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with SMTP id p6M9ZV1j015392 for ; Fri, 22 Jul 2011 11:35:31 +0200 Original-Received: (qmail invoked by alias); 22 Jul 2011 09:35:31 -0000 Original-Received: from ip-178-200-248-30.unitymediagroup.de (EHLO [192.168.178.3]) [178.200.248.30] by mail.gmx.net (mp063) with SMTP; 22 Jul 2011 11:35:31 +0200 X-Authenticated: #24293357 X-Provags-ID: V01U2FsdGVkX1/BSKof3jXBHGiyqtTs6DLC/ZwvJipkX8fbwJ3/18 U+ExSKoA0lScaF User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 In-Reply-To: <20110721212156.GA20841@drec-ha-002479.extra.cea.fr> X-Enigmail-Version: 1.2 X-Y-GMX-Trusted: 0 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.165.64.23; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 06FaVzvua - aaf1ca3f4466 - 20110722 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:70222 Archived-At: Am 21.07.2011 23:21, schrieb Alan Braslau: > On Thu, Jul 21, 2011 at 05:39:48PM +0200, Peter Rolf wrote: >> use >> >> p2 := p0 & p1; >> >> the reason for the 'unexpected' output is, that point 1 and 2 of the >> path p2 are equal. keep in mind that drawing with an asymmetrical pen >> has its own (complex) rules. > > Thank you -- I forgot about the path operator & > same here (i had to browse the metapost manual for the operator) :-) > (Funny thing, though, that the problem shows up with point 0. I would also think that having two consecutive identical points, although poor style, should not cause problems as it does.) > i guess it has to do with the fact, that 'drawing' with non circular pens always results in a *filled* path. metapost is calculating new points for the shape, instead of just storing the given path points and the pen size (like in a normal pencircle draw). and if a filled path is intersecting with itself, funny things can happen. well, most times not that funny (because unwanted). probably not the best example (not drawn, no special pen), but it gives a first impression of what is going on. \startTEXpage \startMPcode path p[]; p0 := unitcircle scaled 10cm; p1 := p0 scaled .5; p2 := p0 -- reverse(p1) -- cycle; fill p2; \stopMPcode \stopTEXpage depending on their direction (clockwise or counter clockwise) and location (intersection or not) such path 'cycles' are cleared or filled. with this trick you are able to produce punches as in the glyphs of "O" or "e". if you like and have the time you can debug your example (simply add a loop that draws all points and labels them). you will then see the difference between a drawn (pencircle) and a 'drawn' (non circular pen) path. ;-) > And yes, the use of an asymmetrical pen is indeed the whole point of this figure -- I am using metapost to achieve very easily an effect, conceptually very simple, that a colleague has not been able to produce using Adobe Illustrator. > > Thank you again for helping out. > my pleasure. Peter > Alan > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ > ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________