Many people help Mike Meyer:
I didn't follow this discussion, so I might have missed some
essential issues, I apologize then. But if THIS is the problem...
All these powerful universal libraries, with several hundreds of
lines of code are important and useful, but if the problem is to
find whether a list of pairs (x,y) is collinear or not, I presume
that such program as below could do. I am ashamed showing something
like that...
colin ((x,y):l) =
all (\(c,d)->abs(px*d-py*c)<eps) q where
((px,py):q) = [(ax-x,ay-y) | (ax,ay) <- l]
[The iterated subtraction puts the first vector at the origin. eps
is the precision; better avoid ==0]
For three dimensions and coplanarity, instead of separating one
vector, we need two, in order to compute their skew product. Then,
it suffices to verify that all its scalar products with the
remaining, vanish; if not, they are not coplanar.
Jerzy Karczmarczuk