Hi folks!
This is an idea I'd been vaguely intending to develop for quite a while, but didn't get around to seriously implementing until last week.
So, a cellular automaton is a rule for taking a grid of binary numbers, and generating a new grid in which the value of each entry is determined by the previous entry in the same and adjacent squares. So, if you take a 1-dimensional cellular automaton, it takes a row of 1's and 0's, and makes a new row, and each entry is determined by the entry above it and it's two neighbours. They're extremely simple, but they can produce some suprisingly complex patterns.
My idea was to use this to generate lace patterns - the 1's represent holes, the 0's plain stitches. There are some technicalities to overcome - lace knitting has left- and right-leaning holes, and while you could just pick one and apply it everywhere, I wanted something which would reflect the way digits 'travel' in CA patterns, so that you would arrive at a pattern of left and right travelling lines, meeting, annihilating, generating new lines. You can do this in a reasonably canonical ways - by looking at the three digits on the previous row you can more or less say it's heading left or it's heading right. There are some cases where a choice needs to be made though, so I just choose these. This loses some of the generality, but isn't too bad.
Having made these choices, I wrote a short program to choose a cellular automata 'rule' at random, pick some starting conditions, and apply the rule to generate a pattern. A second program then looks through the 1's this gives, and by looking at the arrangement above them translates this into a pattern of K, YO, K2tog and SKP stitches. Putting the output of this into a spreadsheet then gives you a lace pattern, and best of all, this is all entirely automatic. One such spreadsheet is here(for now- may need to move that at some point). (alternate rows are plain)
There's a couple of problems - this particular pattern involves a lot of double yarn overs. I'm told you can manage this by working K1 P1 on the alternate row, but I suspect it may be neater to write a quick program to look through the pattern and eliminate these - I think that wouldn't obscure the pattern and might need to a nicer finished piece, as well as easier knitting. So I need to try those out and see which solution I prefer.
The other problem is that there aren't that many 1D cellular automata, 16, by my count. While CA were very much the motivation for doing this, I kind of feel that sticking with them is selling the lace pattern generating half of the programme a bit short - it could apply equally well to any binary grid. So while this is a good starting point, I'm thinking about maybe inventing some slightly more elaborate generating rules - a quick way would be to allow a block to be decide by the five blocks above it, or the previous two time steps. Another approach I'd like to try would be to replace the binary grid with trinary, which would give a much wider family of rules, then map all the 2's back to 1 to produce a grid to feed into the lacing programme.
So yes, let's to play with. I particularly wanted to mention this because there was an extremely timely xkcd comic about cellular automata. In fact, I think the CA he's talking about simulating the universe with there may well be the same one in my lace pattern, though I haven't looked too closely.
So, anyone for an extremely geeky shawl?
Hugh.
Friday, November 21, 2008
Thursday, November 13, 2008
Roses
Ok, just a quick post cos I realise I haven't written anything here for months.
So, I decided to make some roses for a rose-loving friend. I had a fiddle around with a couple of rose patterns, particularly a nifty one from Knittiana which involved twisting your knitting to form petals(I love that about knitting - that whatever you can possibly do wrong, someone somewhere will have found a use for). But I couldn't make them come out how I wanted, they all looked kinda rose-ish, rather than actually like a rose.
Then I came across a great crochet pattern for them from RS Island crafts, which was very simple and turned out really well. I haven't done much crocheting, so I was very impressed with how well this turned out, and heartily recommend the pattern.
I did have some trouble with the sewing up, particularly attaching the stems to the flowers, but that's probably me just now knowing how to sew.
So yep, there's some roses! Should be getting back to posting soon, I have a project or two underway that I've been too busy to blog yet.
Happy knitting!
Hugh.
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.
Wednesday, July 16, 2008
Doilies... for science!

Hey folks!
I was doodling away last week and came up with some ideas I'd like to play with knitting. The main idea is that knitting can always be divided up into rows - mathematically we'd call this(ironically) a fibred surface. But this has some consequences - if you want to knit a shape, you start off by picking a fibration. If, though, you picked a different fibration, you could knit the same shape, but come up with a radically different pattern, and a radically different look. A very simple example would be if you were to knit a rectangle lengthwise rather than width-wise(if that's a word). I've come across examples of this elsewhere, such as (the awesome) Nona's Sidewinder socks, Ysolda's sideways hat Urchin, and especially this absolutely amazing sweater(which presumably belongs to Numei.com, but I haven't been able to find there), but I'm looking to take this idea a bit further.
My first experiment with this idea goes like this - I want to take a question mark, and knit it into a doilie, but in such a way that the question mark is actually a row in the pattern, so it's somehow intrinsic to the fabric somehow.
Or course, while I'm arranging my rows in interesting and nontrivial rows, it would be a shame not to throw in some lace. this will be relatively simple this time around, but I'm really hoping that in future attempts I'll be able to make this a bit more extreme and take advantage of the interesting shapes to make some really interesting lace patterns, but I don't have much experience with lace yet, and I really wouldn't be able to create my own.
Oh yes, and you might wonder why I chose a question mark? Well, primarily because it was the first symbol I found which was simple enough to do this with, but also this is supposed to symbolise inquisitiveness, the need to always find out more which I think lies behind all good science.
So there you have it - Science doily!
Hugh.
Wednesday, July 9, 2008
More whales!
Ok, just a quick post - following on from the Erst-whale, I decided to make a little school of other whales, and that each whale would be wearing a different kind of hat. Ever since I made the bee-hat, I've been feeling the need to put tiny hats of stuffed toys. I think the whales are particularly suitable for this because with out the "1" on the side the whales are a bit plain and featureless.
So, hats. The first one is a top hat, the second is(inevitably) a fez, and the third is a floppy sunhat. I really like how the tassels came out on the fez - I had some trouble with this, but eventually found that lots of strands of sewing thread worked very well. They're tied very tightly in the inside, so hopefully this is still baby-safe. The sunhat didn't come out so well - I'd hoped that the natural curliness of the stocking stitch would make the brim turn upwards nicely, but I think it curls a bit too tightly here. This might be better if I'd knit the brim on larger needles(here I'm using DK yarn and 3mm needles, so it's quite tight). I also had some trouble making the concave edges, where the brims meet the main part of the hat - for a convex edge a row or reverse stocking stitch makes a nice fold, but the other direction is harder. I found a row of knitting through the back of the loop gives a bit of a crease, but not as much as I would have liked. Any ideas, anyone?
The photos here were taken at the Hermitage, the little nature reserve next to the Observatory, where I took the whales to see the ducks. The first one shows top-hat-whale watching the ducks over the pond. The second one doesn't show so well, but it's fez-whale meeting a suprisingly friendly robin(can you see him? On the other end of the bench?). And the third one is sun-hat-whale having a doze in the sun, reading the newspaper and enjoying the view.
The plan is to make a couple more whales(cos there's a couple more hats I want to try) and then they'll be shipped off to the Neonatal unit all at once, cos I haven't sent them anything for *ages*.
Happy wednesday!
Hugh.
Saturday, July 5, 2008
Completed Comrade Leonine
Comrade Leonine!
So, what to say about him? He follows the same pattern as the earlier Gay Pride lions, so there wasn't too much pattern to make up. He was also good and quick to knit, since the pattern is small and aimed to be as simple as possible.
Added to the basic pattern is the moustache and little beard - these are sewn on afterwards, and I'm very happy with how they turned out. Being so small it's very delicate getting these bits just right. And then there's his little hat. This is intended to be a little baggy flat cap. I think it could have done with being a little flatter, really. The crinkly bits at the edges came out nicely, but could probably do with being a bit more pronounced. I decided the hat really needed to be lightly stuffed to hold it's shape, but I think it might also have helped to tie the top down a bit to make it less tall and bring out the edges more.
The photos are taken around KB - I took Comrade Leonine and a few of the Gay Pride lions across and had some fun posing them in different positions. There are a couple more photos, and a bit more explanation here: Facebook link.
(I took some sensible pictures too, but they seem kinda dull in comparison - I guess if you're very keen to see more schematic pictures, let me know and I'll post some).
Otherwise, enjoy, and happy July!
Hugh.
Subscribe to:
Posts (Atom)