[X,Y] = meshgrid(0:.01:1, 0:.01:1);
Z = reshape(Rdist(reshape(X,prod(size(X)),1),reshape(Y,prod(size(Y)),1)), size(X));
mesh(Z);
hold on
contour(Z, [0 0]);
hold off
