This paper examines the methodology used by Kepler to discover a quantitative law of refraction. The aim is to argue that this methodology follows a heuristic method based on the following two Pythagorean principles: (1) sameness is made known by sameness, and (2) harmony arises from establishing a limit to what is unlimited. We will analyse some of the author's proposed analogies to find the aforementioned law and argue that the investigation's heuristic pursues such principles.