Weak and strong confinements in prismatic and cylindrical nanostructures