<a href="http://en.wikipedia.org/wiki/Pythagorean_triple#Geometry_of_Euclid.27s_formula">Wikipeida</a> explains how to come up with the parametrization (I think I've seen the term "generating functions" for this, but really that term means something entirely different).