This is a joint work by​Antonín Slavík, Charles University, Prague, Czech Republic; slavik@karlin.mff.cuni.cz​Stan Wagon, Macalester College, St. Paul, Minnesota, USA; wagon@macalester.edu
Back in January 1990 Wolfram Research organized the first Mathematica conference, in Redwood City, California. The conference banquet was held at San Francisco's Exploratorium and there Leon Hall (Univ. of Missouri, Rolla) and Stan Wagon saw a model of a square wheel rolling smoothly on a certain bumpy road. This was completely new to them, so later that evening they borrowed a computer and exercised their mathematical and Mathematica'l skills to work out the geometry of the construction and make an animation of a square rolling along a sequence of catenaries. That led to some interesting large models: first a full-size tricycle that can be ridden smoothly on a 25-foot road, and more recently a 26,000-pound bridge that can be rolled, by hand, so that boats can pass underneath it. The ideas underlying this bridge design are so radical, nontraditional, and elegant that the bridge won the Bridges Design Award for 2022 [11].
Another consequence of this story is that the bike at Macalester College, which has been in storage for ten years, is now being brought back out for a day or two each year.
Figure 1. In April 2023, many students at Macalester College came to an event that displayed the square-wheel tricycle designed by Stan Wagon.

An Elegant Differential Equation

Initialization code

Suppose a wheel is given in polar coordinates as
r=r(θ)
, with the origin viewed as the center of mass, and the corresponding road (i.e, the road on which the wheel will roll—we assume friction prevents any sliding—with the center of mass moving neither up nor down) is
y=f(x)
; see Figure 1 and note that
y
is negative. Let
θ(x)
be the polar angle defining the point that will touch the road at
x
.
Figure 2. The relationship between a wheel and the corresponding road. Here the road is
cos(x)-
17
and the wheel’s polar form is
r=
17
-
9+
17
-8
2
tan
(2θ)
9+
17
+8
2
tan
(2θ)
.
We have the radius condition:
f(x)=-r(θ(x))
. And matching the arc length of the road to the relevant part of the perimeter of the wheel (using the polar coordinate arc length formula) leads to
x
∫
0
1+
2
(
∂
t
f(t))
t=
θ(x)
∫
-
π
2
2
r(α)
+
2
(
∂
α
r(α))
α
. We can use the radius condition and differentiation of this equality to get the arc length condition:
1+
2
[
′
r
(θ(x))
′
θ
(x)]
=
2
θ
x
2
r(θ)
+
2
r
θ
. And that leads to the simple and elegant differential equation
θ
x
=
1
r(θ(x))
, with initial value
θ(0)=-
π
2
. This can all be automated using differentiation and
Solve
as follows.
In[]:=
Solve
∂
x

x
∫
0
1+
2
(
∂
t
(-r[θ[t]]))
t
θ[x]
∫
-π/2
2
r[α]
+
2
(
∂
α
r[α])
α,
∂
x
θ[x],Reals,Assumptions->r[θ[x]]>0
Out[]=

′
θ
[x]
1
r[θ[x]]

The road is then
y=-r(θ(x))
where
θ(x)
is the solution to the differential equation. Because θ is an increasing function of
x
, it has an inverse
x(θ)
which satisfies
x
θ
=r(θ)
; this can be solved by the definite integral
x=
θ
∫
-π/2
r(t)t
. The result must then be inverted to get
θ(x)
. For more on these formulas, and variants in the case that the wheel is given in a different form, see [2, 6, 7, 8, 9, 10].
Here we always take the polar center of the wheel to be
(0,0)
. It might happen that this point is not inside the wheel. Later we will see the importance of a wheel that is a circle some distance from the origin. Or the wheel might be simply a straight line.

The Catenary Road for a Straight Line

If
r(θ)=1
, the wheel is a circle,
θ(x)=x-
π
2
, and the road is the straight line
y=-1
. But if
r(θ)=-cscθ
, then the wheel is a straight line (here
-π<θ<0
) and the road turns out to be the catenary
y=-coshx=
1
2
(
x

+
-x

)
. The intermediate equations relating θ and
x
are
θ=-2
-1
cot
(
x

)
and
x=-ln-tan
θ
2
. Here is how to solve the differential equation and obtain the road in one line.
In[]:=
ExpToTrigTrigExpandCsc[θ[x]]/.DSolve
′
θ
[x]Csc[θ[x]]-1&&θ[0]-
π
2
,θ[x],x1
Out[]=
-Cosh[x]
Here is how to get all the relationships from a solution to the differential equation.
In[]:=
r[θ_]:=-Csc[θ];​​θFunc=θ[x]/.DSolve
′
θ
[x]r[θ[x]]1&&θ[0]-
π
2
,θ[x],x1​​Simplify[x/.Solve[θθFunc,x,]〚1〛,-π<θ<0]/.Log[z_]Log-
1
z
​​ExpToTrig[TrigExpand[-r[θFunc]]]
Out[]=
-2ArcCot[
x

]
Out[]=
LogTan
θ
2

Out[]=
-Cosh[x]
Here are the same results, using the definite integration formulation (the assumption on ρ is needed for the integration).
In[]:=
xLine=Assuming-
π
2
≤ρ<0,
ρ
∫
-
π
2
r[θ]θ/.ρθ​​θFunc=FullSimplify[θ/.Solve[xxLine,θ]〚1〛,x∈Reals]/.

1
0​​ExpToTrig[TrigExpand[-r[θFunc]]]
Out[]=
-Log-Tan
θ
2

Out[]=
-2ArcCot[
x

]
Out[]=
-Cosh[x]
Figure 3 shows an infinite line rolling along a catenary. The "center" of the line — the point
(0,0)
— moves along the
x
-axis. Remarkably, this relationship was discovered by James Clerk Maxwell: in February, 1849 (he was 18 at the time) he published a paper [3] with many examples of rolling wheels. Maxwell’s example 12 [3, p. 537] says
"The straight line whose equation is
r=asecθ
, rolled on a catenary whose parameter is
a
, traces a line whose distance from the vertex is
a
."

A Square Wheel

Figure 4. A square rolls on inverted catenaries.
Figure 8. A demonstration that illustrates several road–wheel relationships. An additional case of a “4-loop sawtooth” can be found in the full demonstration here https://demonstrations.wolfram.com/RoadsAndWheels/.

The Cody Dock Bridge

Figure 14. This demonstration allows one to change the amount of rounding at the corners of the square.

Triangular Difficulties

Figure 19. A demonstration for rolling triangles, squares, pentagons, and hexagons.

Conclusion: The Perfect Catenary

References

12. Exploratorium, Square wheels, https://www.exploratorium.edu/snacks/square-wheels and https://www.exploratorium.edu/exhibits/square-wheel.

CITE THIS NOTEBOOK

A Rolling Square Bridge: Reimagining the Wheel​
by Stan Wagon and Antonín Slavík​
Wolfram Community, STAFF PICKS, May 9 2023
​https://community.wolfram.com/groups/-/m/t/2917199