I can't tell if it's any use, but there's a point-in-triangle algorithm near the bottom of this page:
http://homepages.borland.com/efg2lab/Library/Delphi/Graphics/Math.htm
And another:
http://www.blackpawn.com/texts/pointinpoly/default.html
http://homepages.borland.com/efg2lab/Library/Delphi/Graphics/Math.htm
And another:
http://www.blackpawn.com/texts/pointinpoly/default.html