Saturday 4 October 2008

About socks and computers

What do socks and computers have to do with each other?
Well, I’d like to show you a pair of socks and an email I’ve received.

I never managed to knit socks or mittens, I just never got used to the fiddling with 5 needles, their movement annoys me, my thread gets caught between the needles… But my mum seems to be the best sock knitter in the world. I only wear socks knitted by her. She’s a quick knitter anyhow, and she does socks so smoothly and quickly that you can’t see what she’s doing – they just seem to grow and grow and be finished in no time at all.

As I always thought my patterns would be nice in socks, I asked her to do a pair for me, just to see. I sent her a few pattern charts, and she did. First she said she had to concentrate a lot, she mixed up the rows, but meanwhile she has done many pairs and loves them. She’s going to sell them at their Christmas fair for charity, and she says she can now watch TV, whilst knitting the patterned socks. Here are two pictures of the pair she sent me.



Here I've turned one sock inside out to show the other side's pattern.


Many thanks to my mum! Myself hasn’t managed finishing a project in a while, since there are always so many new patterns waiting to be tested.

Remember, I’ve said here that a computer program that could simulate these patterns would be handy, but I was doubtful a computer could do this? Afterwards I found the article “Simulating Knitted Cloth at the Yarn Level” by Jonathan M. Kaldor, Doug L. James and Steve Marschner of Cornell University, who are actually working on this. The article explains what the problems are in simulating knitted fabrics, and how they successfully simulated stockinet, garter stitch and rib fabrics. Mind you, I do not understand the complex calculations that are necessary for this.

I’ve contacted them and asked whether computer simulation of the patterns would be possible. Well, I was still doubtful. “I suppose I'm not wrong that it would be a huge challenge to simulate these structures on computer?” I asked in my email.

I was very pleased to receive an answer back from Jonathan Kaldor, in which he said:

“Regarding simulating the behavior of more complex knit structures and the feasibility of doing so on a computer: I am more optimistic that it is a tractable problem. What our paper demonstrated was that a.) its possible to simulate yarn abstractions directly and be able to scale up to large pieces of fabric, and, more importantly from the perspective of your question, b.) quite a bit of the behavior of knit fabrics follows from just the pattern of stitches and how the yarn is interlaced. As an example of (b), one of our experiments involved holding the simulated yarn parameters constant and only changing the pattern of knit and purls, resulting in the distinctive garter / stockinette / rib knit appearance in our simulated results. There's still more to do to account for all of the possible sources of variance between two knit samples, including several of the ones you mentioned in your post, of course. However, I think the computer graphics / textile community will eventually be able to predict with reasonable accuracy what geometric/color pattern you would expect to see in the final product given one of your stitch and color patterns as input. We're not quite there yet, of course, but hopefully we'll have some more interesting results in that direction soon.

So, it will be possible in the future! Such software would definitely be helpful!


Jonathan Kaldor and his colleagues in their article describe how they have also simulated the behaviour of a sock - well, a leg warmer it was. This is described as follows:


"Figure 10 shows a 44 x96 knitted leg warmer being pulled over a
foot. Because we simulate the yarn contacts directly, we are able
to resolve the complicated stretching pattern as it slides over the
heel. Due to the size of the model, there are over 100 billion pairs
of quadrature points that potentially need to be evaluated for the
collision integral at each step. Using our bounding box hierarchy,
however, we are able to quickly find the 3.7 million pairs on average
that are in contact, using only 12 million bounding box traversals
and 12 million sphere-sphere evaluations on average." (p 8)


Isn’t it amazing that something so simple as knitting seems to be a challenge for computer technology, but that in the end, when the complicated work to develop the software is done, it can in turn be helpful for knitters?

No comments:

Post a Comment