One well-known symbol of the philosophy of duality known as yin and yang is the taijitu.



Task

   Create a function that, given a parameter representing size, generates such a symbol scaled to the requested size.
   Generate and display the symbol for two different (small) sizes.


yinyang: procedure options(main);
    yinyang: procedure(r);
        circle: procedure(x, y, c, r) returns(bit);
            declare (x, y, c, r) fixed;
            return( r*r >= (x/2) * (x/2) + (y-c) * (y-c) );
        end circle;
 
        pixel: procedure(x, y, r) returns(char);
            declare (x, y, r) fixed;
            if circle(x, y, -r/2, r/6) then return('#');
            if circle(x, y, r/2, r/6) then return('.');
            if circle(x, y, -r/2, r/2) then return('.');
            if circle(x, y, r/2, r/2) then return('#');
            if circle(x, y, 0, r) then do;
                if x<0 then return('.');
                else return('#');
            end;
            return(' ');
        end pixel;
 
        declare (x, y, r) fixed;
        do y=-r to r;
            do x=-2*r to 2*r;
                put edit(pixel(x, y, r)) (A(1));
            end;
            put skip;
        end;
    end yinyang;
 
    call yinyang(4);
    put skip;
    call yinyang(8);
end yinyang;