# Yarn-like functions

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.

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

My own try:

*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. I know of no such curve, and so I abandoned this way of thinking about the problem. But, I thought I'd share. *

Updated to add a drawing of the projection idea.

Update 2:

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 might be relevant: math.stackexchange.com/questions/9510/optimal-yarn-balls – joriki Apr 22 '11 at 6:19
Ha! Yeah, I put a 100 point bounty on that question-- Only to realize it's not a well-defined question... or even the one I was really interested in... :) 100 points down the drain... – futurebird Apr 22 '11 at 11:36
You're forgetting friction, which plays a very important role. If you had a perfectly smooth sphere and yarn, you will not be able to roll the yarn around the ball, as it would easily slip off. On the other hand, if you had infinite friction, you could make arbitrarily sharp turns. – user4423 May 13 '11 at 1:41

The following Maxima code plots a curve that might do what you want. The idea is to start with a point describing a circle on the sphere. Next we introduce rotations of the coordinate frame around each of the axes. The rotation angles vary linearly with time. All quotients of "periods" involved should be irrational. I think it is true that eventually you will pass as close as you want to any given point. This is already true for one rotation. I do not know how to prove or disprove your density requirements. It should be possible to calculate the curvature as a function of t. It is possible that two instead of three rotations are enough.

To visually assess the density of the curve you could use an equal area map such as the Lambert azimuthal projection (of any hemisphere).

rotx(a, p) := [ p[1], cos(a)*p[2] - sin(a)*p[3], sin(a)*p[2] + cos(a)*p[3] ];
roty(a, p) := [ sin(a)*p[3] + cos(a)*p[1], p[2], cos(a)*p[3] - sin(a)*p[1] ];
rotz(a, p) := [ cos(a)*p[1] - sin(a)*p[2], sin(a)*p[1] + cos(a)*p[2], p[3] ];

b1 : %pi;
b2 : %pi^2;
b3 : %pi^3;

f0(t) := [ cos(t), sin(t), 0 ];
f1(t) := rotx(t/b1, f0(t));
f2(t) := roty(t/b2, f1(t));
f3(t) := rotz(t/b3, f2(t));

T : 400;
plot3d(f3(t)*s, [t, 0, T], [s, 1, 1+1e-2], [grid, 8*T, 1]);


-
Interesting... so it's something like a Lissajous curve on the sphere? – J. M. May 13 '11 at 1:54

http://en.wikipedia.org/wiki/Hairy_ball_theorem

(Henri Poincaré ) . You cannot comb parallel filaments without coming to a singularity.

Practically let us say if 10 percent of area is left out for thick lump/tuft formation at north and south poles, then "Involutes" on a sphere can be employed. A bundle of equal diameter yarn packed side by side along a S-shaped spirals touching at sides without any gaps is possible. Sending a sketch.

EDIT1:May be more explanation is needed. I have indicated just one possibility.There is no way to avoid lumping using a single axis of rotation. The pictured case has constant thickness of cover and designed to have compacted twisted/bent tubes whose number and diameter can be chosen.

Meridian: $r^2 + z^2 = a^2$

$z/sqrt(r^2 -{r_b}^2) = a k_g = a/R_g$

Yarns exaggeratedly shown as tubes,being geodesic at equator $r=a$ and become cusps at $r={r_b}$ with zero ${R_g}$.

The axis of rotation has to be constantly changed. Axis may be further rotated with uniform coverage along icosahedron diameters for example, or other with other spherical symmetry axis sets that guarantee uniform area coverage with increasing deposition of yarn while programming a CNC machine or robot. The shallowness of "forbidden polar caps" would be averaged out and disappear with more yarn deposition.

-