ART0x1

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.

ART0x1 Instruction Arrays

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

ART0x1 Init Example

"sym1 ~ nCol 2 sym2 / mCol 4 title MY FIRST ARTWORK"

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:

keylabeltypedescription
sym1Symbol 1TextASCII symbol for Array 1
nColN ColumnsNumberIn every nth Column
sym2Symbol 2TextASCII symbol for Array 2
mColM ColumnsNumberIn every mth Column
titleTitleTextArtwork 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

ART0x1 Line Example

"0 sym = arr 1 row 25 col 0 nR 1 nC 105"

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.

ART0x1 Line Instructions

Key breakdown:

keylabeltypedescription
0Sub ProgramNumber0 for Line
symSymbolTextASCII Symbol for Line
arrArrayNumberArray to draw Line on
rowStarting RowNumberRow at which Line starts
colStarting ColumnNumberColumn at which Line starts
nRNumber of RowsNumberNumber of Rows in Line (+ is downward, — is upward)
nCNumber of ColumnsNumberNumber of Columns in Line (+ is right, — is left)

1: Solid Rectangle

ART0x1 Solid Rectangle Example

"1 sym = arr 1 row 2 col 4 nR 21 nC 97"

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.

ART0x1 Solid Rectangle Instructions

Key breakdown:

keylabeltypedescription
1Sub ProgramNumber1 for Solid Rectangle
symSymbolTextASCII Symbol for Rectangle
arrArrayNumberArray to draw Rectangle on
rowStarting RowNumberRow at which Rectangle starts
colStarting ColumnNumberColumn at which Rectangle starts
nRNumber of RowsNumberNumber of Rows in Rectangle
nCNumber of ColumnsNumberNumber of Columns in Rectangle

2: Open Rectangle

ART0x1 Open Rectangle Example

"2 sym = arr 2 row 1 col 2 nR 25 nC 101"

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.

ART0x1 Open Rectangle Instructions

Key breakdown:

keylabeltypedescription
2Sub ProgramNumber2 for Open Rectangle
symSymbolTextASCII Symbol for Rectangle
arrArrayNumberArray to draw Rectangle on
rowStarting RowNumberRow at which Rectangle starts
colStarting ColumnNumberColumn at which Rectangle starts
nRNumber of RowsNumberNumber of Rows in Rectangle
nCNumber of ColumnsNumberNumber of Columns in Rectangle

3: Triangle

ART0x1 Triangle Example

"3 sym = arr 1 row 1 col 54 nR 48 nC 0"

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.

ART0x1 Triangle Instructions

Key breakdown:

keylabeltypedescription
3Sub ProgramNumber3 for Triangle
symSymbolTextASCII Symbol for Triangle
arrArrayNumberArray to draw Triangle on
rowStarting RowNumberRow at which Triangle starts
colStarting ColumnNumberColumn at which Triangle starts
nRNumber of RowsNumberNumber of Rows in Triangle (+ is downward, — is upward) or blank
nCNumber of ColumnsNumberNumber of Columns in Triangle (+ is right, — is left) or blank

4: Ellipse

ART0x1 Ellipse Example

"4 sym = arr 1 row 24 col 54 nR 10 nC 36"

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.

ART0x1 Ellipse Instructions

Key breakdown:

keylabeltypedescription
4Sub ProgramNumber4 for Ellipse
symSymbolTextASCII Symbol for Ellipse
arrArrayNumberArray to draw Ellipse on
rowStarting RowNumberVertical center of Ellipse
colStarting ColumnNumberHorizontal center of Ellipse
nRNumber of RowsNumberNumber of Rows on one-half vertical axis
nCNumber of ColumnsNumberNumber of Rows on one-half horizontal axis

5: Quadrant

ART0x1 Quadrant Example

"1 sym = arr 1 row 15 col 6 nR 9 nC 45"

"3 sym \ arr 2 row 1 col 37 nR 13 nC 0"

"4 sym / arr 1 row 8 col 15 nR 5 nC 9"

"5"

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

ART0x1 Repeat Coordinates Example

"1 sym = arr 1 row 0 col 0 nR 25 nC 35 r1 25 c1 35 r2 0 c2 70"

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