foreach ($coordsA as $coord)
$pA->addv ($coord, $coord);
foreach ($coordsB as $coord)
$pB->addv ($coord, $coord);
// Check whether B is inside A
// This should return TRUE but instead returns FALSE
var_dump ($pA->isPolyInside ($pB));
If i change $point_at_infinity in polygon->isInside() to be 10000000 vs -10000000 as it is originally then it works correctly, HOWEVER this causes failures in other scenario's that would normally work.
I'm not certain what the problem is as i haven't gone as far as understanding the maths behind it, but i can't seem to get it working correctly in all situations regardless of what i try
Andy Burton - 2013-07-08 11:48:30 - In reply to message 1 from Andy Burton
For the help of anyone else in the future i've debugged this and altering the polygon->ints method to re-calculate and check the intersection after the perturb method has been called seems to do the job in all scenario's that i've tested.