I want to find total no. of points lying inside and on the boundaries of a triangle if we are given with the x and y co-ordinate of all the three vertices in the 2D cartesian plane. I am thinking of enclosing the triangle inside a rectangle and then , find straight line equations and will check the points one by one to satisfy inequality equations. Is there a better computational approach to solve this problem?
Please help me.