M=input('Podaj masê cia³a wiêkszego\n')
m=input('Podaj masê cia³a mniejszego\n')
mi=m/(M+m)
[x,y]=meshgrid(-1.5:.01:1.5,-1.5:.01:1.5);
z=-(x.^2+y.^2)./2-(1-mi)./sqrt((x+mi).^2+y.^2)-mi./sqrt((x-1+mi).^2+y.^2)-mi.*(1-mi)./2;
surf(x,y,z)
axis([-1.5 1.5 -1.5 1.5 -3 -1.5])
caxis([-2.3 -1.5])
shading interp