r3d function

Generic 3D interface