Shawl Calculations
Posted on June 16, 2023
I’ve just realized that I’m not anywhere close to finishing the shawl I’m knitting, so I’ve done the perfectly logical and rational thing and started a new one.
This one is using some yarn from the stash, so its size is limited by the available yarn, and I wanted to estimate how long it may be, so I weighted the ball of yarn at the beginning and then again after knitting 10 and 20 rows.
It’s a top-down crescent, with 6 increases every two rows (but these calculations should work for any uniform top-down shawl with a regular number of increases), so each block of 10 rows should use an aproximately fixed weight of yarn more than the previous block of 10 rows.
So, let w0 be the weight of the first block of rows, wr the (average) difference between two consecutive blocks and wT the total weight of the shawl. Then the weight used by block i should be wi = w0 + wr ⋅ i and the total weight of the shawl should be:
$$w_T = \sum_{i=0}^{N}w_i = w_0 + w_r ⋅ \frac{N ( N + 1)}{2}$$
where N is the number of blocks in the whole shawl.
This gives:
N2 + N + 2/Wr ⋅ (w0 − wT)
and the only positive solution will be:
$$N = \frac{-1 - \sqrt(1 - \frac{8}{w_r} (w_0 - w_T))}{2}$$
or, in a few lines of python that can be easily copypasted (changing the values in ws
and w_T
, of course):
import math
import statistics
w_T = 200
ws = [2, 4, 6]
w_r = statistics.mean(map(lambda x: x[0] - x[1], zip(ws[1:], ws)))
(-1 + math.sqrt(1 - 8 / w_r * (ws[0] - w_T))) / 2
Which right now (using the actual measured values) tells me I will have about 140 rows in my shawl, but I’d really want to do a few more blocks of 10 rows and have more datapoints before I trust the numbers I’ve put in.
Which means that this shawl will also take forever.
Elena ``of Valhalla''
in reply to Elena ``of Valhalla'' • •also, lol, I see that the support for math in pandoc (which I use to generate my blog) is somewhat partial, and what gets here to friendica is even less.
But then, everybody who knits also reads LaTeX, right? :D