I've tried to make a diagram which shows pi bonding through chemfig, but I was not successful.
Here is what I want.
(source: chem1.com)
or
(source: uwaterloo.ca)
Since I was unable to do it with chemfig I decided to do it with tikz. This is the best I could do:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\shade[shading=ball, ball color=gray,draw,opacity=.7] (-2.5,0) .. controls (0,1) and (.5,0.5) .. (.5,0)
.. controls (.5,-.5) and (0,-1) .. (-2.5,0);
\shade[shading=ball, ball color=gray,draw,opacity=.7] (2.5,0) .. controls (.5,1) and (-.5,0.5) .. (-.5,0)
.. controls (-.5,-.5) and (.5,-1) .. (2.5,0);
\shade[shading=ball, ball color=gray,draw,opacity=.7] (-2.5,0) .. controls (-3.5,2.5) and (-3,3) .. (-2.5,3)
.. controls (-2,3) and (-1.5,2.5) .. (-2.5,0);
\shade[shading=ball, ball color=gray,draw,opacity=.7] (-2.5,0) .. controls (-3.5,-2.5) and (-3,-3) .. (-2.5,-3)
.. controls (-2,-3) and (-1.5,-2.5) .. (-2.5,0);
\shade[shading=ball, ball color=gray,draw,opacity=.7] (-2.5,0) .. controls (-4,0.5) and (-5,0.83) .. (-4.5,1.5)
.. controls (-4,2.17) and (-3.5,1.31) .. (-2.5,0);
\shade[shading=ball, ball color=gray,draw,opacity=.7] (-2.5,0) .. controls (-4,-0.5) and (-5,-0.83) .. (-4.5,-1.5)
.. controls (-4,-2.17) and (-3.5,-1.31) .. (-2.5,0);
\shade[shading=ball, ball color=gray,draw,opacity=.7] (2.5,0) .. controls (-3.5+5,2.5) and (-3+5,3) .. (2.5,3)
.. controls (-2+5,3) and (-1.5+5,2.5) .. (2.5,0);
\shade[shading=ball, ball color=gray,draw,opacity=.7] (2.5,0) .. controls (-3.5+5,-2.5) and (-3+5,-3) .. (2.5,-3)
.. controls (-2+5,-3) and (-1.5+5,-2.5) .. (2.5,0);
\shade[shading=ball, ball color=gray,draw,opacity=.7] (2.5,0) .. controls (4,0.5) and (5,0.83) .. (4.5,1.5)
.. controls (4,2.17) and (3.5,1.31) .. (2.5,0);
\shade[shading=ball, ball color=gray,draw,opacity=.7] (2.5,0) .. controls (4,-0.5) and (5,-0.83) .. (4.5,-1.5)
.. controls (4,-2.17) and (3.5,-1.31) .. (2.5,0);
\shade[shading=ball, ball color=blue,opacity=0.6] (4.5,1.5) circle (0.5);
\shade[shading=ball, ball color=blue,opacity=0.6] (4.5,-1.5) circle (.5);
\shade[shading=ball, ball color=blue,opacity=0.6] (-4.5,-1.5) circle (.5);
\shade[shading=ball, ball color=blue,opacity=0.6] (-4.5,1.5) circle (.5);
\end{tikzpicture}
\begin{tikzpicture}
\shade[shading=ball, ball color=gray,draw,opacity=.7] (-2.5,0) .. controls (0,1) and (.5,0.5) .. (.5,0)
.. controls (.5,-.5) and (0,-1) .. (-2.5,0);
\shade[shading=ball, ball color=gray,draw,opacity=.7] (2.5,0) .. controls (.5,1) and (-.5,0.5) .. (-.5,0)
.. controls (-.5,-.5) and (.5,-1) .. (2.5,0);
\shade[shading=ball, ball color=gray,draw,opacity=.7] (-2.5,0) .. controls (-4,0.5) and (-5,0.83) .. (-4.5,1.5)
.. controls (-4,2.17) and (-3.5,1.31) .. (-2.5,0);
\shade[shading=ball, ball color=gray,draw,opacity=.7] (-2.5,0) .. controls (-4,-0.5) and (-5,-0.83) .. (-4.5,-1.5)
.. controls (-4,-2.17) and (-3.5,-1.31) .. (-2.5,0);
\shade[shading=ball, ball color=gray,draw,opacity=.7] (2.5,0) .. controls (4,0.5) and (5,0.83) .. (4.5,1.5)
.. controls (4,2.17) and (3.5,1.31) .. (2.5,0);
\shade[shading=ball, ball color=gray,draw,opacity=.7] (2.5,0) .. controls (4,-0.5) and (5,-0.83) .. (4.5,-1.5)
.. controls (4,-2.17) and (3.5,-1.31) .. (2.5,0);
\shade[shading=ball, ball color=blue,opacity=0.6] (4.5,1.5) circle (0.5);
\shade[shading=ball, ball color=blue,opacity=0.6] (4.5,-1.5) circle (.5);
\shade[shading=ball, ball color=blue,opacity=0.6] (-4.5,-1.5) circle (.5);
\shade[shading=ball, ball color=blue,opacity=0.6] (-4.5,1.5) circle (.5);
\shade[shading=ball, ball color=black,draw,opacity=.7] (-2.5,0) .. controls (-3.5,2.5) and (-3,3) .. (-2.5,3)
.. controls (0,2) .. (2.5,3)
.. controls (3,3) and (3.5,2.5) .. (2.5,0)
.. controls (1.5,1) .. (0,1)
.. controls (-2,1) .. (-2.5,0);
\shade[shading=ball, ball color=black,draw,opacity=.7] (-2.5,0) .. controls (-3.5,-2.5) and (-3,-3) .. (-2.5,-3)
.. controls (0,-2) .. (2.5,-3)
.. controls (3,-3) and (3.5,-2.5) .. (2.5,-0)
.. controls (1.5,-1) .. (0,-1)
.. controls (-2,-1) .. (-2.5,-0);
\end{tikzpicture}
\end{document}
The end result is quite satisfactory, but
- A shorter code would be nice
- I am not sure how to use node and label pi bond and sigma bond(usage of quoate box would also look good), and label the atoms as well
tikzpicture
environment:\begin{tikzpicture}[every shade/.append style={shading=ball}]
. Maybe there is still a more efficient way to do it as you have e.g. two symmetry axes.