-1

I asked a question here but it seems Tikz is a better option. I was trying to draw the following logo of an atom using Mathematica, but I could only figure out how to draw intersecting ellipses, not a nice logo like below. Do you know how to draw it by Tikz?

enter image description here

Bernard
  • 271,350
Saeid
  • 197
  • 6
  • Questions about how to draw specific graphics that just post an image of the desired result are really not reasonable questions to ask on the site. Please post a minimal compilable document showing that you've tried to produce the image and then people will be happy to help you with any specific problems you may have. See minimal working example (MWE) for what needs to go into such a document. – erik Dec 09 '20 at 19:52
  • @erik Unfortunately, I'm not familiar with Tikz. I only know a bit LaTeX but never worked with Tikz. – Saeid Dec 09 '20 at 19:54
  • Then you may be lucky and find someone willing to tackle this problem, but such questions are generally not reasonable. If you want to learn TikZ there is a manual with numerous examples and a lot of TikZ questions on this site! – erik Dec 09 '20 at 19:57
  • Just to say it is not at all a problem to draw something of the sort with tikz-3dplot, at most 10 minutes of efforts. The question is now whether has the time to squeeze in 10 minutes of their time before the question will be closed. –  Dec 09 '20 at 20:05

1 Answers1

5

Although it is quite frowned upon on this platform when people ask for solutions without having tried to solve their problem themselves, I have taken the opportunity to learn about how to use pic, because I never really used it before.

So, this is of course not real 3D and it also lacks the gradients, but maybe you can use it as starting point ...

\documentclass[tikz]{standalone}

\tikzset{ ballsmall/.pic = { \fill[draw=white, line width=2] (0,0) circle (.75); }, balllarge/.pic = { \fill[draw=white, line width=2] (0,0) circle (1.25); }, ringfront/.pic = { \clip (-7.5,0) rectangle (7.5,-2.75); \fill[even odd rule, draw=white, line width=2] (0,0) ellipse (7.5 and 2.75) (0,.275) ellipse (6.5 and 2.25); }, ringback/.pic = { \clip (-7.5,0) rectangle (7.5,2.75); \fill[even odd rule, draw=white, line width=2] (0,0) ellipse (7.5 and 2.75) (0,.275) ellipse (6.5 and 2.25); } }

\begin{document}

\begin{tikzpicture}

\begin{scope}[every node/.style={transform shape}] \path[fill=red, rotate=90] (0,0) pic {ringback}; \path[fill=cyan, rotate=330] (0,0) pic {ringback}; \path[fill=green, rotate=210] (0,0) pic {ringback}; \path[fill=red, rotate=90] (0,0) pic {ringfront}; \path[fill=cyan, rotate=330] (0,0) pic {ringfront}; \path[fill=green, rotate=210] (0,0) pic {ringfront}; \end{scope}

\path[fill=red] (285:5.5) pic {ballsmall}; \path[fill=cyan] (165:5.5) pic {ballsmall}; \path[fill=green] (45:5.5) pic {ballsmall};

\path[fill=gray] (0,0) pic {balllarge};

\end{tikzpicture}

\end{document}

Result:

enter image description here

  • Great! Only I will need to make the spheres shiny with shadows like the original logo. I'll try to do it. – Saeid Dec 09 '20 at 20:39
  • @Saeid Look at the shadings library for options like \shade[ball color=red] – erik Dec 09 '20 at 21:53