Zhang applied his extensive knowledge of mechanics and gears in several of his inventions. He invented the world's first armillary sphere, to represent astronomical observation; and invented the world's first seismometer, which discerned the cardinal direction of an earthquake away. Furthermore, he improved previous Chinese calculations of the . In addition to documenting about 14,000 stars in his extensive star catalogue, Zhang also posited theories about the Moon and its relationship to the Sun; specifically, he discussed the Moon's sphericity, its illumination by reflecting sunlight on one side and remaining dark on the other, and the nature of and eclipses. His '''' and '''' poetry were renowned and commented on by later Chinese writers; his were also highly regarded. Zhang received many posthumous honors for his scholarship and ingenuity, and is considered a polymath by some scholars. Some modern scholars have also compared his work in astronomy to that of Ptolemy .
Born in the town of Xi'e in Nanyang Commandery , Zhang Heng came from a distinguished but not very affluent family. His grandfather, Zhang Kan, had been governor of a commandery, and one of the leaders who supported the restoration of the Han Dynasty by , following the death of the usurper Wang Mang and his short-lived Xin Dynasty . At age ten, Zhang's father died, leaving him in the care of his mother and grandmother. After studying for some years at Luoyang's Imperial University , he became well-versed in the , and befriended notable persons, such as the mathematician and calligrapher , the official and philosophical commentator Ma Rong , and the philosopher . He spent much of his time composing on the capital cities. When Bao De was recalled to the capital in 111, to serve as a minister of finance, Zhang continued his literary work at home in Xi'e. In addition to recording heavenly observations and portents, preparing the calendar, and reporting which days were auspicious or not, Zhang was also in charge of an advanced literacy test for all candidates of the Imperial Secretariat and Censorate . Under Emperor An, Zhang also served as Prefect of the Majors for Official Carriages under the Ministry of Guards, in charge of the reception of memorials submitted to the throne as well as nominees for official appointments.]]
When the government official Dan Song proposed the Chinese calendar should be reformed in 123 to adopt certain , Zhang opposed the idea. He considered the teachings to be of questionable stature and believed they could introduce errors. Liu Zhen and Liu Taotu were Zhang's only historian allies at court, and after their deaths Zhang had no further opportunities for promotion to the prestigious post of court historian. His intensive astronomical work was rewarded only with the rank and salary of 600 bushels, or ''shi'', of grain . To place this number in context, in a hierarchy of twenty official ranks, the lowest-paid official earned the rank and salary of 100 bushels and the highest-paid official earned 10,000 bushels during the Han. The 600-bushel rank was the lowest the emperor could directly appoint to a central government position; any official of lower status was overseen by central or provincial officials of high rank.
In 132, Zhang introduced an intricate seismometer to the court, which he claimed could detect the precise cardinal direction of a distant earthquake. On one occasion his device indicated that an earthquake had occurred in the northwest. As there was no perceivable tremor felt in the capital his political enemies were briefly able to relish the failure of his device,
As Palace Attendant to Emperor Shun, Zhang Heng attempted to convince him that the court eunuchs represented a threat to the imperial court. Zhang pointed to specific examples of past court intrigues involving eunuchs, and convinced Shun that he should assume greater authority and limit their influence.
Retirement and death
Zhang retired from his position under Emperor Shun in 136, Zhang's writing at this time reflects his bitterness at being unable to effectively serve the emperor. By the time of his death, Zhang had composed thirty-two written works on literature, philosophy, science, and mysticism. He was buried in his hometown Xi'e, in Nanyang Commandery; his friend Cui Yuan composed the inscription for his tomb.]]
While working for the central court, Zhang Heng had access to a variety of written materials located in the Archives of the Eastern Pavilion. Zhang read many of the great works of history in his day and claimed he had found ten instances where the ''Records of the Grand Historian'' by Sima Qian and the ''Book of Han'' by Ban Gu differed from other ancient texts that were available to him. The latter fuses ideas with Confucianism and was a precursor to later Chinese metaphysical nature poetry, according to Liu Wu-chi. A set of four short lyric poems entitled "Lyric Poems on Four Sorrows" , is also included with Zhang's preface. This set constitutes some of the earliest heptasyllabic ''shi'' Chinese poetry written. While still in Luoyang, Zhang became inspired to write his "Western Metropolis Rhapsody" and "Eastern Metropolis Rhapsody", which were based on the "Rhapsody on the Two Capitals" by the historian Ban Gu.
Zhang's long lyrical poems also revealed a great amount of information on urban layout and basic geography. His rhapsody "Sir Based-On-Nothing" provides details on terrain, palaces, hunting parks, markets, and prominent buildings of Chang'an, the Western Han capital. Zhang Heng's writing confirms the size of the imperial hunting park in the suburbs of Chang'an, as his estimate for the circumference of the park's encircling wall agrees with the historian Ban Gu's estimate of roughly 400 '''' . Along with Sima Xiangru , Zhang listed a variety of animals and hunting game inhabiting the park, which were divided in the northern and southern portions of the park according to where the animals had originally came from: . Somewhat similar to the description of Sima Xiangru, Zhang described the Western Han emperors and their entourage enjoying boat outings, water plays, fishing, and displays of archery targeting birds and other animals with stringed arrows from the tops of along Chang'an's Kunming Lake. The focus of Zhang's writing on specific places and their terrain, society, people, and their customs could also be seen as early attempts of ethnographic categorization. In his poem "Xijing fu", Zhang shows that he was aware of the new foreign religion of Buddhism, introduced via the Silk Road, as well as the legend of the birth of with the vision of the white elephant bringing about conception. In his "Western Metropolis Rhapsody", Zhang described court entertainments such as ''juedi'', a form of theatrical wrestling accompanied by music in which participants butted heads with bull horn masks.
With his ''Response of my Idleness'' , Zhang was an early writer and proponent of the Chinese literary genre ''shelun'', or hypothetical discourse. Authors of this genre created a written dialogue between themselves and an imaginary person ; the latter poses questions to the author on how to lead a successful life. He also used it as a means to criticize himself for failing to obtain high office, but coming to the conclusion that the true gentleman displays virtue instead of greed for power.
Zhang wrote about the various love affairs of emperors unsatisfied with the imperial harem, going out into the city incognito to seek out prostitutes and sing-song girls. This was seen as a general criticism of the Eastern Han emperors and their imperial favorites, guised in the criticism of earlier Western Han emperors. Besides criticizing the Western Han emperors for lavish decadence, Zhang also pointed out that their behavior and ceremonies did not properly conform with the Chinese cyclical beliefs in yin and yang. In a poem criticizing the previous Western Han Dynasty, Zhang wrote:
Achievements in science and technology
Astronomy and mathematics
For centuries the Chinese approximated pi as 3; Liu Xin made the first known Chinese attempt at a more accurate calculation of 3.154, but there is no record detailing the method he used to obtain this figure. Zhang Heng compared the celestial circle to the diameter of the earth, proportioning the former as 736 and the latter as 232, thus calculating pi as 3.1724. In Zhang's day, the ratio 4:3 was given for the area of a square to the area of its inscribed circle and the volume of a cube and volume of the inscribed sphere should also be 42:32. Zhang then attempted to remedy this by amending the formula with an additional D3, hence V=D3 + D3 = D3. From this formula, Zhang calculated pi as the square root of 10 .
In his publication of AD 120 called ''The Spiritual Constitution of the Universe'' , In comparison, this star catalogue featured many more stars than the 850 documented by the Greek astronomer Hipparchus in his catalogue, and more than Ptolemy , who catalogued over 1,000. Zhang supported the "radiating influence" theory to explain and eclipses, a theory which was opposed by Wang Chong . In the ''Ling Xian'', Zhang wrote:
The Sun is like fire and the Moon like water. The fire gives out light and the water reflects it. Thus the moon's brightness is produced from the radiance of the Sun, and the Moon's darkness is due to the sun being obstructed. The side which faces the Sun is fully lit, and the side which is away from it is dark. The planets have the nature of water and reflect light. The light pouring forth from the Sun does not always reach the moon owing to the obstruction of the earth itself—this is called 'an-xu', a lunar eclipse. When happens with a planet an occultation; when the Moon passes across then there is a solar eclipse.
Zhang Heng viewed these astronomical phenomena in supernatural terms as well. The signs of comets, eclipses, and movements of heavenly bodies could all be interpreted by him as heavenly guides on how to conduct affairs of state.
The theory posited by Zhang and Jing was supported by later pre-modern scientists such as Shen Kuo , who expanded on the reasoning of why the Sun and Moon were spherical.
Extra tank for inflow clepsydra
The outflow clepsydra was a timekeeping device used in China as long ago as the Shang Dynasty , and certainly by the Zhou Dynasty . The inflow clepsydra with an indicator rod on a float had been known in China since the beginning of the Han Dynasty in 202 BC and had replaced the outflow type. Joseph Needham states that this was perhaps the ancestor of all found in mechanical clocks by the 8th century, but he notes that these figures did not actually move like clock jack figurines or sound the hours. Zhang mentioned a "jade dragon's neck", which in later times meant a siphon. He wrote of the floats and indicator-rods of the inflow clepsydra as follows:
Bronze vessels are made and placed one above the other at different levels; they are filled with pure water. Each has at the bottom a small opening in the form of a 'jade dragon's neck'. The water dripping enters two inflow receivers , the left one being for the night and the right one for the day. On the covers of each there are small cast statuettes in gilt bronze; the left one is an immortal and the right one is a policeman. These figures guide the indicator-rod with their left hands, and indicate the graduations on it with their right hands, thus giving the time. The Greek astronomer Eratosthenes invented the first armillary sphere in 255 BC. The Chinese armillary sphere was fully developed by 52 BC, with the astronomer Geng Shouchang's addition of a permanently fixed equatorial ring. In 84 AD the astronomers Fu An and Jia Kui added the ecliptic ring, and finally Zhang Heng added the horizon and meridian rings.
Zhang did not initiate the Chinese tradition of hydraulic engineering, which began during the mid Zhou Dynasty , through the work of engineers such as Sunshu Ao and Ximen Bao. Zhang's contemporary, Du Shi, was the first to apply the motive power of waterwheels to operate the bellows of a blast furnace to make pig iron, and the cupola furnace to make cast iron. Zhang provided a valuable description of his water-powered armillary sphere in the treatise of 125, stating:
The equatorial ring goes around the belly of the armillary sphere 91 and 5/19 away from the pole. The circle of the ecliptic also goes round the belly of the instrument at an angle of 24 with the equator. Thus at the summer solstice the ecliptic is 67 and a fraction away from the pole, while at the winter solstice it is 115 and a fraction away. Hence where the ecliptic and the equator intersect should give the north polar distances of the spring and autumn equinoxes. But now the spring equinox is 90 and 1/4 away from the pole, and the autumn equinox is 92 and 1/4 away. The former figure is adopted only because it agrees with the method of measuring solstitial sun shadows as embodied in the Xia calendar.
Zhang Heng's water-powered armillary sphere had profound effects on Chinese astronomy and mechanical engineering in later generations. His model and its complex use of gears greatly influenced the water-powered instruments of later astronomers and engineers such as Yi Xing , Zhang Sixun , Su Song , Guo Shoujing , and many others. Water-powered armillary spheres in the tradition of Zhang Heng's were used in the eras of the Three Kingdoms and , yet the design for it was temporarily out of use between 317 and 418, due to invasions of northern Xiongnu nomads. Zhang Heng's old instruments were recovered in 418, when Emperor Wu of Liu Song captured the ancient capital of Chang'an. Although still intact, the graduation marks and the representations of the stars, Moon, Sun, and planets were quite worn down by time and rust. These theories were ultimately derived from the ancient text of the '''' , in its fifty-first hexagram. There were other early theories about earthquakes, developed by those such as the . Anaxagoras believed that they were caused by excess water near the surface crust of the earth bursting into the Earth's hollows; Democritus believed that the saturation of the Earth with water caused them; believed they were the result of massive pieces of the Earth falling into the cavernous hollows due to drying; and Aristotle believed they were caused by instability of vapor caused by the drying of the moist Earth by the Sun's rays. These oracles of the occult observed the direction, force, and timing of the winds, to speculate about the operation of the cosmos and to predict events on Earth. These ideas influenced Zhang Heng's views on the cause of earthquakes. Against the grain of earlier theories proposed by his fellow Chinese and contemporary Greeks, Zhang Heng believed that earthquakes were caused by wind and air, writing:
quote|The chief cause of earthquake is air, an element naturally swift and shifting from place to place. As long as it is not stirred, but lurks in a vacant space, it reposes innocently, giving no trouble to objects around it. But any cause coming upon it from without rouses it, or compresses it, and drives it into a narrow space ... and when opportunity of escape is cut off, then 'With deep murmur of the Mountain it roars around the barriers', which after long battering it dislodges and tosses on high, growing more fierce the stronger the obstacle with which it has contended. This was essential for the Han government in sending quick aid and relief to regions devastated by this natural disaster.
To indicate the direction of a distant earthquake, Zhang's device dropped a bronze ball from one of eight tubed projections shaped as dragon heads; the ball fell into the mouth of a corresponding metal object shaped as a toad, each representing a direction like the points on a compass rose. His device had eight mobile arms connected with cranks having catch mechanisms at the periphery. Wang Zhenduo argued that the technology of the Eastern Han era was sophisticated enough to produce such a device, as evidenced by contemporary levers and cranks used in other devices such as crossbow triggers.
Later Chinese of subsequent periods were able to reinvent Zhang's seismometer. They included the 6th-century mathematician and surveyor Xindu Fang of the and the astronomer and mathematician Lin Xiaogong of the Sui Dynasty . Like Zhang, Xindu Fang and Lin Xiaogong were given imperial patronage for their services in craftsmanship of devices for the court. By the time of the Yuan Dynasty , it was acknowledged that all devices previously made were preserved, except for that of the seismometer. This was discussed by the scholar Zhou Mi around 1290, who remarked that the books of Xindu Fang and Lin Xiaogong detailing their seismological devices were no longer to be found.
Hong-sen Yan states that modern replicas of Zhang's device have failed to reach the level of accuracy and sensitivity described in Chinese historical records. Wang Zhenduo presented two different models of the seismometer based on the ancient descriptions of Zhang's device. In his 1936 reconstruction, the central pillar of the device was a suspended pendulum acting as a movement sensor, while the central pillar of his second model in 1963 was an inverted pendulum. He argued that transverse shock would have rendered Wang's immobilization mechanism ineffective, as it would not have prevented further motion that could knock other balls out of their position.
The and and official Pei Xiu was the first in China to describe in full the geometric grid reference for maps that allowed for precise measurements , as well as topographical elevation. However, map-making in China had existed since at least the 4th century BC with the maps found in Gansu in 1986. Pinpointed accuracy of the winding courses of rivers and familiarity with scaled distance had been known since the and Han Dynasty, respectively, as evidenced by their existing maps, while the use of a rectangular grid had been known in China since the Han as well. Historian Howard Nelson states that, although the accounts of Zhang Heng's work in cartography are somewhat vague and sketchy, there is ample written evidence that Pei Xiu derived the use of the rectangular grid reference from the maps of Zhang Heng. Historian Florian C. Reiter notes that Zhang's narrative "Guitian fu" contains a phrase about applauding the maps and documents of Confucius of the Zhou Dynasty, which Reiter suggests places maps on a same level of importance with documents . Rafe de Crespigny asserts that it was Zhang who established the rectangular grid system in Chinese cartography. Moreover, the ''Book of Later Han'' hints that Zhang was the first to make a mathematical grid reference, stating that he "cast a network of coordinates about heaven and earth, and reckoned on the basis of it."
Ancient Chinese texts describe the mechanical carriage's functions; after one li was traversed, a mechanically-driven wooden figure struck a drum, and after ten li had been covered, another wooden figure struck a gong or a bell with its mechanically-operated arm. There is speculation that at some time during the 1st century BC the beating of drums and gongs was mechanically driven by the rotation of the road wheels.
Science and technology
Florentine marble carving of Ptolemy , who created an Earth-centered universe theory that the scholars Jin Guantao, Fan Hongye, and Liu Qingfeng compare with Zhang Heng's theory published in 125 The cosmic model of nine points of Heaven corresponding with nine regions of earth conceived in the work of the scholar-official Chen Hongmou followed in the tradition of Zhang's book ''Spiritual Constitution of the Universe''. The seismologist John Milne, who created the modern seismograph in 1876 alongside Thomas Gray and J. Alfred Ewing at the Imperial College of Engineering in Tokyo, commented in 1886 on Zhang Heng's contributions to seismology. The historian Joseph Needham emphasized his contributions to pre-modern Chinese technology, stating that Zhang was noted even in his day for being able to "make three wheels rotate as if they were one." More than one scholar has described Zhang as a polymath. However, some scholars also point out that Zhang's writing lacks concrete scientific theories. Comparing Zhang with his contemporary, Ptolemy of , Jin Guantao, Fan Hongye, and Liu Qingfeng state:
Based on the theories of his predecessors, Zhang Heng systematically developed the celestial sphere theory. An armillary constructed on the basis of his hypotheses bears a remarkable similarity to Ptolemy's earth-centered theory. However, Zhang Heng did not definitely propose a theoretical model like Ptolemy's earth-centered one. It is astonishing that the celestial model Zhang Heng constructed was almost a physical model of Ptolemy's earth-centered theory. Only a single step separates the celestial globe from the earth-centered theory, but Chinese astronomers never took that step.
Here we can see how important the exemplary function of the primitive scientific structure is. In order to use the Euclidean system of geometry as a model for the development of astronomical theory, Ptolemy first had to select hypotheses which could serve as axioms. He naturally regarded circular motion as fundamental and then used the circular motion of deferents and epicycles in his earth-centered theory. Although Zhang Heng understood that the sun, moon and planets move in circles, he lacked a model for a logically structured theory and so could not establish a corresponding astronomical theory. Chinese astronomy was most interested in extracting the algebraic features of planetary motion to establish astronomical theories. Thus astronomy was reduced to arithmetic operations, extracting common multiples and divisors from the observed cyclic motions of the heavenly bodies. The influential poet Tao Qian wrote that he admired the poetry of Zhang Heng for its "curbing extravagant diction and aiming at simplicity", in regards to perceived tranquility and rectitude correlating with the simple but effective language of the poet. Tao wrote that both Zhang Heng and Cai Yong "avoided inflated language, aiming chiefly at simplicity", and adding that their "compositions begin by giving free expression to their fancies but end on a note of quiet, serving admirably to restrain undisciplined and passionate nature".
Zhang was given great honors in life and in death. The philosopher and poet Fu Xuan of the and dynasties once lamented in an essay over the fact that Zhang Heng was never placed in the . Writing highly of Zhang and the 3rd-century mechanical engineer Ma Jun, Fu Xuan wrote, "Neither of them was ever an official of the Ministry of Works, and their ingenuity did not benefit the world. When employ personnel with no regard to special talent, and having heard of genius neglect even to test it—is this not hateful and disastrous?"
In honor of Zhang's achievements in science and technology, his friend Cui Ziyu wrote a memorial inscription on his burial stele, which has been preserved in the ''Guwen yuan''. Cui stated, " mathematical computations exhausted the heavens and the earth. His inventions were comparable even to those of the Author of Change. The excellence of his talent and the splendour of his art were one with those of the gods." The minor official Xiahou Zhan of the Wei Dynasty made an inscription for his own commemorative stele to be placed at Zhang Heng's tomb. It read: "Ever since gentlemen have composed literary texts, none has been as skillful as the Master in choosing his words well ... if only the dead could rise, oh I could then turn to him for a teacher!"
Several things have been named after Zhang in modern times, including the , the asteroid 1802 Zhang Heng, and the mineral Zhanghengite.