Page complète Niveau supérieur

Grilles de Hermann

Noir ou blanc

Les disques aux intersections des allées grises sont-ils noirs ou blancs?

hermann3.mp
u = 25;
 
path carre;
carre = ((-1,-1) -- (-1,1) -- (1,1) -- (1,-1) -- cycle)
        scaled (u-5); 
 
picture grille;
path cadre;
 
hermann3 (figure 1)
beginfig(1);
    grille = image (
                for j:=1 upto 9:
                    for h:=1 upto 6:
                        fill carre shifted (2*j*u,2*h*u) 
                             withcolor black;
                    endfor;
                endfor;
             );
    cadre  = bbox(grille);
    fill cadre withcolor .5white;
    draw grille;
    for j:=1 upto 8:
        for h:=1 upto 5:
            fill fullcircle scaled 10 shifted ((2*j+1)*u,(2*h+1)*u)
                            withcolor white;
        endfor;
    endfor;
    draw bbox(currentpicture) withcolor blue;
endfig;
 
end