A new approach to the shaded picture problem