[Gllug] Algorithm question

Richard Jones rich at annexia.org
Wed Feb 28 13:19:38 UTC 2007


On Wed, Feb 28, 2007 at 12:36:26PM -0000, Adrian McMenamin wrote:
> On Wed, February 28, 2007 12:29 pm, Adrian McMenamin wrote:
> > Slighty off-topic but FWIW: the perl module I used
> > Math::NumberCruncher::InPolygon - is buggy as it fails on (some of) the
> > boundary conditions - correctly identifies (0, 0, 0) as in the (0, 0, 0)
> > (255, 255, 255) polygon, but fails when either x, y or z are 255.
> >
> Sorry, should make it clear its is only being called in two dimensions - I
> get the three dimensions by calling it twice - once for x, y and once for
> y, z

I'm not so sure that's going to work ...  Why (y, z) rather than (x,
z) for example?

Anyway, is your cube arbitrarily rotated in space, or is it lined by
with the axes?  The latter case is considerably easier to deal with.

Rich.

-- 
Richard Jones
Red Hat UK Limited
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list