3

I am trying to mimic a ball-and-stick diagram where a molecule is caged in an icosahedron of other molecules. Using tkz-berg I can draw the icosahedron, using code from this SO question. How do I put at vertex (ball) in the middle?

One approach is to draw a vertex and delete the edges. I'm not sure how to do that in tkz-berge.

\usepackage{graphics, tikz, tkz-berge, tkz-graph}
\begin{tikzpicture}
     \begin{scope}[rotate=90]
          \SetVertexNoLabel
          \grIcosahedral[form=1,RA=3,RB=1.5]
          \SetUpEdge[color=white,style={double=black,double distance=2pt}]
          \EdgeInGraphLoop{a}{6}
          \EdgeFromOneToSel{a}{b}{0}{1,5}
          \Edges(a2,b1,b3,b5,a4)
          \Edge(a3)(b3)
          \Edges(a1,b1,b5,a5)
          \Edges(a2,b3,a4)
     \end{scope}
\end{tikzpicture}
mac389
  • 753

1 Answers1

2

Command

\grIcosahedral[form=1,RA=3,RB=1.5]

draws two groups of nodes (vertex) distributed around two circles with radius 3 and 1.5 and center at (0,0). I understand that you want to draw a new vertex at origin which is what command \Vertex does by default.

\documentclass[tikz]{standalone}
\usepackage{tikz, tkz-berge, tkz-graph}
\begin{document}
\begin{tikzpicture}
     \begin{scope}[rotate=90]
          \SetVertexNoLabel
          \grIcosahedral[form=1,RA=3,RB=1.5]
          \SetUpEdge[color=white,style={double=black,double distance=2pt}]
          \EdgeInGraphLoop{a}{6}
          \EdgeFromOneToSel{a}{b}{0}{1,5}
          \Edges(a2,b1,b3,b5,a4)
          \Edge(a3)(b3)
          \Edges(a1,b1,b5,a5)
          \Edges(a2,b3,a4)
          \Vertex{C}    %<--- Node named `C` at (0,0)
    \end{scope}
\end{tikzpicture}
\end{document}

enter image description here

Ignasi
  • 136,588