Coding Number Patterns
Number patterns as ASCII art
ASCII art is an early form of computer art, built solely out of the original set of (up to) 256 characters, i.e. letters, numbers and symbols, supported by early computers and text-based displays. In this activity we look at how we can use some basic symbols, and computer programming boolean expressions on a grid (i.e. expressions that have a value of either true or false, to generate some ASCII art of our own.

Use the table below to define and combine rules, and see the patterns that result. The row index is given by the variable i, and the column index by j. Use the operators +, -, *, / and % to work with the i and j values, and == or != to test equality. When multiple rules are combined, they are applied in turn, line by line.

Select a predefined rule from the menu in the first row of the table, or type your own rule into the following rows. Clicking on the grid will show the i and j coordinates for the particular cell.

IncludeCondition (row = i, col = j)TrueFalseSymbols