Tutorial 6: Best Practices
Use Descriptive Names
// Good - clear purpose
center_ring: R(6, p, 6, p, 6, p, 6)
petal1: R(4, p, 4, join(center_ring.picot1), 4, p, 4)
// Less clear
ring1: R(6, p, 6, p, 6, p, 6)
ring2: R(4, p, 4, join(ring1.picot1), 4, p, 4)
Name Important Picots
// Good - named connection points
center: R(4, p:join_here, 4, p:tip, 4)
petal: R(3, join(center.join_here), 3, p, 3)
// Less clear
center: R(4, p, 4, p, 4)
petal: R(3, join(center.picot1), 3, p, 3) // Which picot was picot1 again?
pattern "Documented Pattern" {
// Center motif - foundation for all petals
center: R(5, p, 5, p, 5, p, 5, p, 5)
// First petal - connects to north point
petal1: R(4, p, 4, join(center.picot1), 4, p, 4)
// Connecting chain - links petal1 to petal2
chain1: C(6, join(petal1.picot2), 6, p, 6)
}