With a couple of loops and a bit of maths you can create a rotating spiral.
Tunnel excavation involves lots of boring mathematics.