The complete .tex file for generating the picture:
Code: Select all
\documentclass{standalone}
\usepackage[inline]{asymptote}
\begin{document}
\begin{asy}
import solids;
import palette;
currentprojection = perspective(0,100,25);
currentlight=Viewport;
viewportmargin=(0.1cm,0.1cm);
unitsize(5cm);
triple pO=(0,0,0);
path3 gene=(-0.57,0,0)..(-0.3,0,0.3)..(-0.1,0,0.3)..(0.1,0,0.42)..(0.3,0,0.52)..(0.99,0,0);
triple point1=(0,0,0), point2=(0,1,0);
revolution sur=revolution(pO,gene,X,0,360);
surface sur=surface(sur);
sur.colors(palette(sur.map(xpart), Gradient(red,royalblue)));
draw(sur);
\end{asy}
\end{document}