Crochetable Cyclic Tag

From Esolang
Jump to navigation Jump to search

Crochetable Cyclic Tag is a method of specifying Bitwise Cyclic Tag programs as crochet pattern instructions. The patterns have a conditional element which permits computation. The output is either a deterministic crochet pattern, or a physical textile.

There are four possible pattern row instructions in a CCT pattern.

The first row type std, which all of the other rows are based upon, is a height preserving row. Every second row is one of these. It simply pairs a double crochet with a single crochet and vice-versa to ensure every pair of rows have the same height.

  • std: work 1 sc into each dc, 1 dc into each sc until end of row; turn.

Then there are three possible width changing rows. 1 decrease, and 2 possible increase rows.

  • dec-ss: 1 ss, then proceed as in the standard row until end of row; turn.
  • inc-sc: prepare to proceed as in the std row, if the first st would be sc, skip this and the following std row. Otherwise, 1st st is dc: proceed as std row until end of row, then inc 1 extra sc into last st; turn.
  • inc-dc: prepare to proceed as in the std row, if the first st would be sc, skip this and the following std row. Otherwise, 1st st is dc: proceed as std row until end of row, then inc 1 extra dc into last st; turn.

Note: The two increase rows are only started if the first stitch in that row would be a dc (i.e. if the st below was a sc, given the standard row-by-row alternation of sc and dc).

The first row of any pattern is always customisable. It can be any sequence of sc / dc stitched onto an appropriately sized foundation chain. This is followed by the first std height preserving row (row 2).

The pattern proper then consists of some number of row instructions taken from {dec-ss, inc-sc, inc-dc}, alternating with the standard height preserving row instruction.

Once the last instruction is reached, repeat from row instruction 'a' until the piece reaches a point (i.e. the last row consists of a single slipstitch).

Another possible end condition is if there is a complete repetition of all alphabetic instructions in the pattern where not a single stitch is added. In this case, the crocheter may optionally add as many alternating std rows as desired and end the piece when the length is deemed sufficient. Computationally this is an empty infinite loop; the row will never change, nor will the pattern end naturally. Following the above steps no additional rows will be added, but the pattern repetition will not halt either. This special case halt condition provides crocheters with some creative control over the finished piece, and their time, whilst still being computationally accurate.

A pattern may optionally provide some guidance on how to choose a base row pattern. The base row may encode some particular variable that will be acted upon by the pattern, or be required to be some fixed pattern to give the expected results. Many patterns may simply require a base row consisting of a single dc to function correctly.

Note: a base row consisting of only single crochets will prohibit any increase in the pattern from occurring.

Examples

# Simple decreasing triangle swatch
1. Any sequence of sc / dc stitched onto an appropriately sized foundation chain.
2. std
3. dec-ss
4. std
Repeat from Row 3.

Result from input / home row Ŧ+ŦŦŦ+Ŧ (i.e. code>1011101), where 1 = dc (Ŧ) double crochet and 0 = sc (+) single crochet.

•      
+      
Ŧ•     
+Ŧ     
Ŧ+•    
+Ŧ+    
Ŧ+Ŧ•   
+Ŧ++   
Ŧ+ŦŦ•  
+Ŧ+++  
Ŧ+ŦŦŦ• 
+Ŧ+++Ŧ 
Ŧ+ŦŦŦ+•
+Ŧ+++Ŧ+
Ŧ+ŦŦŦ+Ŧ
ᴑᴑᴑᴑᴑᴑᴑ

External resources