# Learn / ART0x1 Instructions.

## Introduction

ART0x1 allows users to assemble designs made out of ASCII characters in each of two arrays. Each array is 105 columns by 50 rows. To create the final artwork, the arrays are overlaid over one another, with any overlapping characters creating new ASCII-based glyphs.

To get started, users need to initialise both arrays with desired characters and give the artwork a title, before using any number and combination of Sub Programs to either draw lines, rectangles, triangles and ellipses onto individual arrays, or mirror the top left quadrants of both arrays to the others.

A total of 12 instruction strings consisting of space-delimited key-value pairs, may be defined by the user to initialise the arrays and assemble designs via Sub Programs.

The structure and diagrams in this document are heavily inspired by the original ART1 instructions by Richard Williams.

## Initialising Arrays

Arrays need to be initialised before Sub Programs can be used. This is achieved by specifying an ASCII character and a number for each array, as well as giving the artwork a title. The ASCII characters will then be printed every "number" of columns for each array. See the example above.

Key breakdown:

key | label | type | description |
---|---|---|---|

sym1 | Symbol 1 | Text | ASCII symbol for Array 1 |

nCol | N Columns | Number | In every nth Column |

sym2 | Symbol 2 | Text | ASCII symbol for Array 2 |

mCol | M Columns | Number | In every mth Column |

title | Title | Text | Artwork title (60 chars max) |

## Sub Programs

Instruction strings for Sub Programs start with one of the following numbers to specify which SubProgram will be used. Then, the same set of key value pairs are used in different geometric algorithms. How these work is described in detail below.

— 0 for Line

— 1 for Solid Rectangle

— 2 for Open Rectangle

— 3 for Triangle

— 4 for Ellipse

— 5 for Quadrant

### 0: Line

A horizontal, vertical and diagonal Line can be drawn by specifying a starting row and column for the line, along with the number of rows and columns the line should span.

A horizontal line spans 1 row and any number of columns, a vertical line spans 1 column and any number of rows, and a diagonal line spans multiple (positive or negative) columns and rows.

Key breakdown:

key | label | type | description |
---|---|---|---|

0 | Sub Program | Number | 0 for Line |

sym | Symbol | Text | ASCII Symbol for Line |

arr | Array | Number | Array to draw Line on |

row | Starting Row | Number | Row at which Line starts |

col | Starting Column | Number | Column at which Line starts |

nR | Number of Rows | Number | Number of Rows in Line (+ is downward, — is upward) |

nC | Number of Columns | Number | Number of Columns in Line (+ is right, — is left) |

### 1: Solid Rectangle

A Solid Rectangle can be drawn by specifying a starting row and column for the recangle, along with the number of rows and columns the rectangle should span.

Key breakdown:

key | label | type | description |
---|---|---|---|

1 | Sub Program | Number | 1 for Solid Rectangle |

sym | Symbol | Text | ASCII Symbol for Rectangle |

arr | Array | Number | Array to draw Rectangle on |

row | Starting Row | Number | Row at which Rectangle starts |

col | Starting Column | Number | Column at which Rectangle starts |

nR | Number of Rows | Number | Number of Rows in Rectangle |

nC | Number of Columns | Number | Number of Columns in Rectangle |

### 2: Open Rectangle

An Open Rectangle can be drawn by specifying a starting row and column for the recangle, along with the number of rows and columns the rectangle should span.

Key breakdown:

key | label | type | description |
---|---|---|---|

2 | Sub Program | Number | 2 for Open Rectangle |

sym | Symbol | Text | ASCII Symbol for Rectangle |

arr | Array | Number | Array to draw Rectangle on |

row | Starting Row | Number | Row at which Rectangle starts |

col | Starting Column | Number | Column at which Rectangle starts |

nR | Number of Rows | Number | Number of Rows in Rectangle |

nC | Number of Columns | Number | Number of Columns in Rectangle |

### 3: Triangle

A Triangle can be drawn by specifying a row and column for the starting vertex of the triangle, followed by the number of rows or columns (positive or negative) the triangle should span.

When spanning rows, the number of columns to span must be set to zero, and when spanning columns, the number of rows to span must be set zero.

Key breakdown:

key | label | type | description |
---|---|---|---|

3 | Sub Program | Number | 3 for Triangle |

sym | Symbol | Text | ASCII Symbol for Triangle |

arr | Array | Number | Array to draw Triangle on |

row | Starting Row | Number | Row at which Triangle starts |

col | Starting Column | Number | Column at which Triangle starts |

nR | Number of Rows | Number | Number of Rows in Triangle (+ is downward, — is upward) or blank |

nC | Number of Columns | Number | Number of Columns in Triangle (+ is right, — is left) or blank |

### 4: Ellipse

An Ellipse can be drawn by specifying a row and column for the center of the ellipse, followed by the number of rows and columns on one-half vertical and horizontal axis.

Key breakdown:

key | label | type | description |
---|---|---|---|

4 | Sub Program | Number | 4 for Ellipse |

sym | Symbol | Text | ASCII Symbol for Ellipse |

arr | Array | Number | Array to draw Ellipse on |

row | Starting Row | Number | Vertical center of Ellipse |

col | Starting Column | Number | Horizontal center of Ellipse |

nR | Number of Rows | Number | Number of Rows on one-half vertical axis |

nC | Number of Columns | Number | Number of Rows on one-half horizontal axis |

### 5: Quadrant

The Quadrant Sub Program simply mirrors the contents of the top-left quadrant to the other three quadrants across the vertical and horizontal axes.

It takes no further instruction keys.

## Repeat Coordinates

Repeat Coordinates allow Lines, Rectangles, Triangles and Ellipses to be replicated across different positions in the array as part of the same instruction string.

They are specified by pairs of coordinates that denote rows and columns. Coordinate pairs are defined with rX and cX keys, where X corresponds to the coordinate pair number (e.g., r1, c1 for the first pair, r2, c2 for the second pair, and so on).

Table of Contents