Why do the tail and coma of a comet form only when it is nearing the sun?​