I want to know a piece of a code which can actually tell me if 3 points in a 2D space are on the same line or not. A pseudo-code is also sufficient but Python is better.
Rule 1: In any linear 2d space, two points are always on the same line.
Take 2 points and build an equation that represents a line through them. Then check if the third point is also on that line.
Good luck.