Use cartesian coordinates

Feel free to change how this is done, this just makes it work.