Saturday, January 22, 2011

String Art Mathematics, or Something to do in Boring Meetings

"String art" used to be a big deal. You would put pins into a board in patterns, then run strings between them to create patterns. I've always wondered what curves are formed by the collection of strings. Yeah, I probably could just look it up on Wikipedia these days, but what's the fun in that? I've had enough boring meetings lately that I've been able to work out the most basic curve.


In this one, you make an "L" of nails. Let's say it's ten nails up (in the Y direction) and ten to the right (in the X direction.) Then you stretch a string from the top most nail (x=0, y=10) to the first one to the right of the vertex (x=1, y=0). Then you run a string from the second on on the right (x=2, y=0) to the second from the top (x=0, y=9). And so on until all the nails have strings stretched between them. A curved pattern is formed, beyond which there are no strings. What's the formula?

First, each string forms a line, which can be described by the following familiar formula

(y-y1) = (y2-y1)/(x2-x1)  * (x-x1)

x and y are variables in the final equation. (x1,y1) and (x2,y2) are two points known to be on the curve, in our case the location of the nails. You can pick either point to make things come out better. If we decide that the point on the y axis is (x1,y1) then the other is (x2,y2), then the first string is described by

(y-10) = (0-10)/(1-0) * (x-0)

Rearranging a little gives
y = -10 x + 10

A little back substitution shows that this is correct: when x is 0, y is 10, and when x is 1, y is 0.

The next line down is

(y-9) = (0-9)/(2-0) * (x-0)
or
y= -4.5 x + 9.

We could keep doing this for each set of nails, but there's a shortcut. Notice that if you stay on the axes (don't take the shortcut across the field) the distance is always the same. In the first set it's ten steps down to the origin then one to the right, for a total of 11. In the second point it's nine steps down, two to the right, still 11. This continues to the end of the pattern. Let's call that total "S". If we start some distance to the right of the origin (let's call it "a") then the second point will be S-a up the Y axis. Our two points, then will be
(x1,y1) = (0, S-a)
and
(x2,y2) = (a, 0)

If we put this into our line formula we get

(y-(S-a)) = (0-(S-a))/(a-0) * (x-0)
y = (a-S)/a * x + (S-a)

This is great! One formula describes all the strings. What's better, it also describes any string you want to put in, anywhere along the line. We can also (at least in our minds) imagine a nail placed at 1.5 or 7.125 or 3.1415926 ..... on the X axis, then describe the line that connects it to its partner on the Y axis. As you add more lines the curve gets smoother. Here is is at intervals of 0.25, but the interval could be as small as you like.



So now what? Is there a simple way to describe the boundary between the stringy part and the empty part?  It is a problem of maximization, which I'll discuss soon.

No comments:

Post a Comment