% This is an angle dependent shape
% 
 
   figure
%      set(gcf,'pos',[  10    50   276   213] )
    set(gcf,'menu','none','numbertitle','off','name','SPHERES') 
    set(gcf,'menu','none');
    set(gcf,'color','white')
nam='kuler';
set(gcf,'menubar','none')
set(gcf,'color','white')

l=input(' enter L-value >>');
m=input(' enter M-value >>');;

% sphere 1
r=1; thet=0:pi/240:pi;phi=0:pi/120:2*pi;
[Thet Phi]=meshgrid(thet,phi);

array=ylm(l,m,Thet,Phi);
arrayp=conj(array);
rthetphi=r^2.*array.*arrayp ; % Y(l,m)^2
xx1=rthetphi.*sin(Thet).*cos(Phi);
yy1=rthetphi.*sin(Thet).*sin(Phi);
zz1=rthetphi.*cos(Thet);

    surfl(xx1,yy1, zz1 );...
     axis equal,shading interp; colormap pink;...
 rotate3d
 

