Text this: Theory of textile structure