Skip to main content

Building a Broadworm

·1236 words·6 mins
Jules Johnson
Author
Jules Johnson

As mentioned, I am not an expert in computational geometry, so my knowledge on the field is limited. However, I do know that much of the work done so far considering Moser’s worm has to do with the so called “broadworm”, or \(B\). I’ve joked with a friend about building the broadworm as a rite-of-passage for anyone interested in Mosers worm. With that in mind, I’m going to start constructing the broadworm with two assumptions. I think they’re both fair to assume as a starting point, although a more propper proof would demonstrate these both from first principles.

  1. \(B\) is a type 1 curve.
  2. \(B\) is symmetric.

For ease, I’ll let the endpoints of \(B\) be labeled \(P_1\) and \(P_3\), and I’ll let the point \(P_2\) be the point furthest from \(\left\langle P_1,P_3\right\rangle\). I’ll let \(d=\ell\left\langle P_1,P_3\right\rangle\) and let \(h\) be the distance between \(P_2\) and \(\left\langle P_1,P_3\right\rangle\). Immediately, we have that the width of \(B\) is at least \(\min(h,d)\).

Let’s use \(w\) to be the width of \(B\). If one considers two parallel lines with \(B\) between them, with one passing through both \(P_1\) and \(P_3\), then the other parallel line would have to pass through \(P_2\). In this case, the width between these two lines is \(h\), giving no new information.

So suppose instead that neither of the two parallel lines pass through both \(P_1\) and \(P_3\). In order to move forward smoothly, I’ll build the following lemma:

Lemma 1

Let \(B\) be a Type 1 curve with endpoints \(P_1=(0,0)\) and \(P_3=(d,0)\). Let \(y_1(x)\) and \(y_2(x)\) be parallel lines with slope \(m\neq 0\) that are of minimum distance apart with \(B\) between them. At least one of \(y_1(x)\) and \(y_2(x)\) pass through a single endpoint of \(B\).

proof:

Because neither \(y_1(x)\) nor \(y_2(x)\) are horizontal, they must both have an \(x\)-intercept. Let’s define \(y_1(x)\) to be the line with a smaller \(x\)-intercept. Suppose first that \(m<0\), so that the entirety of \(B\) lies on or above \(y_1(x)\). Note that the entirety of \(B\) aside from the endpoints lie above and to the right of \(P_1\), meaning that \(y_1(x)\) must pass through \(P_1\).

By symmetry, \(y_2(x)\) must pass through \(P_3\) if \(m>0\).

\(\square\)

This can be taken a step further:

Lemma 2

Let \(B\) be a Type 1 curve with endpoints \(P_1=(0,0)\) and \(P_3=(d,0)\) that has the maximum width possible for curves with length 1. Assume also that \(B\) is symmetric around the line \(x=\frac{d}{2}\). If \(P_2\) is the point of \(B\) with the largest \(y\)-value, then there are two points, called \(E_1\) and \(E_2\), such that

$$B_{P_2}^{P_3}=\left\langle P_2,E_1\right\rangle\Cup B_{E_1}^{E_2}\Cup\left\langle P_2,E_1\right\rangle$$

Where \(B_{E_1}^{E_2}\) is an arc of a circle centered at \(P_1\), and \(\left\langle P_2,E_1\right\rangle\) and \(\left\langle P_2,E_1\right\rangle\) are tangent to that circle. The \(y\)-value of \(P_2\) is \(w\)

In other words, \(B\) consists of two symmetric halves, each of which is a pair of straight lines connected by a circular arc.

proof:

Let \(y_1(x)\) and \(y_2(x)\) be two lines with negative slope such that \(B\) lies entirely on or between \(y_1(x)\) and \(y_2(x)\) with minimal distance between them. Because neither \(y_1(x)\) nor \(y_2(x)\) are horizontal, they must both have an \(x\)-intercept. Let’s define \(y_1(x)\) to be the line with a smaller \(x\)-intercept. We immediately have that the entirety of \(B\) lies on or above \(y_1(x)\). We have defined \(P_2\) to be the highest point of \(B\), so the entirely of \(B_{P_1}^{P_2}\) has positive slope. Therefore, \(y_2(x)\) passes through \(B_{P_2}^{P_3}\).

Let \(w\) be the width of \(B\). Because \(y_1(x)\) passes through \(P_1\), the entirety of \(B_{P_2}^{P_3}\) must lie at a distance of at least \(w\) from \(P_1\). Because \(B\) is a type 1 curve, \(B_{P_2}^{P_3}\) is a segment of the convex hull of \(P_2\), \(P_3\) and the circle centered at \(P_1\) with radius \(w\).

By symmetry, the same is also true for circumstances in which the slope of \(y_1(x)\) and \(y_2(x)\) is positive. We now have that \(B\) consists of:

  • \(S_1\): An arc of the radius \(w\) circle centered at \(P_3\)
  • \(S_2\): A line segment tangent to \(S_1\) passing through \(P_1\)
  • \(S_3\): A line segment tangent to \(S_1\) passing through \(P_2\)
  • \(S_4\): An arc of the radius \(w\) circle centered at \(P_1\)
  • \(S_5\): A line segment tangent to \(S_4\) passing through \(P_3\)
  • \(S_6\): A line segment tangent to \(S_4\) passing through \(P_2\)

Keeping \(d\) and \(w\) constant, it must not be possible to move \(P_2=\left(\frac{d}{2},h\right)\) to a location that decreases the length of \(B\). We already know that \(P_{2y}\geq w\), because it is possible to fit \(B\) inside the parallel lines \(y=0\) and \(y=h\), which have a distance between them of \(h\). It’s nice to note that the distance between \(P_2\) and \(P_1\) is necesarily greater than \(w\), and the same is true for \(P_2\) and \(P_3\).

Lowering \(P_2\) brings it closer to both \(P_1\) and \(P_3\). Therefore, lowering the height of \(P_2\) decreases the length of both \(S_1\cup S_3\) and \(S_4\cup S_6\). Therefore, \(P_{2y}\) is as low as possible, and so is equal to \(h\)

\(\square\)

What is the total length of all these curves? Let’s focus on specifically the right hand side of \(B\). Define \(E_1\) and \(E_2\) to be the endpoints of a circle with radius \(w\) and center \(P_1\), and let them lie at angles of \(\theta_1\) and \(\theta_2\), such that

$$E_1=\left(w\cos(\theta_1),w\sin(\theta_1)\right)$$ $$E_2=\left(w\cos(\theta_2),w\sin(\theta_2)\right)$$

The length of this circular arc is simply \(w(\theta_2-\theta_1)\). Therefore, in order to give \(B\) a length of 1, we need that:

$$\frac{1}{2}=\ell\left\langle P_2,E_2\right\rangle + w(\theta_2-\theta_1) + \ell\left\langle E_1,P_3\right\rangle$$

As discussed, the length of a line segment tangent to a circle with radius \(r\) to a point with distance \(p\) to the circle’s center is \(\sqrt{p^2-r^2}\). in this case, the radius of the circle is \(w\), and the distance from the origin to \(P_2\) is \(\sqrt{\frac{d^2}{4}+w^2}\). Therefore, the length of \(\left\langle P_2,E_2\right\rangle\) is:

$$\ell\left\langle P_2,E_2\right\rangle=\sqrt{\frac{d^2}{4}+w^2-w^2}=\frac{d}{2}$$

By the same method, we can easily find the length of \(\left\langle E_1,P_3\right\rangle\):

$$\ell\left\langle E_1,P_3\right\rangle=\sqrt{d^2-w^2}$$

The same result also gives the angle between \(P_2\) and \(E_2\) as \(\arccos\left(\frac{w}{\sqrt{\frac{d^2}{4}+w^2}}\right)\). The angle to \(P_2\) is \(\arctan\left(\frac{2w}{d}\right)\). Therefore, we deduce that:

$$\theta_2 =\arctan\left(\frac{2w}{d}\right)-\arccos\left(\frac{w}{\sqrt{\frac{d^2}{4}+w^2}}\right)$$

This can be simplified, as shown[1]In the interest of transparency, this identity was pointed out to me by Emma Joe Anderson. It greatly simplifies calculations further on.:

$$\begin{align*} \theta_2 &=\arctan\left(\frac{2w}{d}\right)-\arccos\left(\frac{w}{\sqrt{\frac{d^2}{4}+w^2}}\right)\\ &=\arctan\left(\frac{2w}{d}\right)-\arctan\left(\frac{d}{2w}\right)\\ &=2\arctan\left(\frac{2w}{d}\right)-\frac{\pi}{2}\\ \end{align*}$$

And the same method gives \(\theta_1\) as well:

$$\theta_1=\arccos\left(\frac{w}{d}\right)$$

Finally, to give \(B\) a length of 1, we can get by substitution:

$$\frac{1}{2}=\frac{d}{2} + w\left(-\frac{\pi}{2}+2\arctan\left(\frac{2w}{d}\right)-\arccos\left(\frac{w}{d}\right)\right) + \sqrt{d^2-w^2}$$

Therefore, the value of \(w\) is simply a function of \(d\), and our goal is to find the value of \(d\) that maximizes it. To do this, we’ll take the derivative with respect to \(d\):

$$0 =\frac{1}{2}+ w’\left(-\frac{\pi}{2}+2\arctan\left(\frac{2w}{d}\right)-\arccos\left(\frac{w}{d}\right)\right)+w\left(\frac{4dw’-4w}{d^2+4w^2}+\frac{dw’-w}{d^2\sqrt{1-\frac{w^2}{d^2}}}\right)+\frac{d-ww’}{\sqrt{d^2-w^2}}$$

Because we want to maximize \(w\), we’ll set \(w’\) equal to 0:

$$\begin{align*} 0 &=\frac{1}{2}+w\left(\frac{-4w}{d^2\left(1+\frac{4w^2}{d^2}\right)}+\frac{-w}{d^2\sqrt{1-\frac{w^2}{d^2}}}\right)+\frac{d}{\sqrt{d^2-w^2}}\\ 0 &=\frac{1}{2}-\frac{4w^2}{d^2+4w^2}-\frac{w^2}{d\sqrt{d^2-w^2}}+\frac{d}{\sqrt{d^2-w^2}}\\ 0 &=\frac{d^2+4w^2}{2d^2+8w^2}-\frac{8w^2}{2d^2+8w^2}+\frac{d^2-w^2}{d\sqrt{d^2-w^2}}\\ 0 &=\frac{d^2-4w^2}{2d^2+8w^2}+\frac{d^2-w^2}{d\sqrt{d^2-w^2}}\\ 0 &=\frac{d^2-4w^2}{2d^2+8w^2}+\frac{\sqrt{d^2-w^2}}{d}\\ 0 &=\frac{\left(d^2-4w^2\right)^2}{\left(2d^2+8w^2\right)^2}-\frac{d^2-w^2}{d^2}\\ 0 &=\frac{\left(d^4-8d^2w^2+16w^4\right)}{4\left(d^4+8d^2w^2+16w^2\right)}+\frac{w^2-d^2}{d^2}\\ 0 &=d^2\left(d^4-8d^2w^2+16w^4\right)+4\left(d^4+8d^2w^2+16w^4\right)\left(w^2-d^2\right)\\ 0 &=d^6-8d^4w^2+16d^2w^4+4d^4w^2+32d^2w^4+64w^6-4d^6-32d^4w^2-64d^2w^4\\ 0 &=64w^6-16d^2w^4-36d^4w^2-3d^6\\ \end{align*}$$

This is a cuic equation! Giving its precice solution would be tedious[2]Especially for work that’s already been done by other mathematicians, so I’ll simply note that Wolfram Alpha gives its solutions as

$$w^2\approx -0.58022d^2$$ $$w^2\approx -0.08798d^2$$ $$w^2\approx 0.91821d^2$$

Both \(w\) and \(d\) are real-valued, so we’ll use the last of these. Taking the square root gives the ratio betwen \(w\) and \(d\).

$$w=0.95823d$$

Plugging this into the previous equation from the length of \(d\) gives:

$$\begin{align*} \frac{1}{2} &\approx\frac{d}{2} + 0.95823d\left(-\frac{\pi}{2}+2\arctan\left(1.91646\right)-\arccos\left(0.95823\right)\right) + \sqrt{d^2-0.91821d^2}\\ \frac{1}{2} &\approx 0.5d + 0.95823d\left(-1.5709.+2.17973-0.29005\right)+0.28600d\\ \frac{1}{2} &\approx 4.0445d\\ d &\approx 0.45806 \end{align*}$$

Based on this, we arrive at:

$$w=0.43852$$