You get a simple bicone because
Z = R;
and the colormapping looks random because
C = (X.^2 + Y.^2 - Z.^2).^m;
is essentially zero (it's just a collection of rounding errors, really), since
Z^2 = R^2
R^2 = X^2+Y^2
I'm not really sure what you're intending, but that's why you're getting what you get.