Tutorial 2: Adding a Chain
Now let's connect our ring to a chain.
Step 1: Update the Pattern
Modify first_ring.tatml:
pattern "Ring and Chain" {
thread: size20, white
shuttles: 1
ring1: R(6, p, 6, p, 6)
chain1: C(8, join(ring1.picot1), 8, p, 8)
}
Step 2: Understanding Joins
The key new element is:
join(ring1.picot1)- joins to the first picot of ring1
This is TatML's precise picot referencing in action! No ambiguity about which picot to join to.
Step 3: Validate and Generate
python3 tatml_validator.py first_ring.tatml
python3 tatml_formatter.py first_ring.tatml
You'll now see instructions for both the ring and chain, with the join clearly specified.