Just a wild comment, but to eliminate the "Any time n1 or n2 is an even number, you are squaring the sin() and cos() functions. This causes any negative number they produce into a positive number. There is no way to generate points in the negative quadrants if you have n1^2 or n2^2 positive." problem what would happen if you made the computation use the ABS value?

I must refer you back to the original source:
http://paulbourke.net/geometry/torus/

It shows the results of n1 and n2 being a positive number. n1 controls the shape of the body. If n1 = 2, then the shape is squared up. n2 controls the shape of the cross section.

OME