function r=gbnd(x,y)
    rho2=x*x+y*y;
    if rho2<4
        r=1;
    else
        r=sin(2*atan2(x,y));
    end