add more functionality to the 4 dimensional matrix class and use it to calculate the draw transforms