ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: MetaPost/Fun question
Date: Sat, 22 Mar 2003 22:23:12 +0100	[thread overview]
Message-ID: <5.1.0.14.1.20030322222005.026b1b68@server-1> (raw)
In-Reply-To: <313833401.20030322215940@iol.it>

At 09:59 PM 3/22/2003 +0100, you wrote:
>Hello,
>
>I would like to know if it is possible in MetaPost (in particular
>MetaFun) to get all the possible intersection points of the paths,
>with some kind of simple command, with a syntax like, say:
>
>A[] := path1 intersections path2
>
>(where the resulting list could be either a list of points or a
>list of time pairs, like for intersectiontimes).
>
>Another possible syntax could be
>
>path3 := path1 intersections path2
>
>which would give a path for which times 0, 1, 2, 3, ... give the
>first, second, third, fourth, ... intersection point.
>
>Anything like this?

not that i know, but assuming that those path have some distance, i can 
imagine dividing a path in parts and determining the intersectionpoints iof 
the pieces;

delta := .25 ;

for i=0 step delta upto length(p)-delta :
   if intersection_found(1,subpath(i,i+.1) of p) :
     store point
   fi ;
endfor ;

.....


Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

  reply	other threads:[~2003-03-22 21:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-22 20:59 Giuseppe Bilotta
2003-03-22 21:23 ` Hans Hagen [this message]
2003-03-22 21:32   ` Re[2]: " Giuseppe Bilotta
2003-03-22 23:35     ` Emil Hedevang Lohse
2003-03-23 13:34       ` Re[4]: " Giuseppe Bilotta
2003-03-24 12:53         ` Guy Worthington
2003-03-24 13:49           ` Giuseppe Bilotta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5.1.0.14.1.20030322222005.026b1b68@server-1 \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).