colormap(cool);
k = 5;
n = 2^k-1;
theta = pi*[-n:2:n]/n;
phi = (pi/2)*[-n:2:n]'/n;
X = cos(phi)*cos(theta);
Y = cos(phi)*sin(theta);
Z = sin(phi)*ones(size(theta));
C = hadamard(2^k);
surf(X,Y,Z,C)
disp(['Press a key to continue'])
pause;

axis equal
disp(['Press a key to continue'])
pause;

colormap(hsv)
surf(X,Y,C,Z)