0 Members and 1 Guest are viewing this topic.
Its very simple. If you have a point R with vector RS, you can determine if point P is above or below by taking the dot product of RS with RP. If its positive, its above, negative, its below, and zero its on the line. It requires just 2 multiplications and an addition.
Alternatively, if you have a line of equation A*x+B*y=C, and a point (x0,y0), you can compare A*x0+B*y0 to C. If it's greater, it's on one side, if it's less than, it's on the other side, and if it's equal, it's on the line.