ufz/ogs — pull request #497 by rinkk (2014-10-08 14:07:20+00:00)
Title: Test point in triangle

This is an alternative implementation to test if a point is located within a triangle. It uses barycentric coordinates instead of the Gauss algorithm used by @TomFischer

We've tested this with some of Norberts examples where Tom's algorithm had problems and didn't find all relevant points. This new algorithm also did not find all points, although different points are missing and at least in the tested cases *fewer* points were missing.

I don't know if we want to merge this, I just put it up as a PR so it isn't forgotten and you can decide if we want to keep it or not. I'll fix all strange names and tests if it is to be merged.
If someone wants to take a look at the mathematics behind this, I can give you the book mentioned in the comments.