Computational methodology for determination of yarn twist and diameter