[Tex/LaTex] Drawing molecules with tikz

3dtikz-pgf

I have to draw a molecule in 3D with a little pore represented by a 3D sphere inside of it with the same center. I have never used TikZ but I know that it's useful for drawing in LaTeX and I hope that someone will can give me pointers…

Best Answer

Since you allowed in a comment the option of using "some other package," here's a rendition of nested spheres using Asymptote:

enter image description here

Here's the code:

\documentclass{standalone}
\usepackage{asymptote}
\begin{document}
\begin{asy}
settings.outformat="pdf";
settings.render=0;
size(200);
import solids;
path3 upperhalfcircle = Arc(c=O, v1=Y, v2=-Y, normal=X, n=20);
surface backhemi = surface(revolution(upperhalfcircle,axis=-Y,angle1=0,angle2=180));
surface fronthemi = reflect(O,Y,Z)*backhemi;
pen outerpen = gray + opacity(0.5);
draw(backhemi,surfacepen = outerpen, meshpen = outerpen);
draw(scale3(0.5)*backhemi, surfacepen=blue);
draw(scale3(0.5)*fronthemi, surfacepen=blue);
draw(fronthemi, surfacepen=outerpen, meshpen=outerpen);
\end{asy}
\end{document}
Related Question