I'm interested in drawing (with Mathematica for example) the generalized Scherk saddle tower with threefold symmetry, a shape that I find very attractive. In an article (see here) I found the following Weierstrass-Enneper parameterization:
\begin{eqnarray} x&=&\Re \int_{z_0}^{z_1}\frac{1}{2}f(z)(1-g^2(z))\;\mathrm{d}z\\ y&=&\Re \int_{z_0}^{z_1}\frac{\mathrm{i}}{2}f(z)(1+g^2(z))\;\mathrm{d}z\\ z&=&\Re \int_{z_0}^{z_1}f(z)g(z)\;\mathrm{d}z,\\ \end{eqnarray} with $$ f(z)=\frac{1}{z^6+1}\quad \text{and} \quad g(z)=z^2. $$
Unfortunately, I have no idea how to use these formulas to actually draw the surface. To begin with, which integration contour should I use? What do $z_0$ and $z_1$ stand for? And once I know the values of these integrals (either analytically or numerically), how do I obtain the $(x(u,v),y(u,v),z(u,v))$ parameterization that I can feed to Mathematica?
Any help would be greatly appreciated!
Here's an approach which, while naive, can be improved considerably. I'll simply define the functions $f(w)$ and $g(w)$ and then the functions $x(w)$, $y(w)$, and $z(w)$ in terms of the integrals, making sure the values at zero are zero. I changed the complex variable $z$ to $w$ to avoid conflict with the Cartesian coordinate $z$. The input parameters will be the polar coordinates $r$ and $t$ with domain specified to describe the unit disk.
Well, not so bad really. We clearly have some issues with branch cuts and we get only part of the surface, which is really all to be expected. The easiest thing to do is restrict our input domain to a region that avoids the branch cuts and then use the resulting piece, together with the known symmetry of the desired result to assemble the final figure. Here's a piece that, I think, should be a reasonable building block.
We can place three copies of this, symmetrically rotated about the $z$-axis, reflect the resulting figure about a plane normal to the $z$-axis, and finally translate that a few times to obtain a nice image. Here is the result.
And here is the code, which I deferred since it is rather, well, codey. It's really all just a matter of directly manipulating the graphics primitives that form the basePic.