Tuesday, September 23, 2008

Knitting the polar way


Hi folks.
I've been playing with some knitting-related maths lately, and after a certain amount of experimenting I've just about got a design ready to be playing with.
This kind of follows on from the ideas behind the 'science doilies', trying to knit standard shapes in non-standard ways. Particularly, I've been looking at knitting colourwork radially.
Planning colourwork when knitting flat is fairly straightforward, the lack of shaping means that the stitches obey nice easy-to-follow patterns. If you knit radially(starting at a central point and work outwards), it becomes a lot harder to judge. The reason for this is that flat knitting is based on cartesian coordinates, where radial knitting is using polars.
So to make this work, I came up with another little Maple program which will take a curve(given in normal cartesian coordinates), convert this into polar form, then use some numerical trickery to convert this into a workable knitting pattern. This seems to work pretty well, with one caveat that you need to be a little careful about spacing your increases - the calculation assumes that the increases are all entirely homogeneous about each round, which isn't possible in practice because the stitches are discrete. In particular, the standard trick of distributing increases evenly along the round(as you would for most lace doilies) isn't even enough, I think it distorts the colourwork pattern too much.
The reason I'm really excited about this though, is that the same program could also be used to work out short row patterns for knitting non-trivial shapes in the same radial way. Initially I'd hope to be making sensible rectangular pieces, but ultimately I think there's the potential for some truly mind-boggling designs from this.

I'm working on a design just now which will be a bit of a trial run for this - the plan is to make a little baby jacket for my little nieceling, the back panel of which will be knit radially with a pattern of colourwork hearts. I'll blog about that design specifically another time, because there's some nifty maths behind the heart pattern(if you're part of the 'geekcraft' group of Ravelry, you may have heard me being excited about this already). I'm not too sure how I'll do with the rest of the jacket, will have to play with it a bit more.

So yep, more about that when the actual knitting is underway, and assuming more goes well, I'll say some more about the mechanics of the radial coordinate program then too.

Happy knitting!
Hugh.

Friday, September 5, 2008

Alien surfaces


Hey! It's been pointed out to me that I haven't written anything here for ages, and I realised there's a couple of projects I haven't found the time to mention yet.

So, first off, Alien surfaces!
This project actually belongs to local mathematician Madeleine Shepherd, but I helped out with some of the maths, so I'm sure it's worth a post :o)
As part of a festival exhibition on 'alien surfaces', artwork inspired by descriptions of alien planets in science fiction, Madeleine knit a model of , the surface you get if you take the curve y=1/x and rotate it around the x-axis(for the region x>1 - although I think we took x>1/30, or thereabouts, to make the curvature show up more).
This surface has some very cool properties mathematically - it turns out that it's surface area is infinite, while it's volume isn't, which means that you could, hypothetically, fill one with paint, but it would be impossible to paint it's entire surface. Which is a bit mind-boggling. (The trick is that in comparing a volume with a surface area in this way, you're kind of assuming that you're covering the surface with a layer of paint of uniform thickness, the volume is only finite because the trumpet tapers off quickly as x becomes large.)

Since the surface has a rotational symmetry, writing down a pattern for it is relatively simple - you just need to work out the circumference at each row, convert this into a number of stitches, and work out how many stitches you need to decrease each time.
The difficulty is that the rows in this case do not correspond to the coordinate x, but the arclength - the distance you've travelled along the curve from the first row. Now, in differential geometry, this isn't really a problem, you can just change coordinates without any difficulty, but actually doing this in practice takes a bit more work because while it's easy enough to find the arclength from the position, inverting this formula is quite hard, and needs to be done numerically.
Happily though, Maple actually cooperated with this, so I now have a bit of code which is capable of doing this more or less automatically. If anyone's interested, or is keen to knit there own surfaces of revolution, I'd be happy to go into more detail on this. I was considering tidying up the code a little and convincing it to print out real honest-to-goodness knitting patterns, but I'm not sure how many people would be interested in this and have access to Maple?

And I love how the surface turned out, there's something amazing about writing down a bunch of maths and getting to see it suddenly turned into a piece of knitting! I'm quite keen to read the book it comes from too, I'd be interested to see how far the author was able to take this idea, and how this unusual geometry affected the people living there :o)
(Oh, and the tapir is because Madeleine seems to be quite keen on them)

Happy knitting!
Hugh.