How shadows are formed