From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/35022 Path: news.gmane.org!not-for-mail From: "Mojca Miklavec" Newsgroups: gmane.comp.tex.context Subject: Re: z0---z1---z2---z3---cycle strange effect Date: Thu, 14 Jun 2007 10:59:40 +0200 Message-ID: <6faad9f00706140159v23817b5rca6b097254d6eaca@mail.gmail.com> References: <9EEBE97E-5DDF-4FA6-A72A-9C2693CAF939@suddenlink.net> 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: sea.gmane.org 1181811619 31282 80.91.229.12 (14 Jun 2007 09:00:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Jun 2007 09:00:19 +0000 (UTC) Cc: Taco Hoekwater To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Thu Jun 14 11:00:15 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1HylBb-00082g-Bp for gctc-ntg-context-518@m.gmane.org; Thu, 14 Jun 2007 11:00:11 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1F8A21FD59; Thu, 14 Jun 2007 11:00:06 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 26611-02; Thu, 14 Jun 2007 10:59:53 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5AA8B1FCD9; Thu, 14 Jun 2007 10:59:52 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1E08F1FCD9 for ; Thu, 14 Jun 2007 10:59:49 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 23515-05-8 for ; Thu, 14 Jun 2007 10:59:42 +0200 (CEST) Original-Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.231]) by ronja.ntg.nl (Postfix) with ESMTP id 3DB8D1FBF1 for ; Thu, 14 Jun 2007 10:59:42 +0200 (CEST) Original-Received: by wr-out-0506.google.com with SMTP id i21so439753wra for ; Thu, 14 Jun 2007 01:59:41 -0700 (PDT) Original-Received: by 10.143.15.14 with SMTP id s14mr82817wfi.1181811580121; Thu, 14 Jun 2007 01:59:40 -0700 (PDT) Original-Received: by 10.143.16.4 with HTTP; Thu, 14 Jun 2007 01:59:40 -0700 (PDT) In-Reply-To: <9EEBE97E-5DDF-4FA6-A72A-9C2693CAF939@suddenlink.net> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:35022 Archived-At: On 6/5/07, David Arnold wrote: > All, > > In working through the beginning chapters of the metafun manual, I am > getting a very unusual effect when I open the resulting pdf file in > Preview on Mac OS X. Here's a snapshot of what I see. > > http://online.redwoods.edu/instruct/darnold/context/meta.gif > > In acrobat, it looks fine. > > http://online.redwoods.edu/instruct/darnold/context/meta.pdf > > Any thoughts? Hello, It all boils down to \starttext \startMPcode z0 = (0.5cm,1.5cm) ; z1 = (2.5cm,2.5cm) ; z2 = (6.5cm,0.5cm) ; z3 = (2.5cm,1.5cm) ; draw z0---z1---z2---z3---cycle withpen pencircle scaled 5pt; \stopMPcode \stoptext resulting in newpath 14.17323 42.51968 moveto 14.17139 42.52553 70.85913 70.86505 70.86613 70.86613 curveto 70.88313 70.86877 184.25645 14.18352 184.25194 14.17323 curveto 184.2461 14.15994 70.87599 42.51889 70.86613 42.51968 cureveto 70.86118 42.52008 14.17513 42.5137 14.17323 42.51968 curveto closepath If you ask me, this looks pretty much like a rendering bug in Mac's Preview (if anyone bothers about that, please do that), but on the other hand metapost could have generated a shorter & cleaner output as well: newpath 14.17323 42.51968 moveto 70.86613 70.86613 lineto 184.25194 14.17323 lineto 70.86613 42.51968 lineto 14.17323 42.51968 lineto closepath I suspect that the problem lies in control points of bezier curve which are way too close to original points and thus lead to problems with numerical precision, but I didn't experiment much deeper, so my assumption might be wrong. Taco? Mojca PS: I'm using mp 0.993 from TeXLive, but Supelec was down, so I wasn't able to try it with the latest metapost version. > \setuppapersize[S6][S6] > > \usetypescriptonce [map] [times,helvetica,palatino] [texnansi] > \usetypescriptonce [serif] [times] [name,texnansi] > \usetypescriptonce [sans] [helvetica] [name,texnansi] > \usetypescriptonce [palatino] [texnansi] > > \setupbodyfont [palatino,10pt] > > \startbuffer[mpenv] > \startMPenvironment > \usetypescriptonce[map][times,helvetica,palatino][texnansi] > \usetypescriptonce[serif][times][name,texnansi] > \usetypescriptonce[sans][helvetica][name,texnansi] > \usetypescriptonce[palatino][texnansi] > \setupbodyfont[palatino,10pt] > \definefont[RotFont][RegularBold] > \stopMPenvironment > \stopbuffer > > \definefont[RotFont][RegularBold] > > \getbuffer[mpenv] > > \setupcolors[state=start] > > \starttext > > \startuseMPgraphic{axis} > tickstep := 1cm ; ticklength := 2mm ; > drawticks unitsquare xscaled 8cm yscaled 3cm ; > tickstep := tickstep/2 ; ticklength := ticklength/2 ; > drawticks unitsquare xscaled 8cm yscaled 3cm ; > \stopuseMPgraphic > > \startuseMPgraphic{points} > z0 = (0.5cm,1.5cm) ; z1 = (2.5cm,2.5cm) ; > z2 = (6.5cm,0.5cm) ; z3 = (2.5cm,1.5cm) ; > \stopuseMPgraphic > > \startuseMPgraphic{path} > str := "z0---z1---z2---z3---cycle" ; > \stopuseMPgraphic > > \startbuffer > \startlinecorrection[blank] > \startMPcode > string str ; defaultfont := "\truefontname{Mono}" ; > \includeMPgraphic{axis} > \includeMPgraphic{points} > \includeMPgraphic{path} > label.lft(str,(14.5cm,2.5cm)) ; > drawwholepath scantokens(str) ; > \stopMPcode > \stoplinecorrection > \stopbuffer > > \getbuffer > > > \stoptext ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________