Dreaming is a mental condition that occurs during sleep. It consists of scattered, semi-random pieces of data packets within the human mind. Perhaps in other animal minds, also. The reason appears to be because the human eye doesn't have many capillaries, and so oxygen has to be pumped directly through the eye to reach the lens cells. It has been demonstrated that eye damage will be caused by sleep without rapid eye movement (REM). A side effect of this is that the lower brain functions have to be slightly activated, causing an increased electrical level in the brain, inducing hallucinations called dreams. Sometimes the random nature of these hallucinations can give a person insight in into new arrangements of data packets.
"I have a friend who's an artist, and he sometimes takes a view which I don't agree with. He'll hold up a flower and say, 'Look how beautiful it is,' and I'll agree. But then he'll say, 'I, as an artist, can see how beautiful a flower is. But you, as a scientist, take it all apart and it becomes dull.' I think he is kind of nutty.
First of all, the beauty that he sees is available to other people - and to me, too, I believe. Although I might not be quite as refined aesthetically as he is, I can appreciate the beauty of a flower. But at the same time, I see much more that he sees. I can imagine the cells inside, which also have a beauty. There's beauty not just at the dimension of one centimeter; there's also beauty at a smaller dimension.
There are the complicated actions of the cells, and other processes. The fact that the colors in the flower have evolved in order to attract insects to pollinate it is interesting; that means insects can see colors. That adds a question: does this aesthetic sense we have have also exist in lower forms of life? There are all kinds of interesting questions that come from a knowledge of science, which only adds to the excitement and mystery and awe of a flower. It only adds. I don't know how it subtracts."
-- Richard Feynman, Physicist.