import static util.SVGUtil.*;

public class WallPaper {
    public static void main(String[] args) {
        start();                     /* 最初に必要 */
        rulers();                    /* 四隅の線   */
        final double unit = 1.6;     /* 正方形の大きさ */
        double side = 47;            /* ここを変えるとパターンが変わる */
        double corna = 0, cornb = 0; /* ここを変えるとパターンが変わる */
                
        int colors = 6;              /* 使う色数 */
        int n = 100;                 /* 正方形の縦方向の個数 */
                
        translate((297-unit*n*1.414)/2, (210-unit*n)/2);
                
        for (int i=1; i<=n*1.414; i++) {
            for (int j=1; j<=n; j++) {
                double x = corna + i*side/100, y = cornb + j*side/100;
                int c = (int) (x * x + y * y);
                fill(hsl1((double)(c % colors) / colors, 1 /* 鮮やかさ: 0--1　*/, 0.75 /* 明るさ: 0--1　*/));
                rect(unit*i, unit*j, unit, unit);
            }
        }
                
        finish();                    /* 最後に必要 */
        return;
    }
}
