I think you'll get something like that if you plot the surface several times with different options.
The first time should be
persp3d( x, y, hdif, col = "white", xlab = "Years from diagnosis",
ylab = "Age at diagnosis", zlab = "Hazard difference",
zlim= c(-10, 80), lit = FALSE)
(I left out a couple of your parameters that should not be here: nticks
and resfac
.) This will get a solid surface, but it won't show up because it is pure white.
The second time should be
surface3d( x, y, hdif, col = "blue", front = "lines", back = "cull", lit = FALSE)
This will get the blue line mesh. Finally you can plot
surface3d( x, y, hdif, col = "red", front = "cull", back = "lines", lit = FALSE)
for the red lines on the back: but due to rounding error, it might leak
through in some places, so I'd use the same colour for front and back,
i.e.
surface3d( x, y, hdif, col = "blue", front = "cull", back = "lines", lit = FALSE)
There are likely to be a few artifacts due to rounding; you could add depth_test = "lequal"
to the mesh calls and it might help, or shift
the front up a tiny bit and the back down a tiny bit by modifying hdif
.