# Create asymmetric 3D function by revolving a 2D function around an axis

Could someone please let me know how I can construct the equation for asymmetric torus similar to the figure below? The asymmetric torus seems to be a 2D function revolved around an axis while being scaled.

I think if I am able to formulate this, I can use the same strategy to revolve a 2D function $\omega_{\phi}\left(x,\sigma\right)$ around an axis, e.g. $x$-axis, and generate a 3D asymmetric function $g\left(x,y,z\right)$. The formula that I want to revolve while altering is:

In fact, the asymmetric torus is the iso-surface of $\omega$ after being revolved in three dimensions. In two-dimensions, i.e. the plane $\left(x,\sigma\right)$, contours of $\omega$ is almost a circle. Could someone help me?

-
This doesn't answer the question in your title, but Dupin cyclides are quite attractive and mathematically nice shapes that look like your asymmetric torus. – Rahul Feb 12 '13 at 23:20

I'm not sure it gives exactly what you want, but consider the parameterization of the standard torus $$x=(R+r\cos \phi)\cos \theta \\ y=(R+r\cos \phi)\sin \theta \\ z=r \sin \phi$$

Now we want $r$ to vary sinusoidally with $\theta$, so try $$x=(R+r(\frac 32+\cos \theta)\cos \phi)\cos \theta \\ y=(R+r(\frac 32+\cos \theta)\cos \phi)\sin \theta \\ z=r (\frac 32+\cos \theta)\sin \phi$$

where I picked $\frac 32$ so the term in parentheses is always positive. Try it, see if you like it. I would start with $r = \frac R5$ and see how it goes.

-
Thanks @Ross. Works perfectly for the torus. May I have your thoughts on revolving a function in two dimensions, which does not have a parametrization form, e.g. the Gaussian function that I presented in the question. – Ahmad Feb 13 '13 at 0:23
You can do something very similar. If you have a figure in the $x,y$ plane and want to revolve it symmetrically around the $x$ axis, each point $(x,y)$ becomes a circle $(x,y \cos \theta, y \sin \theta)$. So now make the radius vary with $\theta.$ Your points become $(x, y \cos \theta (3/2+\cos \theta),y \sin \theta (3/2+\cos \theta)$ – Ross Millikan Feb 13 '13 at 0:51

I'm not entirely sure what you are looking for here. The "2D function" you are revolving around looks like you want a circle offset from the axis, so something like $(x-d)^2+y^2=r^2$ where $r$ is the radius of the circle and $d$ is the distance from the z-axis. If you then want to "rotate" it around the z axis we need to replace the $x$ above with $\sqrt{x^2+z^2}$. This would give us a "3D function" for the symmetric torus:- $$(\sqrt{x^2+z^2}-d)^2+y^2=r^2$$ To make the radius and displacement changes as we go around $d$ and $r$ could become functions of $\theta=\tan^{-1}(\frac zx)$.

-