Hi,
We can find a function fun for a triangle such that:
* fun(x,y) = 0 if (x,y) lies on the triangle, i.e., fun(x,y) = 0 is an equation for the triangle;
* fun(x,y) < 0 if (x,y) lies inside the triangle;
* fun(x,y) > 0 if (x,y) lies outside the triangle.
The function for the triangle...