![](https://secure.gravatar.com/avatar/4b4ced3073feb2d1288a7744c747e62b.jpg?s=120&d=mm&r=g)
On Mon, Apr 23, 2012 at 20:34, Mari Voipio
a) I need to be able to stack four of these on top of each other and then four mirrored ones next to them
OK, I really was being stupid - I had already managed to do a "shift" inside a single 'block', somehow I just didn't see that I could do the same to the blocks: \startMPpage picture ll ; % left-hand loop ll := image ( path p, q, r ; p := fullcircle scaled 4mm ; q := p shifted (0mm,10mm) ; r := center p .. (5mm,5mm) .. center q ; pair pr, qr ; pr := p intersectionpoint r ; qr := q intersectionpoint r ; r := r cutbefore pr cutafter qr ; r := r cutends 0.2mm ; draw r withpen pencircle scaled 0.2mm withcolor black ; % the connecting curve draw p withpen pencircle scaled 0.2mm withcolor black ; fill p withcolor black ; % upper shank draw q withpen pencircle scaled 0.2mm withcolor black ; fill q withcolor black ; % lower shank ); draw ll ; draw ll shifted (0mm,20mm) ; draw ll shifted (0mm,40mm) ; draw ll shifted (0mm,60mm) ; \stopMPpage
Keeping in mind that I will have to be able to draw a path/arrow on top, so I need to know where they are.
My little brain got an overflow from all this abstract thinking, but then it dawned on me that I could use the millimeter grid recipe in the MetaFun manual (p. 214) to draw a grid behind my pattern drawing. Now placing the arrows should be a walk in the park...
b) The circles p and q can be filled with the same colour or two different colours, and each of the blocks in a pattern can have different fill colour
I assume the answer is "use variables", but how?
Gaah, I still cannot figure it out! A real example: one of my own patterns has white up and down on first loop, black up white down on second, white up and down on third and blue up and down on fourth. So I'd need draw ll ; % and fill both circles with white draw ll shifted (0mm,20mm) ; % and fill lower circle with white, shifted/upper circle with black draw ll shifted (0mm,40mm) ; % fill both circles with white draw ll shifted (0mm,60mm) ; % fill both circles with blue What is the shortest way of doing this? I don't mind writing definitions earlier in the file, but I'd rather keep this part as short as possible to be able to see the pattern at one glance. The main problem comes from the bicoloured loops as I can't just apply the same fill on both. And on the whole I'd prefer to make sure I apply the fill only locally per each half-loop and not all over the place... Getting closer, Mari PS. I don't have any photos of the above braid, but here's a typical fingerloop braid that I did and need to document: http://www.lucet.fi/2012/04/sydamellista-hearty/