Closed-form solutions for funicular cables and arches