clear all
close all

N=800;
r=ones(N,1)*linspace(-4,4,N);
p=r';
rp=r.^2-p.^2;
rp(abs(rp)>4)=NaN;
rp(r.^2+p.^2>16)=NaN;

%x=linspace(0
%plot([

pa=surf2patch(r,p,rp);

h=patch(pa);
alpha(.8)

set(h,'facecolor',[.5,.5,.5],'edgecolor','none');

grid on
daspect([1 1 1.5]);
view(-15,26);
axis tight

camlight right
lighting phong
xlabel('r')
ylabel('p')
zlabel('payoff')
print -djpeg rpbook

