Robust algorithms for generating quilts and chains