[Gllug] Algorithm question

Adrian McMenamin adrian at newgolddream.dyndns.info
Tue Feb 27 00:44:54 UTC 2007


On Mon, 2007-02-26 at 23:26 +0000, Richard Jones wrote:
> On Mon, Feb 26, 2007 at 10:43:45PM +0000, Adrian McMenamin wrote:
> > I need to find an algorithm that will determine whether a cartesian
> > point is inside a cube. Happy to look on google for such a thing, but I
> > don't even know what it is called ... can anyone help (if you can find
> > me a CAPAN module that does this even better, but I doubt whether one
> > exists as I have been looking for some time now)
> 
> Google: distance point to plane
> 
Actually I discovered that there is a package in CPAN which determines
whether or not a 2D point falls within a polygon.

I am now checking if the point (x, y, z) (actually R,G,B - I am trying
to do a median cut quantization) falls in the polygon defined by X Y and
then in the polygon defined Y Z.

That should work shouldn't it?

-------------- 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