Discrete elastica for shape design of gridshells. (15th August 2018)