Learning the Solution to the Aperture Problem for Pattern Motion with a Hebb Rule