    function q = corner2D(X1,X2,varargin)
    % one corner

    seti = varargin{end};
    R = seti.rCD/2;

    if length(varargin) > 1
    	l = varargin{1};
    else
    	l = 5/8; %length
    end
    if length(varargin) > 2
    	w = varargin{2};
    else
    	w = 1/12; %width
    end

    p1 = -0.3; % center position

    p2 = p1+l; % bottom and right
    p3 = p1+w;

    q1 = (p1*R <= X1) & (X1 < p2*R) & (p1*R <= X2) & (X2 < p3*R); % top line
    q2 = (p1*R <= X1) & (X1 < p3*R) & (p3*R <= X2) & (X2 < p2*R); % left line
    q = q1 | q2;

    q = double(q);

    end