玻尔模型——我们能成对地画出电子吗?

玻尔模型——我们能成对地画出电子吗?

我们可以将电子画成如图所示的对吗......

\documentclass[border=5mm]{standalone}
\usepackage{bohr}
\begin{document}
\bohr{10}{P:10}
\end{document}

enter image description here

答案1

Z解决方案:

\documentclass[tikz,border=5mm]{standalone}
\begin{document}
\begin{tikzpicture}
\node[align=center,fill=black,circle] (o) at (0,0) {\color{yellow}P:10\\\color{blue!50}N:10};
\draw (0,0) circle (1.25cm) circle (2cm);
\path[fill=red,draw=black] (90:1.25) circle (1.5mm);
\path[fill=red,draw=black] (-90:1.25) circle (1.5mm);
\path[fill=red,draw=black] (85:2) circle (1.5mm);
\path[fill=red,draw=black] (95:2) circle (1.5mm);
\path[fill=red,draw=black] (-85:2) circle (1.5mm);
\path[fill=red,draw=black] (-95:2) circle (1.5mm);
\path[fill=red,draw=black] (5:2) circle (1.5mm);
\path[fill=red,draw=black] (-5:2) circle (1.5mm);
\path[fill=red,draw=black] (175:2) circle (1.5mm);
\path[fill=red,draw=black] (-175:2) circle (1.5mm);
\end{tikzpicture}
\end{document}

enter image description here

编辑1

我们只需定义一个新命令。我可以使用\newcommand但我更喜欢,\def因为我可以以 Ti 的形式使用该命令Z 命令:

\documentclass[tikz,border=5mm]{standalone}
\begin{document}
\begin{tikzpicture}
\def\pairelec[fill=#1,draw=#2,radius=#3] (#4:#5); {
    \path[fill=#1,draw=#2] ({#4-5}:#5) circle (#3);
    \path[fill=#1,draw=#2] ({#4+5}:#5) circle (#3);
}
\node[align=center,fill=black,circle] (o) at (0,0) {\color{yellow}P:10\\\color{blue!50}N:10};
\draw (0,0) circle (1.25cm) circle (2cm);
\path[fill=red,draw=black] (90:1.25) circle (1.5mm);
\path[fill=red,draw=black] (-90:1.25) circle (1.5mm);
\pairelec[fill=red,draw=black,radius=1.5mm] (0:2); 
% Remember fill -> draw -> radius - you must have all three options!
\pairelec[fill=green,draw=blue,radius=1.5mm] (180:2);
\pairelec[fill=white,draw=red,radius=1.5mm] (90:2);
\pairelec[fill=yellow,draw=blue,radius=1.5mm] (-90:2);
\end{tikzpicture}
\end{document}

您可以选择fill颜色以及draw颜色和半径。

enter image description here

编辑2

代碼真实的电子对:

\documentclass[tikz,border=5mm]{standalone}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}
\def\pairelec[fill=#1,draw=#2,radius=#3] (#4:#5); {
    \path[name path=cir] (0,0) circle (#5cm);
    \path[name path=smallcir] (#4:#5) circle (#3);
    \path[name intersections={of=cir and smallcir},fill=#1,draw=#2] (intersection-1) circle (#3) (intersection-2) circle (#3);
}
\node[align=center,fill=black,circle] (o) at (0,0) {\color{yellow}P:10\\\color{blue!50}N:10};
\draw (0,0) circle (1.25cm) circle (2cm);
\path[fill=red,draw=black] (90:1.25) circle (1.5mm);
\path[fill=red,draw=black] (-90:1.25) circle (1.5mm);
\pairelec[fill=red,draw=black,radius=1.5mm] (-8:2); 
% Remember fill -> draw -> radius - you must have all three options!
\pairelec[fill=green,draw=blue,radius=3mm] (150:2.5);
\pairelec[fill=white,draw=red,radius=1mm] (78:3);
\pairelec[fill=yellow,draw=blue,radius=1.5mm] (-111:3.5);
\end{tikzpicture}
\end{document}

enter image description here

您可能会看到电子脱离了轨道。这仅用于测试目的!

相关内容