From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/54738 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: Metapost - Seems like weird behavior. Is it a bug? Date: Wed, 25 Nov 2009 08:41:03 +0100 Message-ID: <4B0CDF8F.30404@elvenkind.com> References: <3b4b12310911242045l29326562t10e13387ce56b2cb@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1259134884 30408 80.91.229.12 (25 Nov 2009 07:41:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Nov 2009 07:41:24 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Nov 25 08:41:15 2009 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.50) id 1NDCUz-0001Q3-Pd for gctc-ntg-context-518@m.gmane.org; Wed, 25 Nov 2009 08:41:13 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D3988C9BC4; Wed, 25 Nov 2009 08:38:25 +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 akfHwlaxiMgM; Wed, 25 Nov 2009 08:38:22 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7B27CC9BAE; Wed, 25 Nov 2009 08:38:22 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3D9F1C9BAE for ; Wed, 25 Nov 2009 08:38:21 +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 zT6eX0kRO86m for ; Wed, 25 Nov 2009 08:38:18 +0100 (CET) Original-Received: from smtp-vbr6.xs4all.nl (smtp-vbr6.xs4all.nl [194.109.24.26]) by balder.ntg.nl (Postfix) with ESMTP id E4C15C9BA1 for ; Wed, 25 Nov 2009 08:38:18 +0100 (CET) Original-Received: from [192.168.178.26] (boo.demon.nl [82.161.175.147]) (authenticated bits=0) by smtp-vbr6.xs4all.nl (8.13.8/8.13.8) with ESMTP id nAP7f3wW057778 for ; Wed, 25 Nov 2009 08:41:04 +0100 (CET) (envelope-from taco@elvenkind.com) User-Agent: Thunderbird 2.0.0.21 (X11/20090330) In-Reply-To: X-Virus-Scanned: by XS4ALL Virus Scanner 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:54738 Archived-At: luigi scarso wrote: > On Wed, Nov 25, 2009 at 5:45 AM, Curiouslearn wrote: >> The code below shows a cyclic path that I am interested in creating >> (it is in red if you run the code). The example works fine as long as >> I have, u:=1cm, as in the code below. But if I replace it by , >> u:=0.6cm, there is no output. There is an error saying that paths 4 >> and 3 do not intersect. Is this a bug? More a 'known limitation': intersection point calculations are not perfect because of the fixed precision calculus. Lint[4] is the culprit. With u=0.6cm it has these coordinates: (170.07976,0.00014). Notice how the y coordinate is not actually on the xaxis? That is because the actual intersection between stLine and xaxis does not fit nicely into a scaled pair, so metapost takes the 'closest approximation', which in this case is slightly off both lines. The solution is to add an explicit fix to Lint[4] just after its current assignment: Lint[4]:=(xpart Lint[4], 0); This is not pretty, and one of the problems we hope to solve with metapost 2.0. Best wishes, Taco ___________________________________________________________________________________ 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 ___________________________________________________________________________________