MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Polygon with holes

  • To: mathgroup at
  • Subject: [mg97598] Re: Polygon with holes
  • From: Harrie Kraai <hakraai at>
  • Date: Mon, 16 Mar 2009 06:27:46 -0500 (EST)
  • References: <gp5fn9$9mc$> <gp7vsh$1cv$> <gpda77$jmv$>

Hi ragfield, I did some tests and you are right. Thanks a lot.


ragfield wrote:
> On Mar 12, 5:42 am, Harrie Kraai <hakr... at> wrote:
>> Thanks for this suggestion. However, (as you are porbably aware) it does
>> not work so easily for arbitrary polygons. The connection between inner
>> and outer contours is made by a straight line. A general algorithm would
>> have to select the points to be connected and make sure that the
>> connection itself does not intersect the contours. There should also be
>> a check on the orientations. Making two or more holes would complicate
>> things further.
> It shouldn't matter whether the lines cross the contours or not, so
> long as the exact same line is followed in reverse order at the end
> (which my earlier example does).  It's possible the implementation of
> this algorithm in Mathematica code I provided earlier has a bug (I
> didn't test it thoroughly, if you have an example where it fails I'd
> be interested in seeing it), but the algorithm works and is completely
> general.
> Mathematica's built-in PDF import support appears to use the same
> algorithm for converting arbitrary multi-contour PDF paths into
> Mathematica Polygon primitives. Take a look at:
> Import["ExampleData/mathematica.pdf"]
> Notice the output for the "e", "a", and "i" characters.  The only
> caveat (of which I'm aware) of using this algorithm is that if you try
> to print a graphic containing one of these polygons to a PostScript
> printer, some PostScript printers will interpret the 0-width segment
> to be 1 device pixel wide (so lines do appear even though they cover
> zero area).
>> As I expected there seems to be no simple facility available. This could
>> be a feature request for wolfram. How do I submit one?
> Try this:
> -Rob

  • Prev by Date: Re: importing fixed width data
  • Next by Date: Re: identical rows in tables
  • Previous by thread: Re: Polygon with holes
  • Next by thread: Re: Quantum Mathematica sneak preview of commutator and operator