[metapost] point "inside" cycle

Werner LEMBERG wl at gnu.org
Tue Apr 23 06:10:59 CEST 2013


> Does MetaPost have a clever way of determining whether a point z is
> "inside" a closed path (cycle) p?

You might play with the `is_clockwise' macro from the `mf2pt1.mp' file
(in the mf2pt1 package).  It has a different purpose, and you have to
simplify it a lot to start from a given point, but the used algorithm
should work just fine.


    Werner


More information about the metapost mailing list