In my series Drawing a chessboard, a simple way to build the chessboard from a 2x2 unit cell.
As shown in Fig. 1, a chessboard can be described as a 4x4 array of unit cells composed of 2x2 black and white cells. Thus, this algorithm computes:
- the unit cell
- then, duplicate it 15 times to build a stack.
- finally, create a montage of 4 rows and 4 columns.
Fig.1: A chessboard is the repetition of a 2x2 unit cell as shown in the top left corner. |
+++ IJ snippet +++
Duplicating a great number of the same 2x2 unit cell can be problematic because a lot of windows are created and your OS may have some trouble to manage all these windows. This can be improved by using the Scale operator. Indeed, when detecting a stack, this operation offers the possibility to modify the Z-scale. Thus, our algorithm becomes:
- Duplicate once the unit cell and create a 2-slices stack.
- Scale this stack by setting the Z-scale to 8 (or Depth to 16). Your 16-slices stack is now created.
+++ IJ snippet +++
Hope that helps.
No comments:
Post a Comment