The stimulus-to-perception connection: a simulation study in the epistemology of perception