Changed triangle representation

It is now a tuple of three points. I'm using a tuple because it removes
the need for an array at all and makes it slightly safer. Plus it's fun.
Check for properly invertible matrix