Analysis and design of textile materials