function z=g2(x,y)
% g2 is a function from the plane to the reals that is zero outside the
% unit disc

r2= x*x + y*y;
r=sqrt(r2);
t=atan2(y,x);

if t<0
   t=t+2*pi;
end

if r>1
   z=0;
elseif r>.5
   z=t*t*t*exp(-r2);
else
   z=(1-sin(4*t))*exp(-2*r2);
end
