How is an afterimage formed?

Can you answer this question?