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 | [EMAIL PROTECTED] 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 -------------------------------------------------------------------------

_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to