Add 3d vis function

This code implements the 3d rgl plot, but also includes a load of documentation functions which are slightly different from the ones I had - I think a different roxygen version is putting the odd space in here and there.