🡄 Previous

Next 🡆

Contents > Applications > TetrominoScript Editor

Wires

On startup, TSE synthesizes components that represent vertical wires of various lengths. The image below depicts ir3, ir4, …, ir12 from left to right. The “i” in their names refer to fact that vertical wires primarily consist of I-tetrominoes. The “r” means the piece at the base extends to the right of the wire. And the number is the height. It goes up to 2001.

ils

The following image shows il3, il4, …, il12. The “l” means the piece at the base extends to the left of the wire.

irs

TSE renders a vertical wire as a dark rectangle with unassigned input and output nodes:

tse-ir8-drag.png

Below, the wire is attached to the inverter such that the inverter's output node serves as the wire's input node. Note that it propagates the signal.

tse-ir8-drop.png

TSE also synthesizes components that represent horizontal wires of various lengths. The following image depicts s3, s5, s7, …, s21 and z3, z5, z7, …, z21 separated by O-tetrominoes from top to bottom. The numbers refer to the component widths. As with the vertical wires, they go up to 2001. However, since a single piece has width three and each additional piece increases the width by two, TSE cannot synthesize horizontal wires of even length, at least not purely out of S- and Z-tetrominoes.

ss and zs

The image below shows that TSE renders s7 as a enigmatic set of rectangles.

tse-s7-drag.png

It looks strange because both the input and the output nodes are disjoint. In the following image, the input node is painted blue. The white-outlined rectangles constitute the output node.

tse-s7-input-nodes.png

s7 can couple to a component in two different ways. It can connect on the right:

tse-s7-right-input-1.png

That hangs it off the side:

tse-s7-right-input-2.png

Or it can connect on the bottom:

tse-s7-bottom-input-1.png

That rests it on its base:

tse-s7-bottom-input-2.png

Either way, only the rightmost S-tetromino supports the entire wire.

z7 is the horizontal reflection of s7:

tse-z7.png

The user can fashion wires from individual tetrominoes. To demonstrate this, the following image shows a TS program describing a pair of inverters.

tse-inverters-0.png

The user presses the iv button. Then, as the user moves the mouse cursor in the playfield, TSE renders a vertical I-tetromino:

tse-inverters-1.png

The user presses the left mouse button, causing the I-tetromino to drop:

tse-inverters-2.png

TSE appends iv to the TS program:

tse-inverters-3.png

The user repeats with a second I-tetromino:

tse-inverters-4.png

Like any solid structure, an individual tetromino resting on a node propagates the node’s value to its surface cells. In this case, the uppermost cells of the vertical I-tetrominoes, outlined in the image below, act as output nodes.

tse-inverters-5.png

In the following image, the left I-tetromino's output node serves as the input node of an inverter.

tse-inverters-6.png

Similarly, the right I-tetromino's output node serves as the input node of another inverter:

tse-inverters-7.png

Here is the result at rendering depth 2:

tse-inverters-8.png

🡄 Previous

Next 🡆