Shape transformations in single-layer carbon nanotubes