Stripe formation in high-Tc superconductors