Mechanics and morphology of single-walled carbon nanotubes: from graphene to the elastica