Completed basic saveImage() and traceRay().