implemented basic transformations between the internal coordinate system and the screen coordinates