Can Simple Cells Learn Curves? A Hebbian Model in a Structured Environment