From: Alan BRASLAU <alan.braslau@cea.fr>
To: ntg-context@ntg.nl
Cc: Taco Hoekwater <taco@elvenkind.com>, Marco <netuse@lavabit.com>
Subject: Re: Metapost: union test of two paths
Date: Sat, 3 Jul 2010 12:33:31 +0200 [thread overview]
Message-ID: <201007031233.31968.alan.braslau@cea.fr> (raw)
In-Reply-To: <4C2EEED4.1010300@elvenkind.com>
On Saturday 03 July 2010 10:03:32 Taco Hoekwater wrote:
> On 07/02/2010 07:01 PM, Marco wrote:
> > Hi,
> >
> > two arbitrary paths are given. A small path and a larger path, both
> > cycled. How to find out if the smaller path lies completely »inside« the
> > larger path?
>
> That is hard. The main problem is the word 'arbitrary'. An arbitrary
> path does not even have to enclose anything:
>
> path p; p = origin--(100,100)--cycle;
>
> > If this is too complicated, it might help if I can find out if a given
> > point lies inside a given cycled path.
>
> Even this is fairly tricky. Some important questions are:
>
> * do your arbitrary paths selfintersect?
> * are your arbitrary paths convex or concave?
> * is a point *on* the path in or out?
> * do you want to use nonzero or even-odd filling rules?
>
> Best wishes,
> Taco
OK, this is off-topic (and not very useful as an answer)...
but is something to think about:
``posito tendendum esse a puncto ad punctum, licet nihil ultra iter
determinat, via eligetur maxime facilis seu brevissima;''
Leibniz: De rerum originatione radicali, 1697
``suppose that we are to go from one point to another, without being directed
to follow a particular path, the path chosen will be the easiest or the
shortest one;''
So, in a Cartesian space, if the energy cost of a kink is low, than
> path p; p := origin--(100,100)--cycle;
should be a straight line running back on itself.
Indeed, this is what metapost produces.
Now try p := origin..(100,100)..cycle;
Alan
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2010-07-03 10:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-02 17:01 Marco
2010-07-03 8:03 ` Taco Hoekwater
2010-07-03 10:19 ` Taco Hoekwater
2010-07-03 13:34 ` Taco Hoekwater
2010-07-03 14:54 ` Marco
2010-07-03 23:11 ` Marco
2010-07-04 6:47 ` Taco Hoekwater
2010-07-04 8:09 ` Marco
2010-07-04 8:21 ` Taco Hoekwater
2010-07-03 10:33 ` Alan BRASLAU [this message]
2010-07-03 13:36 ` Taco Hoekwater
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=201007031233.31968.alan.braslau@cea.fr \
--to=alan.braslau@cea.fr \
--cc=netuse@lavabit.com \
--cc=ntg-context@ntg.nl \
--cc=taco@elvenkind.com \
/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).