Monday, December 20, 2010


Right, exciting new knitty programming plan!
One of the harder things to do with a knitting pattern is find out what shape from first principles.
In my first Geometric Knitting colloquium I discussed the relationship between Riemannian metrics and the shape of knitting fabrics, and an algorithm which would take a metric and generate a knitting pattern to yield a surface with that metric. The plan this time is to work in the opposite direction -- to take a pattern and figure out the shape this makes.

The way I want to do this is to model the fabric as a network, each stitch representing a vertex, with connections between it and its neighbours. By modelling the forces acting between stitches it should be fairly easy to make an program which will iterate towards an equilibrium position, which would be the shape the knitting will naturally take. (This position won't be unique,
I think there are two main forces to take into account -- there's a spring-like force between neighbouring stitches, acting along the line between them. Then there's a twisting force acting perpendicular to the surface, which depends on the type of stitch, which makes stocking stitch fabric curl up, and allows ribbed fabric to scrunch together.

So that's the aim, to write a program which will take a knitting pattern, interpret this as a network of points, will work out the shape of the fabric, and display this shape. The last step may well be the hardest one, since I currently have no idea how to do 3D graphics, but I'm hoping this is a standard enough problem that I'll be able to find a good standard way to do that.


Wednesday, December 15, 2010

More anomalocaris!

Ok, the anomalocaris is done!

I had a lot of fun making this. The exciting bit is making the "segmented" effect on the body. The body is knit as a tube in the round, then a few rows are knit flat to make a flap, before casting off these stitches, continuing in the round and picking up an equal number of stitches at the beginning of the flap.
The number of fins (and the sewing required) is a little intimidating, and they all need to be placed quite precisely, so that they hold down the side "segment" flaps, as well as overlapping slightly. Fortunately this turned out not to be as time-consuming as I thought, and I'm very happy with how well this turned out.
I'm not totally convinced by the eyes -- they're knit as little hemispheres and lightly stuffed, to give them a bit of a boggle-eyed effect. I think anomalocaris's eyes were raised, possibly even extended on stalks, so this is fairly realistic, but I don't think it looks good here. Possibly the sharp contrast in colour, when the rest of the body is so uniform, is what makes this look so out of place.

Still, I'm very happy with my new anomalocaris! There are more pictures here, including more from the anomalocaris's expedition into Edinburgh's recent snow.