An irreducible fraction is a fraction such that and have no common factor. This definition applies to ratios of ordinary integers as well as to Gaussian integers, which are of the form a+b i, where a and b are integers and . By rationalizing the denominator, such complex fractions can be put in the form , where and are real fractions; are the numbers plotted.

Heavily based on code by Michael Trott in The Mathematica GuideBook for Graphics New York: Springer-Verlag, 2004.