We're using Godot, so it might be a little different depending on your engine.
The cable is a Line2D that has it's points populated by a Curve2D Node(generates bezier curves).
The second and third parameters on AddPoint are the in/out vector of the bezier curve.
Once we generate the points we apply them to the Line2Ds Points property. For the shadow we just copy the line 100 units down :)