The Chinese had multiple theories of the processes and components of the cosmos. The most popular of these beliefs was the Xuan Ye theory, the astronomical view of the cosmos as an infinite space with floating pieces of condensed vapor. The Chinese believed that the Earth consisted of condensed yin and the heavens of yang ; and that these properties coexisted in constant relation to each other, with yin and yang being used together to explain processes on Earth as well of those relating the Earth in conjunction with the heavens. This idea was described by Joseph Needham as a cosmos that functioned similarly to a complex organism, with discernible patterns in an ever-changing structure. There was both a pattern and a randomness to the cosmos. Because of this, the Chinese believed that earthly phenomena could affect heavenly bodies.