

v = -pi:pi/50:pi;  u = v;  [vg ug] = meshgrid(v,u);

figure(1);

hg = (ug.^2)/2 + (1-cos(vg));  dh = 4/7;
contour(v,u,hg,[-10*dh:dh:10*dh]+2);
axis([-pi pi -pi pi]);  axis square

title('\bf nonlinear pendulum:  separatrix behaviour')
xlabel('\bf v-axis');  ylabel('\bf u-axis');  

