Gears are a simple but extraordinary invention. They are not a recent attainment although it is difficult to date their discovery. The oldest finding containing gears (more than 30) is the Antikythera mechanism, made at the end of the second century BC. The Antikythera was an ancient Greek analog computer, capable to follow the sun’s and the moon’s astronomical positions and to predict eclipses [8]. Given the great complexity of the object it is reasonable to assume that the gears’ theory and technique were already highly developed at the time. The first chapter of Mechanical Problems (school of Aristotle, ca 280 BC), which mentions gears, seems to confirm this supposition. It refers to a pair of connected wheels and notes that the direction of rotation is reversed when a wheel drives another wheel.

Another ancient device is the Chinese South Pointing Chariot, a sophisticated tool using a similar mechanism to modern cars differential. Some legends date it as far back as 2600 BC although the first well-documented evidences of its existence are much more recent (after 200 AD) [4, 17].

Surprisingly Nature too, in its ceaseless experimentation, has discovered gears. The nymphs of a small insect, the Issus coleoptratus, have small gear-like structures with inter-meshing teeth that synchronize the movement of their hind legs when they jump. These insects are among the fastest-accelerating creatures, reaching an acceleration of almost 400 g. Their movement is so fast that the nervous system alone can not balance the force impressed to the two legs. The bug can control the trajectory of its jumps only thanks to those natural cogwheels [2].

Nowadays humans use gears on a daily basis. They are present in virtually every device with moving parts: engines, bicycles, analog clocks, kitchen mixers, mills, bottle openers, various types of toys and countless other examples.

Gears are also used in kinetic art. It is worth mentioning Machine with Concrete, by Arthur Ganson: it is a kinetic sculpture driven by an electric engine turning at about 200 revolutions per minute. The sculpture has 12 pairs of gears that reduce the rotation speed to such an extent that the last gear would require well over two trillion years to do a whole rotation. The last gear is embedded in a concrete block, but this does not seem to affect the machine movement at all [1].

Another emblematic example is the “Do Nothing” machine built over a period of 15 years by Lawrence Wahlstrom, a retired clock maker. In 1948 he stumbled across a surplus WWII bombsight containing a complicated cluster of gears. He repaired the device and then started adding more and more gears. Today the machine has more than 740 gears; its complex operation is pleasantly hypnotic and totally useless [11].

The gear icon has a strong symbolic value. It may represent work in general (such as in the national emblems of many republics, including the Italian one), or more specifically the intellectual work with abstractly thinking or concentration. This last meaning is illustrated by the common pictogram of a head with gears inside or by small cogwheels spinning above the head of comics characters [3].

The connection between gears and thought is two-way. A couple of meshing cogwheels are an archetypical mechanism and therefore represents well the incredibly complex mechanism of the mind. On the other hand designing the optimal shape for gears is not an easy task; it requires much thinking and care and presents many subtleties.

The following pages will present some of them.

Tooth Profile

The simplest gear configuration is a pair of round gears arranged on the same plane so that their teeth engage. In this configuration the centers of the two gears are fixed and the gears can rotate around them. We assume that one gear transmits the motion to the other one; and we qualify the first one as the driver and the second one as the driven. Ignoring the teeth, the two gears can be represented by two externally tangent circles that roll without slipping. The circle representing a given gear is called the pitch circle. The rotational speeds of the two gears are inversely proportional to the radii of their pitch circles: the smallest gear spins faster.

The teeth serve to prevent slipping. Assuming that all teeth are equal in size (for both gears) then the number of teeth of each gear is proportional to the gear size. Therefore the ratio between the number of teeth of the two gears is equal to the inverse ratio between their rotation speed.

Teeth are essential in a real mechanism, but properly designing their shape is not an easy task. The squared teeth that often appear in pictograms and comics are easy to understand and to draw, but they are functionally unsuitable (see Fig. 1).

Fig. 1
figure 1

Two circular gears with square teeth

A first problem comes from the sharp corners. They happen to transmit the whole force: this generates friction and tends to wear down the tooth profile.

In addition this kind of tooth shape does not guarantee a constant speed ratio between the two gears: if the driver rotates at constant speed then the driven is subject to repeated abrupt accelerations and decelerations depending on the position of the contact point.

Finally the two gears tend to wobble a bit. If the driver stays stationary then the driven can rotate freely through a small angle. It is possible to reduce this flaw by changing the teeth width, but beyond a certain limit the two gears get stuck together.

In a page of the Madrid Codex I (1490–1499) by Leonardo da Vinci, there are two pairs of gears: the first pair features squared teeth while the second pair has rounded teeth. The last design reduces the friction, but the other two flaws (non constant speed ratio and wobbling) are still present. Leonardo was aware that the movement of the contact point can affect the speed ratio, but this defect is negligible if the gears rotate slowly and under small load. It becomes much more serious a flaw in modern industrial applications [5].

Finding the most efficient shape for gear teeth became an important subject of mathematical interest: for more than two centuries many mathematicians worked on the problem, including Girard Desargues (ca. 1650), Girolamo Cardano (1557), Philip de La Hire (1694), Charles Étienne Louis Camus (1733) and Leonhard Euler (1754).

Eventually they found two different solutions that ensure a perfectly constant ratio between the rotation speeds. One solution requires a tooth profile based on epicycloid and hypocycloid curves, which are the curves generated by a circle rolling without slipping around the outside and inside of another circle respectively. The other solution is based on the involute curve that is the figure traced by the end an imaginary taut string as it is wound onto a circle.

These solutions are common today but were implemented extensively only since the nineteenth century. The involute gear profile is currently the most widespread: it is used in almost all industrial gears. The cycloidal gears are used predominantly in watchmaking [10, 16].

Let us analyse the involute gear profile a bit closer. Suppose that we have two circles next to each other but not in contact. A taut rope is rolled up clockwise around the right circle and anticlockwise around the left one. The straight segment of the rope is disposed along the common tangent to the two circumferences as in Fig. 2. Each circle rotates around its center. The two circles rotate in opposite directions with rotation speeds inversely proportional to their sizes. The rope unrolls from the first circle and rolls on the second, remaining taut.

Fig. 2
figure 2

Two involute gears: the teeth profiles are circles’ involutes

Let us fix a point P on the straight rope segment. While the circles rotate, P moves along the common tangent. In the reference frame of each one of the two circles the point P describes an involute curve. If we add two matching teeth, with their profile shaped by these curves, we reckon that point P represents the contact point between the two teeth.

If we remove the rope, the relationship between the gears’ speeds remains constant as we wanted.

In addition, the movement of the contact point is always perpendicular to the tooth profile which ensures the minimum friction and wear [6].

The Maltese Cross

We have seen that the teeth’s shape affects the rotation speed ratio. Not surprisingly the shape of the whole gear affects this ratio even more. In the previous paragraphs we analyzed circular gears with involute teeth profile. This configuration ensures a constant ratio, that is normally required. Sometime we need a more complex relation between the movements of the two gears. For some applications we assume that the driver rotates at steady speed while the driven undergoes a sequence of accelerations and decelerations.

Let us consider, for example, the mechanism that controls the film movement in cinema projectors: each frame must remain still in front of the light beam for several milliseconds in order to impress the image on viewers’ retinas. Then the film must move quickly to the next frame. The speed in this sequence should increase gradually to avoid breaking the film.

One special gear can meet these demands: it is a little masterpiece of mechanics developed for mechanical watches and called Geneva drive (from the city considered to be the birthplace of watchmaking). It is also known as Maltese cross because of its shape (Fig. 3), although there are variants with a number of arms other than four.

Fig. 3
figure 3

Geneva drive (also known as Maltese Cross)

This mechanism has been used in projectors since 1896 and quickly became the most preferred system. It is still used today in the non-digital projectors.

The driver features an eccentrically mounted pin. As the driver moves the pin slips into a groove in the driven gear and makes it turn to a fraction of a complete rotation (90° in the four-arm model). The driver also has a circular disc which lacks a section in correspondence of the pin. When the pin does not engage in the groove the disc locks the driven gear in position.

Elliptical Gears

Between the simple shape of a circle and the intricate profiles of the Geneva drive there are many other shapes that can be used to design pairs of gears with non-constant speeds ratios. A truly remarkable example are elliptical gears.

Oval-shaped gears are not a recent idea: in the Madrid Codex I there is a sketch of a mechanism with a small circular gear rolling over a larger oval-shaped gear. The pivot of the smaller gear can move along a line and the oval gears acts as a cam. Similar apparatuses were used in the past to control the movement of astronomical models or robots.

Surprisingly two identical elliptical gears can rotate around two fixed points and mesh perfectly during the whole movement. The pivot of the elliptical gear must be located in one of the two foci and the distance between the two pivots must be equal to the length of the ellipse’s major axis. With these constraints the two gears’ meshing is geometrically perfect.

Let us see how it works.

We can ignore the teeth and choose the reference frame of one of the two ellipses. The other ellipse rolls on the first one without slippage, perimeter-to-perimeter. The distance between the two pivots must remain the same during the whole movement.

In every moment the two ellipses share a common tangent line that passes through the contact point. The rolling ellipse is the mirror image of the steady one on the common tangent. The traces of the contact point along the two perimeters (highlighted in the Fig. 4) are equal for symmetry reasons: there is no slippage. We need only to check the distance between the pivots: it should remain constant.

Fig. 4
figure 4

Two identical ellipses. One rolls without slipping around the other

One of the ellipse definitions tells us that the sum of the lengths of segments \(AP\) and \(PB\) must be constant and equal to the length of the major axis. For the reflective property of the ellipse and for symmetry reasons it is relatively easy to demonstrate that the segments \(AP\) and PB’ are on the same line and that the sum of their length is also constant.

Therefore also the segment AB’ length is constant, as we required.

The ratio between the rotation speeds varies continuously with a continuous smooth acceleration/deceleration. This makes elliptical gears well suited for a number of industrial applications. They are commonly used in bundling machines, conveyor systems, the textile industry, printing machines, etc.

The chain of five elliptical gears shown in Fig. 5 is mesmerizing when moving. The acceleration/deceleration of the movement is transmitted back and forth as a wave between the driver and the last driven gear. In some positions the mechanism seems doomed to get stuck, but surprisingly all the gears are able to disengage from each other and to continue their smooth movement.

Fig. 5
figure 5

Two frames of the animation of a train of five elliptical gears

An elliptic gear with the pin at the ellipse center does not work so well. Figure 6 shows a couple of gears that lose contact during the rotation. Nevertheless it is possible to find a curve that looks like an ellipse and works well. Figure 7 shows an example of two gears that roll smoothly without losing contact. This configuration is useful to make pumps or flowmeters. We will see in the following paragraphs how to build such a curve.

Fig. 6
figure 6

Two elliptical gears with pivots at center. They lose contact during the rotation

Fig. 7
figure 7

Two perfectly meshing oval gears with pivots at center

Nautilus Gears

In addition to circles and ellipses many other curves can create pairs of identical gears that mesh together with perfect fit. Let us examine another simple case like the spiral. There are many simple curves with a spiral-like shape. Do they meet our requirements?

The simplest spiral-like curve is perhaps the Archimedean spiral. In polar coordinates the radius grows proportionally to the angle: \(r=a+b\theta\). Unfortunately this curve does not work: two identical Archimedean-spiral shaped gears loose contact during the rotation (see Fig. 8).

Fig. 8
figure 8

Two identical Archimedean spiral shaped gears. They lose contact when they roll without slipping

Another spiral-like curve gives us an exact result: the logarithmic spiral. It is a beautiful curve which applies to many different natural phenomena among which the Nautilus shell, the pattern of sunflowers pistils, the configuration of a cyclone’s clouds and even some galaxies’ arms. The Swiss mathematician Jacob Bernoulli (not to be confused with other mathematicians and physicists of the exceptionally talented Bernoulli family) named this curve Spira mirabilis (Latin for The marvelous spiral). He wanted a similar spiral engraved on his tomb, along with the phrase Eadem mutata resurgo (Changed and yet the same, I rise again) which refers to the characteristic of the curve to remain identical subjected to different types of mathematical transformations. As we will see this feature also applies to the gear world: the shape of a gear that mates perfectly with a logarithmic-spiral-shaped gear is again a logarithmic spiral.

Unfortunately for Jacob, the math skills of the stonemasons was limited: the curve engraved on his tomb is definitely an Archimedean spiral.

Two identical gears shaped like two logarithmic spirals mesh perfectly for the whole movement (Fig. 9). Let us check that this is the case.

Fig. 9
figure 9

“Nautilus” gears. Their shape is a logarithmic spiral and they mesh perfectly

We divide the spiral gear in a large number of slices, each with the same central angle. We can approximate each slice as a thin triangle. According to the logarithmic spiral properties these thin triangles have different sizes, but the same form. The ratio between the sizes of any two adjacent triangles is constant.

Now we unfold the spiral in such a way that the longer edges of the triangles are all parallel. The shortest sides, which composed the spiral profile create a straight line and the triangles vertices that were at the center of the spiral arrange themselves along another line.

Let us repeat this operation with the other gear and place the two figures in contact along the lines representing the two spiral curves. The final result is a rectangle cut into two equal parts along a diagonal line. All the points along the longest sides of the rectangle correspond to the centers of the two gears. The diagonal line corresponds to the profile of the two gears (Fig. 10).

Fig. 10
figure 10

Two “Nautilus” gears unfolded

In this configuration any point on the first curve coincides with a given point on the second curve. These couples of points are going to touch at a given moment during the gears meshing in the original configuration.

The distance between the two pivots is represented by the rectangle shorter side and therefore remains fixed regardless of contact point position.

The spiral gears (also known as Nautilus gears) have a certain aesthetic value, and can be easily found in toys and puzzles.

The pin of a single nautilus gear rolling on a rack (a linear gear) moves along a sloping line. This fact has an unexpected and interesting practical utilization in rock climbing where a piece of protection equipment called Spring-loaded camming device or Cam or Friend consists of two, three, or four cams shaped as logarithmic spiral.

The device is inserted in a crack in the rock; the cams engage with the rock and spread farther apart. If the climber falls, the pull force is converted into outwards pressure on the rock preventing the removal of the unit [7].

Free-Shape Gears

After these specific examples it is natural to scale up to the general case: given an arbitrarily shaped gear, which form must the other gear have in order to perfectly mesh with the first?

Let us define the problem more precisely and ignore the teeth (at first): the two gears are represented by two curves. The two curves should rotate, each one about its own center. At the contact point they should roll over each other without slippage.

For each curve we define a starting point: the two starting points touch each other at the beginning. It is convenient to describe the curves in polar coordinates: each curve point is identified by the radius (the distance between the point and the gear center) and the polar angle (the angle from a reference direction, e.g. the direction of the starting point). During the rotation the points of the first curve come in contact with the points of the second one. This define a relationship between points: a point on the first curve corresponds to a point (possibly more than one point) of the second curve if the two points happen to touch each other during the rotation. In the following paragraphs we suppose that the contact points lies always on the line which connects the two centers [12, 14, 15].

The problem is finding the second curve if the first one is given. The curves must meet two constraints: for each pair of corresponding points the sum of radii must be constant (the distance between the centers is fixed) and the distance from the reference points along the two curves must be equal (no slippage).

This problem lends itself to numerical integration. We consider a large number of points evenly spaced on the first curve. Then we want to compute the same number of points for the second curve. Each point must have the same distance from the previous one and as we know its radius, this allows us to compute its polar angle.

There are some other requirements that must be met, in particular: the curve must be closed, e.g. the last radius must be close to the first one and the last angle must be close to 360°.

Actually, the length of the second gear could be an integer multiple of the length of the first gear; so that the second gear would make one full turn while the first one makes \(N\) full turns. In that case our algorithm should generate only the first slice of the second curve, with a maximum angle close to 360°/N. Then this slice should be copied N times to generate the whole second gear.

We can now test this approach on the odd shape that tiles the floor in Palazzo Franchetti hall room, where the conference was held. Let us shape a gear with this profile. A digital animation builds the second gear in real time. Figure 11 shows the final result.

Fig. 11
figure 11

A gear shaped as Palazzo Franchetti floor’s tiles with two possible mating gears

The curve shape depends on the distance between the two pivots. For some values of the distance the curve is closed. Different values generate a different number of lobes (and therefore a different number of complete rotations of the first gear corresponds to a complete rotation of the second one).

In general, we expect the shape of the mating gear to be different from the initial one, but it is possible to design gears that mesh with themselves as in the case of the circular, elliptical and spiral gears.

For example let us try to design an approximately square gear (Fig. 12). Of the infinite possibilities we chose a gear profile with four linear segments connected by four arcs and decide that the linear segments must have the same length as the curved segments.

Fig. 12
figure 12

Two perfectly meshing identical square-like gears

The problem is to determine the length of the straight segments with respect to the gear size and the exact shape of the curved segments.

During the rotations we expect that for symmetry reasons the straight part of one gear mesh with the curved part of the other and vice versa.

If we knew the length of the linear part we could use the algorithm illustrated in the previous paragraph to determine the curved part length and shape. Then we could evaluate the angle spanned by the linear part and the curved part joined together. This angle should be 90° (four repetitions of the two parts should generate the whole shape), but if we start with a randomly chosen length for the straight part then the angle will be larger or smaller.

The spanning angle depends on the length of the straight part with larger straight segments yielding to larger spanning angles and shorter segments yielding to smaller angles.

The correct length can be determined iteratively, e.g. using a bisection algorithm. At each iteration we select a length, compute the curved part, measure the angle and then correct the length. The iteration terminates when the difference between the spanning angle and 90° is negligible.

With this kind of strategy it is possible to generate any kind of polygon-like gears (e.g. triangular gears, square gears, pentagonal gears, etc. as in Fig. 13) as well as the oval gears (with pivot at center) mentioned before: they correspond to a degenerate polygon with two sides only.

Fig. 13
figure 13

Perfectly meshing polygonal gears

Free-Shape Gears Teeth

Cycloidal and involute tooth profile work well for circular gears only. Non-circular gears require different curves. Indeed each tooth in these gears can require its own different shape to ensure a smooth transmission. There is no general case as the correct profile is not defined by any specific curve: it must be computed and specified numerically.

A simple approach has been proven to be valid and suitable for most applications.

Let us start with an arbitrary closed curve representing the gear. We want to calculate the teeth profile that is another curve following the first one, crossing it in and out and generating teeth tips and roots.

We first need a reference gear: for example a circular gear with involute tooth profile, or even better a rack (a linear gear) with straight tooth flanks. We engage this reference gear with the non circular gear. The latter has no teeth yet, therefore we just roll the pitch curves one onto the other, without slippage.

Figure 14 shows the reference gear teeth profile at different moments during the rotation. The envelope of these curves builds the desired teeth profile [19].

Fig. 14
figure 14

Ten discrete rack positions. The complete movement of the rack around the pitch curve generates the teeth profile

Non-circular Gears in Flesh and Bones

Today the manufacturing of non-circular gears is greatly facilitated, even for small productions. 3D printers or numerically controlled cutting machines can achieve reasonably accurate models suitable for non-critical applications. One does not need to own the appropriate tools as there are many services that accept a file with the model and send back the gears within few days at a very reasonable cost.

The gear shapes can be designed with any popular CAD program. Several plugins are available to do the needed computation. It can be very challenging and satisfactory programming exercise to try and write a program computing the gear shape. Complete applications that perform this task are already available and can easily be found on the web. An example is the excellent Gearify software [9].

In this context designing and building a simple mechanism with non-circular gears can be a very stimulating and interesting didactic or recreational activity.

The Naucleus

The last example illustrates a purely playful use of non-circular gears. Figure 15 depicts the Naucleus, a fantasy object that was the core of an urban adventure created and organized in 2014 by the author with some friends in partnership with the Teatro Argentina of Rome and the acting company Il ratto d’Europa. During the adventure a hundred players (selected among the theatre’s regular audience) had to face unexpected and strange situations, interact with actors, solve puzzles and try to decipher the complex plot in which they were plunged. The event started as a regular representation, but the abrupt kidnapping of the main character by unknown black-dressed men dragged the participants into a quest to rescue her. During the adventure they had to find gears with bizarre shapes: one buried in a flower vase, another disguised as a pendant around a musician’s neck, etc. Eventually they were able to reconstruct the whole Naucleus: an alleged seventeenth century mechanism, that, if properly used, would point at the refuge of the bad guys on an ancient map of Rome [13, 18].

Fig. 15
figure 15

The Naucleus, an alleged seventeenth century mechanism featuring non circular gears. Photo courtesy of Simone Cabasino