See section 11.16.2 for checking for collinearity in two-dimensional geometry.
The is_collinear command takes as argument a list or sequence of points.
is_collinear returns 1 if the points are collinear, it returns 0 otherwise.
Input:
Output:
Input:
Output: