Although Kepler now filled one of the most honourable situations to which a philosopher could aspire, and possessed a large salary fitted to supply his most reasonable wants, yet, as the imperial treasury was drained by the demands of an expensive war, his salary was always in arrear. Owing to this cause he was constantly involved in pecuniary difficulties, and, as he himself described his situation, he was perpetually begging his bread from the Emperor at Prague. His increasing family rendered the want of money still more distressing, and he was driven to the painful alternative of drawing his income from casting nativities. From the same cause he was obliged to abandon his plan of publishing the Rudolphine Tables, and to devote himself to works of a less expensive kind, and which were more likely to yield some pecuniary advantages.

In spite of these embarrassments, and the occupation of his time in the practice of astrology, Kepler found leisure for his favourite pursuits. No adverse circumstances were capable of extinguishing his scientific ardour, and whenever he directed his vigorous mind to the investigation of phenomena, he never failed to obtain interesting and original results. Since the death of Tycho, his attention had been much occupied with the subject of refraction and vision; and, in 1606, he published the result of his researches in a work, entitled “A Supplement to Vitellio, in which the optical part of astronomy is treated, but chiefly on the artificial observation and estimation of diameters, and of the eclipses of the Sun and Moon.” Astronomers had long been perplexed with the refraction of the atmosphere, and so little was known of the general subject, as well as of this branch of it, that Tycho believed the refraction of the atmosphere to cease at 45° of altitude. Even at the beginning of the second century, Claudius Ptolemy of Alexandria had unravelled its principal mysteries, and had given in his Optics a theory of astronomical refraction more complete than that of any astronomer before the time of Cassini;[45] but the MSS. had unfortunately been mislaid, and Alhazen and Vitellio and Kepler were obliged to take up the subject from its commencement. Ptolemy had not only determined that the refraction of the atmosphere had gradually increased from the zenith to the horizon, but he had measured with singular accuracy the angles of refraction for water and glass, from a perpendicular incidence to a horizontal one.

Kepler treated this branch of science in his own peculiar way, “hunting down,” as he expressed it, every hypothesis which his fertile imagination had successively presented to him. In his various attempts to discover the law of refraction, or a measure of it, as varying with the density of the body and the angle of incidence of the light, he was nearer the goal, in his first speculation, than in any of the rest; and he seems to have failed in consequence of his not separating the question as it related to density from the question as it related to incidence. “I did not leave untried,” says he, “whether, by assuming a horizontal refraction according to the density of the medium, the rest would correspond to the sines of the distances from a vertical direction, but calculation proved that it was not so: and, indeed, there was no occasion to have tried it, for thus the refraction would increase according to the same law in all mediums, which is contradicted by experiment.”

Although completely foiled in his search after the law of refraction, which was subsequently discovered by Willebrord Snell, and sometime afterwards by James Gregory, he was, singularly successful in his inquiries respecting vision. Regarding the eye as analogous in its structure with the camera obscura of Baptista Porta, he discovered that the images of external objects were painted in an inverted position on the retina, by the union of the pencils of rays which issued from every point of the object. He ascribed an erect vision to an operation of the mind, by which it traces the rays back to the pupil, where they cross one another, and thus refers the lower parts of the image to the higher parts of the object. He also explained the cause of long-sighted and short-sighted vision, and shewed how convex and concave lenses enabled those who possessed these peculiarities of vision to see distinctly, by accurately converging the pencils of rays to a focus on the retina. Kepler likewise observed the power of accommodating the eye to different distances, and he ascribed it to the contraction of the ciliary processes, which drew the sides of the eyeball towards the crystalline lens, and thus elongated the eye so as to produce an adjustment of it for near objects. Kepler wisely declined to inquire into the way in which the mind perceives the images painted on the retina, and he blames Vitellio for attempting to determine a question which he considered as not belonging to optics.

The work of Kepler, now under consideration, contains the method of calculating eclipses which is now in use at the present day.

The only other optical treatise written by Kepler, was his Dioptrics, with an appendix on the use of optics in philosophy. This admirable work, which laid the foundation of the science, was published at Augsburg in 1611, and reprinted at London in 1653. Although Maurolycus had made some slight progress in studying the passage of light through different media, yet it is to Kepler that we owe the methods of tracing the progress of rays through transparent bodies with convex and concave surfaces, and of determining the foci of lenses, and of the relative positions of the images which they form, and the objects from which the rays proceed. He was thus led to explain the rationale of the telescope, and to invent the astronomical telescope, which consists of two convex lenses, by which objects are seen inverted. Kepler also discovered the important fact, that spherical surfaces were not capable of converging rays to a single focus, and he conjectured, what Descartes afterwards proved, that this property might be possessed by lenses having the figure of some of the sections of the cone. The total reflection of light at the second surface of bodies was likewise studied by Kepler, and he determined that the total reflection commenced when the angle of incidence was equal to the angle of refraction, which corresponded to an incidence of 90.

Two years before the publication of his Dioptrics, viz. in 1609, Kepler had given to the world his great work, entitled “The New Astronomy, or Commentaries on the Motions of Mars.” The discoveries which this volume records form the basis of physical astronomy. The inquiries by which he was led to them began in that memorable year 1601, when he became the colleague or assistant of Tycho. The powers of original genius were then for the first time associated with inventive skill and patient observation; and though the astronomical data provided by Tycho were sure of finding their application in some future age, yet without them Kepler’s speculations would have been vain, and the laws which they enabled him to determine would have adorned the history of another century. Having tried in vain to represent the motion of Mars by an uniform motion in a circular orbit, and by the cycles and epicycles with which Copernicus had endeavoured to explain the planetary inequalities, Kepler was led, after many fruitless speculations,[46] to suppose the orbit of the planet to be oval; and, from his knowledge of the conic sections, he afterwards determined it to be an ellipse, with the sun placed in one of its foci. He then ascertained the dimensions of the orbit; and, by a comparison of the times employed by the planet to complete a whole revolution or any part of one, he discovered that the time in which Mars describes any arches of his elliptic orbit, were always to one another as the areas contained by lines drawn from the focus or the centre of the sun to the extremities of the respective arches; or, in other words, that the radius vector, or the line joining the Sun and Mars described equal areas in equal times. By examining the inequalities of the other planets he found that they all moved in elliptic orbits, and that the radius vector of each described areas proportional to the times. These two great results are known by the name of the first and second laws of Kepler. The third law, or that which relates to the connexion between the periodic times and the distances of the planets, was not discovered till a later period of his life.

When Kepler presented to Rudolph the volume which contained these fine discoveries, he reminded him jocularly of his requiring the sinews of war to make similar attacks upon the other planets. The Emperor, however, had more formidable enemies than Jupiter and Saturn, and from the treasury, which war had exhausted, he found it difficult to supply the wants of science. While Kepler was thus involved in the miseries of poverty, misfortunes of every kind filled up the cup of his adversity. His wife, who had long been the victim of low spirits, was seized, towards the end of 1610, with fever, epilepsy, and phrenitis, and before she had completely recovered, all his three children were simultaneously attacked with the smallpox. His favourite son fell a victim to this malady, and at the same time Prague was partially occupied by the troops of Leopold. The part of the city where Kepler resided was harassed by the Bohemian levies, and, to crown this list of evils, the Austrian troops introduced the plague into the city.

Sometime afterwards Kepler set out for Austria with the view of obtaining the professorship of mathematics at Linz, which was now vacant; but, upon his return in June, he found his wife in a decline, brought on by grief for the loss of her son, and she was sometime afterwards seized with an infectious fever, of which she died.

The Emperor Rudolph was unwilling to allow Kepler to quit Prague. He encouraged him with hopes that the arrears of his salary would be paid from Saxony; but these hopes were fallacious, and it was not till the death of Rudolph, in 1612, that Kepler was freed from these distressing embarrassments.