Catenary and pantograph: how does it work?