Added coplanarity test; made separate func for collinearity test