added z coordinate to the objects and functions. Trying to get the new pyqtgraph plotting functions to work.