From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/50040 Path: news.gmane.org!not-for-mail From: Peter Rolf Newsgroups: gmane.comp.tex.context Subject: Re: How can I compare picture variables in metapost? Date: Tue, 05 May 2009 23:42:08 +0200 Message-ID: <4A00B2B0.2080008@gmx.net> References: <769ba7780905050527o4f42f9acod279bcce641189c@mail.gmail.com> <4A00366A.1040907@elvenkind.com> <769ba7780905050651l6c8601aer421b04c1b7e1c20c@mail.gmail.com> <4A00556C.5000503@elvenkind.com> <769ba7780905050819o68b79a5ek4741bfbb6fded7b6@mail.gmail.com> <4A0063F6.3050408@elvenkind.com> <4A006F29.70801@elvenkind.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 1241559826 4388 80.91.229.12 (5 May 2009 21:43:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 May 2009 21:43:46 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue May 05 23:43:36 2009 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 1M1SQH-0006rN-4D for gctc-ntg-context-518@m.gmane.org; Tue, 05 May 2009 23:43:33 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8AE6A1FC01; Tue, 5 May 2009 23:43:32 +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 30554-08; Tue, 5 May 2009 23:42:49 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 237191FC87; Tue, 5 May 2009 23:42:49 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 39A041FC87 for ; Tue, 5 May 2009 23:42:36 +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 22848-05-2 for ; Tue, 5 May 2009 23:42:25 +0200 (CEST) Original-Received: from filter1-nij.mf.surf.net (filter1-nij.mf.surf.net [195.169.124.152]) by ronja.ntg.nl (Postfix) with ESMTP id 8F5B91FC82 for ; Tue, 5 May 2009 23:42:23 +0200 (CEST) Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by filter1-nij.mf.surf.net (8.13.8/8.13.8/Debian-3) with SMTP id n45LgCqH012825 for ; Tue, 5 May 2009 23:42:12 +0200 Original-Received: (qmail invoked by alias); 05 May 2009 21:42:11 -0000 Original-Received: from i577BD24C.versanet.de (EHLO [192.168.1.3]) [87.123.210.76] by mail.gmx.net (mp066) with SMTP; 05 May 2009 23:42:11 +0200 X-Authenticated: #24293357 X-Provags-ID: V01U2FsdGVkX18krgMjbvQkPtX5a/1a8OtOvRgDxdkozFjkKFF+/k qqVpNtyguqkgfd User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <4A006F29.70801@elvenkind.com> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.6899999999999999 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.165.64.20; country=DE; region=01; city=Karlsruhe; latitude=49.0047; longitude=8.3858; http://maps.google.com/maps?q=49.0047,8.3858&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 219803097 - 0dd3c58520ef - 20090505 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.152 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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:50040 Archived-At: Taco Hoekwater schrieb: > Taco Hoekwater wrote: >> Zhichu Chen wrote: >>> >>> Seems that I don't have too many choices. Maybe using lua to do the >>> math and throwing the result to metapost is faster? I think I can do >>> this, but I don't know how. The documents are a little limited. >> >> For circles, probably lua calculations will be faster because the >> data manipulation will be a bit easier. But for non-circle paths, >> you are better off with a metapost solution because of lua not >> knowing about the actual paths. > > linear search does seem to do that badly, here is a stub: > Mhh... isn't it easier to just test, if the distance (centerpoint to centerpoint) from the new circle to all already found circles is greater (or equal) than the sum of the radii? Anyhow an interesting and hard problem (I guess O(n!) ? ). Best wishes, Peter ___________________________________________________________________________________ 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 ___________________________________________________________________________________