I\'m attempting to determine if a specific point lies inside a polyhedron. In my current implementation, the method I\'m working on take the point we\'re looking for an array of
It turns out that the problem was my reading of the algorithm referenced in the link above. I was reading:
N = - dot product of (P0-Vi) and ni;
as
N = - dot product of S and ni;
Having changed this, the code above now seems to work correctly. (I'm also updating the code in the question to reflect the correct solution).