Non-pythagorean triples Euclid's formula gives a recipe for generating all possible Pythagorean triples $a^2+b^2 = c^2$ exactly once; for set of positive integers $k$ and $m>n$ ($m$ relatively prime to $n$, exactly one of $m$ and $n$ odd), define
$$a=k(m^2-n^2)\qquad b= k(2mn)\qquad c=k(m^2+n^2).$$
I am wondering if we can derive a similar simple parameterized formula for enumerating a set of non-pythagorean triples of the form
$$a^2 +Qab + b^2 = c^2$$
for all $a,b,c\in\mathbb{N}$ and $Q$ is an integer fixed in advance?  I've tried applying various proofs of Euclid's formula to derive a similar result, with no success. (If relevant, the value $Q=14$ is especially salient for my current application, and the values $Q=\pm 2$ seem to have an especially straightforward solution.)
 A: Consider the curve $C$ defined by the equation $x^{2}+Qxy+y^{2}=1$ and a line $y=k(x+1)$ with $k\in \mathbb{Q}$. If the graph of $C$ (ellipse or hyperbola, for $Q\neq \pm 2$) intersects with the second line at two points, those points are given by 
$$
(-1, 0), \quad \left (\frac{1-k^{2}}{1+Qk+k^{2}}, \frac{2k+Qk^{2}}{1+Qk+k^{2}}\right)
$$
and this gives a rational points on the curve $C$. Also, you can easily check that every rational points can be obtained by this way, except for $(-1, Q)$, which corresponds to $k=\infty$. Using this parametrization, we can prove that every solution of the Diophantine equation $a^{2}+Qab+b^{2}=c^{2}$ are given by 
$$
(a, b, c) = (m^{2}-n^{2}, 2mn+Qn^{2}, m^{2}+Qmn+n^{2}).
$$

As other people mentioned, it doesn't give all solutions, but it can give all primitive solutions. For example, if $(a, b, c)$ is a primitive solution of the equation, i.e. $\gcd(a, b, c)=1$, then 
$$
k=\frac{b}{a+c}
$$
gives the corresponding rational point 
$$
\left(\frac{a}{c}, \frac{b}{c}\right)
$$
on $C$, and the solution 
$$
((a+c)^{2}-b^{2}, 2b(a+c)+Qb^{2}, (a+c)^{2}+Qb(a+c)+b^{2})
$$
which is a (possibly) non-primitive solution parallel to the original solution $(a, b, c)$. Conversely, every primitive solution can be obtained by 
$$
\frac{1}{d}(m^{2}-n^{2}, 2mn+Qn^{2}, m^{2}+Qmn+n^{2})
$$
where $d$ is a gcd of each components. If you don't want this kind of treatment, I think Will Jagy's answer is more appropriate. 
