Patterns are a major element of decorative and graphic design. Since ancient times, people have been crafting intriguing patterns by repeating graphic elements or organizing space based on specific rules.
パターンは装飾やグラフィックデザインにとって大事な要素です。太古の昔から、人々は視覚的な要素を繰り返したり、特定のルールに従って空間を分割することで魅力的なパターンを作り出してきました。
In geometry, a tessellation or tiling refers to covering a space with one or more geometric shapes without overlaps and gaps. We can consider tessellation for any number of dimensions, but we will focus on 2D on this page.
幾何学では、重複や隙間なしに空間を1つまたはそれ以上の幾何学的形状で覆うことをテッセレーション、またはタイリングと呼びます。テッセレーションはどんな次元数についても考えることができますが、このページでは2次元に集中します。
The simplest way to create a repeating pattern, especially on a computer where graphics are usually handled by xy-coordinates, is to divide a plane into tiles of squares or rectangles.
特に通常グラフィックスをxy座標で扱うコンピュータ上で最も簡単な繰り返しパターンの作る方法は、正方形や長方形のタイルに平面を分割することです。
We want to assign different colors or graphics to the tiles to make it more interesting than just a grid. Modulo is a great tool for this. If we call the horizontal position of a tile $i$, and the vertical position $j$, we can name each of the tiles $Tile_{ij}$. By using modulo against these indices ($i$, $j$), we can divide them into several groups to assign different graphics.
単なるグリッドよりは面白しろいものにしたい、タイルに異なる色やグラフィックを割り当てましょう。モジュロはこれに最適なツールです。タイルの水平位置を$i$、垂直位置を$j$とし、それぞれのタイルを$Tile_{ij}$と呼びます。この位置を示す数($i$、$j$)に対してモジュロを使っていくつかのグループに分けることで異なるグラフィックを割り当てることができます。
The demo below draws a checker pattern by dividing the tiles into two groups, then assigning a color for each group (0 = Black, 1 = White).
下のデモは、タイルを2つのグループに分け、各グループに色を割り当てることでチェック模様を描きます(0 = 黒、1 = 白)。
$\text{Group id} = (i + j) \mod 2$