Here's another way to obtain a "double torus": you can start from the implicit equation of a lemniscate, which is a curve shaped like a figure-eight. One could, for instance, choose to use the lemniscate of Gerono:

$$x^4-a^2(x^2-y^2)=0$$

or the hyperbolic lemniscate, which is the inverse curve of the hyperbola:

$$(x^2+y^2)^2-a^2x^2+b^2y^2=0$$

(the famous lemniscate of Bernoulli is a special case of this, corresponding to the inversion of an equilateral hyperbola).

Now, to generate a double torus from these lemniscates, if you have the implicit Cartesian equation in the form $F(x,y)=0$, you can perform the "inflation" step of Rahul's approach; that is, form the equation

$$F(x,y)^2+z^2=\varepsilon$$

where $\varepsilon$ is a tiny number.

For instance, here's a double torus formed from the lemniscate of Bernoulli: $$((x^2+y^2)^2-x^2+y^2)^2+z^2=\frac1{100}$$

For surfaces of higher genus, one might want to use sinusoidal spirals instead as the base curve.

Yet another possibility to generate surfaces of genus $n\geq 2$ is to consider the surface $F_1(x,y,z)F_2(x,y,z)\dots F_n(x,y,z)=0$ where the $F_i$ are the implicit Cartesian equations for the usual torus, suitably translated and/or rotated. One can then replace $0$ with a tiny number $\varepsilon$.