Drilling deep boreholes that weave complex trajectories in the subsurface has been made possible with the development of directional drilling. The need for complicated well paths arises, within the context of oil-and-gas exploration and production, from a variety of reasons. These include accessing a hydrocarbon reservoir capped by a salt dome, complying with constraints on the location of the rig relative to the target, drilling multiple wells from one location to reduce cost or limit environmental impacts, and rescuing a distressed well. A key factor in the ability to complete complex wells has been the emergence of the rotary steerable systems (RSS) in the late 1990s. These servo-controlled downhole robots steer the bit by either applying a force on the borehole wall or by tilting the bit.