This function sets up the world coordinate system for a graphics window. It is called by higher level functions such as