# Of yarn and math.

A collection of hand-spun yarn and my spindle. I did not spin all of this yarn, some is from etsy.com

Yarn has been on my mind. It's on my mind because I love to knit, but also because of this post I read some weeks ago on the mathematics stack exchange. The author presents a paper about an "optimal yarn ball" that looks like this:

via. http://arxiv.org/abs/1005.4609

Very cool, but it would be impossible to do that with real yarn! (Though, I doubt that was their goal here.) When wrapping yarn around a ball you cannot make sharp turns or the yarn will fall off. If we think of the yarn as a curve on the surface of the sphere, we would say it must have curvature less than some small constant m. (meaning the best fit tangental circle must have radius greater than $\frac 1m$)

The yarn should be wrapped evenly: it should not overlap itself too often. (This would lead to the yarn ball taking on a non-spherical shape over time. No good!) The distribution of the self-intersections should be of nearly consistent density over the surface of the sphere. The yarn will divide the surface of the sphere in to regions. If $A_i, A_j$ are the areas of any two of these regions then for some small constant F, $|A_i- A_j| < F$, $\forall i, j$.

As the curve is extended further and further (wrapped around more times) the density of intersections should increase and $A_i \rightarrow 0$ for all of the regions.

I know one answer is a randomly generated curve that deviates from a straight path. Overtime it produces a perfect yarn ball. That's how I make my yarn balls, randomness produces even inward tension which forms a sphere.

But, I want to know if there is a non-random answer to this question.

First Thoughts:
In trying to solving this myself I thought it might be a good idea to project the sphere on to the plane, as a Riemann surface. But, since so many of the requirements focus on uniformity, this makes the problem a little strage. Observe: The area of the regions will need to *increase* as we move away from the unit circle toward infinity. If the curve ever passes through the north pole, then the plane version would shoot off to infinity. What I found even more weird is what would happen if the curve simply passed very near, but not through, the north pole. Then, on the plane, the curve would go very far from the origin and then loop back. By making the curve near enough to the north pole the loops can be as large as we please.

Since wrapping increases the density uniformly, if we observe the wrapping pattern projected on to the plane it would be like loopy knot that, over time, keeps casting bigger and bigger outlier loops, it would always grow and be un-bounded. (even without any intersection with the north pole!)
The requirement about curvature, would mean that the knot could be more curvy inside of the unit circle, and then grow less curvy as we move away from the origin.

Next to find such a curve... Maybe if I projected the following polar plot back on to the Riemann sphere?

The graph of the form $r= \theta^2 \sin (k \theta)$ produced good-looking results for $0 < k <1$... but all of the graphs are far too dense near the origin. Also, wrapping would start in a lop-sided manner, filling in the bottom of the sphere first then moving up... and never reaching the north pole! But, maybe there is some way to tweak this?

(This graph shows the kind of non-random pattern I have in mind for a solution. In a practical sense, a solution to this problem could be used to wind spherical balls of ropes, yarns, or cords in a factory setting. Now, I will think about how I would instruct a robot to wind a yarn ball... if the robot is unable to do things randomly. What would you tell the robot to do?)

This post grew out of a question I asked at the Stack Exchange.