← Iris

Switch Straight
Signal Clear
Train Idle
Train speed 3
Switch speed 2
Train length 5

How it works

A railroad switch (or turnout) allows a train to be directed from one track to another. The key components are the switch rails (also called points blades) — two tapered steel rails that can slide laterally. In the “normal” position, one blade presses against the stock rail to form a continuous path for the straight route, while the other blade is pulled away from its stock rail. When the switch is thrown, the blades move together via a tie bar (a rigid connecting rod), reversing which blade is closed and which is open, thereby redirecting trains to the diverging route.

The simulation shows a top-down view. You can see the two stock rails running straight, the diverging rails curving away, the tapered points blades connected by the tie bar, and a signal that indicates the current route. The lever at the bottom controls the switch. When you click it (or press the “Throw switch” button), the points blades slide from one position to the other with a smooth mechanical motion. The signal changes color to match. Sending a train shows a consist of cars following the selected route through the switch geometry.

The mechanics

In a real switch, the points blades are typically 5 to 7 meters long, machined to a fine taper at their tips. They pivot at the heel (the thick end, near the frog where the rails cross) and slide at the toe (the thin end, nearest the approaching train). The throw distance — how far the blades move laterally — is typically about 100 to 150 millimeters. The tie bar ensures both blades move simultaneously and by exactly the same amount: when one closes against its stock rail, the other opens by the same distance. This mechanical linkage is critical for safety — a switch that is neither fully normal nor fully reverse creates a gap that can derail a train.

Modern switches are thrown by electric or hydraulic point machines, but the fundamental geometry has not changed since the early days of rail. The simulation uses a hand lever, which was the original mechanism and is still used on low-traffic lines and in rail yards. The lever connects to the tie bar through a crank and rod assembly. Throwing the lever requires overcoming the friction of the blades sliding on their bed plates — a satisfying, heavy mechanical action that every railroad worker knows well.

Historical significance

The railroad switch is one of the oldest and most consequential inventions in transportation engineering. The earliest switches appeared on British colliery tramways in the late 18th century, initially as crude “stub switches” where the entire rail end was moved laterally. The modern design with tapered points blades was developed in the 1830s and 1840s as railways expanded rapidly across Britain and Europe. The switch made the railroad network possible: without it, every rail line would be an isolated path from A to B. With it, trains could be routed through complex junctions, sorted in marshalling yards, and diverted around obstacles.

The interlocking system — a mechanical or electrical framework that prevents conflicting switch and signal settings — was developed in response to a series of deadly accidents in the 1850s and 1860s. John Saxby patented the first practical interlocking frame in 1856. The principle is elegant: signals and switches are connected by a system of levers, rods, and locks such that it is physically impossible to clear a signal for a route unless every switch along that route is correctly set and locked. This is one of the earliest examples of a safety-critical system designed so that mechanical constraints prevent human error — a principle that later influenced the design of everything from aircraft controls to nuclear reactor safeties.

The frog and the guard rail

At the point where the diverging rail crosses the straight rail, there must be a gap — the frog (named for its resemblance to the fork in a horse’s hoof). The frog is a specially engineered casting that allows wheel flanges to pass through the crossing. But the gap creates a moment of vulnerability where a wheel could take the wrong path. To prevent this, guard rails (or check rails) are placed opposite the frog, pressing against the inside of the wheel on the other rail to keep it aligned. The interplay of frog, guard rail, and wheel geometry is one of the subtler engineering challenges in railroad track design, and it imposes constraints on the minimum radius of the diverging route and the maximum speed at which trains can traverse the switch.