Geometry and Topology of Nanotubes and Nanotori