Charles Darwin's book The Structure and Distribution of Coral Reefs on his theory of atoll formation was published in May 1842 after more than three years of work, and he then wrote his first "pencil sketch" of his theory of natural selection.