Zhang Heng (; AD 78139), courtesy name Pingzi, formerly romanized Chang Heng, was a Chinese polymathic scientist and statesman who lived during the Eastern Han dynasty. Educated in the capital cities of Luoyang and Chang'an, he achieved success as an astronomer, mathematician, seismologist, hydraulic engineer, inventor, geographer, cartographer, ethnographer, artist, poet, philosopher, politician, and literary scholar.
Zhang Heng began his career as a minor civil servant in Nanyang. Eventually, he became Chief Astronomer, Prefect of the Majors for Official Carriages, and then Palace Attendant at the imperial court. His uncompromising stance on historical and calendrical issues led to his becoming a controversial figure, preventing him from rising to the status of Grand Historian. His political rivalry with the palace eunuchs during the reign of Emperor Shun (r. 125–144) led to his decision to retire from the central court to serve as an administrator of Hejian Kingdom in present-day Hebei. Zhang returned home to Nanyang for a short time, before being recalled to serve in the capital once more in 138. He died there a year later, in 139.
Zhang applied his extensive knowledge of mechanics and gears in several of his inventions. He invented the world's first water-powered armillary sphere to assist astronomical observation; and invented the world's first seismoscope, which discerned the cardinal direction of an earthquake away. He improved previous Chinese calculations for pi. In addition to documenting about 2,500 stars in his extensive star catalog, Zhang also posited theories about the Moon and its relationship to the Sun: specifically, he discussed the Moon's sphericity, its illumination by reflected sunlight on one side and the hidden nature of the other, and the nature of solar and lunar eclipses. His fu (rhapsody) and shi poetry were renowned in his time and studied and analyzed by later Chinese writers. Zhang received many posthumous honors for his scholarship and ingenuity; some modern scholars have compared his work in astronomy to that of the Greco-Roman scientist Ptolemy (AD 86–161).
Life
Early life
Born in the town of Xi'e in Nanyang Commandery (north of the modern Nanyang City in Henan), Zhang Heng came from a distinguished but not affluent family. His grandfather Zhang Kan () had been governor of a commandery and one of the leaders who supported the restoration of the Han by Emperor Guangwu (r. 25–57), following the death of the usurping Wang Mang of the Xin (AD 9–23). When he was ten, Zhang's father died, leaving him in the care of his mother and grandmother. This work, entitled "Fu on the Hot Springs" (Wēnquán fù ), describes the throngs of people attending the hot springs, which later became famous as the "Huaqing Hot Springs", a favorite retreat of imperial concubine Yang Guifei during the Tang dynasty. After studying for some years at Luoyang's Taixue, he was well-versed in the classics and friends with several notable persons, including the mathematician and calligrapher Cui Yuan (78–143), the official and philosophical commentator Ma Rong (79–166), and the philosopher Wang Fu (78–163). He spent much of his time composing rhapsodies 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 and which ill-omened, Zhang was also in charge of an advanced literacy test for all candidates to the Imperial Secretariat and the Censorate, both of whose members were required to know at least 9,000 characters and all major writing styles. Under Emperor An, Zhang also served as Prefect of the Majors for Official Carriages under the Ministry of Guards, in charge of receiving memorials to the throne (formal essays on policy and administration) 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 apocryphal teachings, 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 (mostly commuted to coin cash or bolts of silk). 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 seismoscope 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.
thumb|200px|Eastern Han tomb brick depicting the courtyard of a wealthy family's home. Zhang enjoyed a short period of retirement at his home in Xi'e, Nanyang, before being called back to the capital, where he died in 139.
Literature and poetry
thumb|left|200px|An Eastern Han [[earthenware figurine of the Queen Mother of the West. Zhang fantasized about her in his "Rhapsody on Contemplating the Mystery" (), yet the pleasures of the flesh and immortality that she could offer were not tempting enough to sway his heart which was set elsewhere.]]
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 (145–90 BC) and the Book of Han by Ban Gu (AD 32–92) differed from other ancient texts that were available to him. His account was preserved and recorded in the 5th-century text of the Book of Later Han by Fan Ye (398–445). The latter fuses Daoist 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 (Sì chóu shī ), 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. This poem is one of the first in China to have seven words per line. This simpler type of fu poem influenced later works by the prominent official and scholar Cai Yong (132–192). Along with Sima Xiangru (179–117 BC), 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 come from: northern or southern China. 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 tall towers 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 Buddha 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.
thumb|right|250px|Eastern Han tomb painting of two men engrossed in conversation; Zhang's shelun or hypothetical discourse, involved a written dialogue between imaginary or real persons to demonstrate how one could lead an exemplary life
With his "Responding to Criticism" (Ying jian ), a work modeled on Yang Xiong's "Justification Against Ridicule", 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 (or a real person of their entourage or association); 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 dissatisfied 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
Mathematics
For centuries the Chinese approximated pi as 3; Liu Xin (d. CE 23) 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 4<sup>2</sup>:3<sup>2</sup>. From this formula, Zhang calculated pi as the square root of 10 (or approximately 3.162). In the 3rd century, Liu Hui made the calculation more accurate with his π algorithm, which allowed him to obtain the value 3.14159. Later, Zu Chongzhi (429–500) approximated pi as <math>\tfrac{355}{113}</math> or 3.141592, the most accurate calculation for pi the ancient Chinese would achieve.
Astronomy
thumb|right|225px|[[History of typography in East Asia|Printed star map of Su Song (1020–1101) showing the south polar projection]]
thumb|right|A Western Han dynasty Chinese [[silk banner from a 2nd-century BC tomb at Mawangdui; this funerary banner shows a sliver Moon in the top left and the Sun in the top right, both with their cosmological representations of the toad and raven, respectively.]]
In his publication of AD 120 called The Spiritual Constitution of the Universe (, Ling Xian, lit. "Sublime Model"), Zhang Heng theorized that the universe was like an egg "as round as a crossbow pellet" with the stars on the shell and the Earth as the central yolk. 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 (AD 83–161), who catalogued over 1,000. Zhang supported the "radiating influence" theory to explain solar and lunar eclipses, a theory which was opposed by Wang Chong (AD 27–97). In the Ling Xian, Zhang wrote:
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.</blockquote>
The theory posited by Zhang and Jing was supported by later pre-modern scientists such as Shen Kuo (1031–1095), who expanded on the reasoning of why the Sun and Moon were spherical. The theory of the celestial sphere surrounding a flat, square Earth was later criticized by the Jin-dynasty scholar-official Yu Xi (fl. 307–345). He suggested that the Earth could be round like the heavens, a spherical Earth theory fully accepted by mathematician Li Ye (1192–1279) but not by mainstream Chinese science until European influence in the 17th century.
Extra tank for inflow clepsydra
thumb|right|Han dynasty paintings on [[tile; being conscious of time, the Chinese believed in guardian spirits for the divisions of day and night, such as these two guardians here representing 11 pm to 1 am (left) and 5 am to 7 am (right)]]
The outflow clepsydra was a timekeeping device used in China as long ago as the Shang dynasty (c. 1600–c. 1050 BC), and certainly by the Zhou dynasty (1122–256 BC). 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 clock jacks that would later sound the hours 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:
