如何用元素表的原子符号制作“文字图像”,例如 Periodle

如何用元素表的原子符号制作“文字图像”,例如 Periodle

其中一个更难的分支沃德尔是一款叫做的游戏周期。在这个版本中,你可以用原子符号造词元素周期表. 就像

在此处输入图片描述

这里的要求是让化学老师能够打印一个单词或一个这样的单词图像表。老师提供单词或单词列表、它通过原子符号的拼写方式及其含义。因此,列表包含以下条目:

PHY-Si-Cs:物理学是科学的一个分支

你的程序输出一个由单词图像组成的表格。在图像下方或上方添加可选的定义。(上图来自(来源),您选择您的风格)。

程序的一般输入是每个原子符号及其原子序数、元素名称和一些配色方案编号的列表。例如

Ac,89,锕,6

或者它可能只是一个问号,以防老师想省略一些符号然后让学生猜。

其他教师也可以利用 Periodle 游戏进行课堂活动。Periodle 的一个限制是所有单词的长度都是 5 个符号(和 6-10 个字母)。为了帮助孩子们玩这个相当难的游戏,老师可能希望在有 C 列的表格中显示一些单词(可能 C=3 或 4 是一个不错的选择)。这将是一个不错的功能,因为它允许孩子们一次扫描许多单词。

以下是元素的字母列表(我不是化学家,希望我没有在制作列表时犯错误)。颜色方案是根据传统的“化学组块”设计的,但老师可能会考虑另一种元素着色基础。这里的块的颜色指定是

1=非金属,2=碱金属,3=碱土金属,4=过渡金属,5=镧系元素,6=锕系元素,7=准金属,8=后过渡金属,9=卤素,10=稀有气体

(编辑:氪星和田纳西星的条目已被更正。)

Ac,89,锕,6

银,47,银,4

铝,13,铝,4

镅,95,镅,6

氩气,18,氩气,10

砷,33,砷,7

铊,85,砹,9

金,79,黄金,4

B,5,硼,7

钡,56,钡,3

铍,4,铍,4

Bh, 107, 博里姆, 4

Bi,83,铋,8

Bk, 97, 锫, 6

Br,35,溴,9

C,6,碳,1

钙,20,钙,3

镉,48,镉,4

铈,58,铈,5

锎,98,锎,6

Cl,17,氯,9

厘米,96,锔,6

Cn,112,钴,4

钴,27,钴,4

铬,24,铬,4

铯,55,铯,2

铜,29,铜,4

Db,105,钚,4

Ds, 110, 达姆施塔特, 4

镝,66,镝,5

铒,68,铒,5

Es, 99, 锿, 6

欧盟,63,铕,5

F,9,氟,9

铁,26,铁,3

Fl,114,銇,8

镄,100,镄,6

Fr, 87, 钫, 2

Ga,31,镓,8

钆,64,钆,5

Ge,32,锗,7

H, 1 , 氢, 1

氦,2,氦,10

铪,72,铪,4

汞,80,汞,4

何先生,67 岁,钬先生,5 岁

Hs,108,钅,4

碘,53,碘,9

铟,49,铟,8

铱,77,铱,4

钾,19,钾,2

氪,36,氪,10

镧,57,镧,5

锂,3,锂,2

Lr, 103, 铹, 6

镥,71,镥,5

Lv, 116, 利弗莫里姆, 8

Md,101,钔,6

镁,12,镁,3

锰,25,锰,4

钼,42,钼,4

女士,115,莫斯科,8

Mt, 109, 迈特纳, 4

N,7,氮,1

钠,11,钠,2

铌,41,铌,4

钕,60,钕,5

氖,10,氖,10

Nh,113,Nihonium,8

镍,28,镍,4

锘,102,锘,6

Np,93,镎,6

O,8,氧气,1

Og, 118, Oganesson, 10

锇,76,锇,4

P,15,磷,1

Pa,91,镤,6

铅,82,铅,8

钯,46,钯,4

钷,61,钷,5

钋,84,钋,7

镨,59,镨,5

Pt,78,铂金,4

钚,94,钚,6

镭,88,镭,2

铷,37,铷,2

铼,75,铼,4

Rf,104,钌,4

Rg,111,伦,4

铑,45,铑,4

氡,86,氡,10

钌,44,钌,4

S,16,硫,1

锑,51,锑,7

钪,21,钪,4

硒,34,硒,1

Sg, 106, 钚, 4

硅,14,硅,7

Sm,62,钐,5

锡,50,锡,8

高级,38,锶,3

Ta,73,钽,4

铽,65,铽,5

Tc,43,锝,4

碲,52,碲,7

钍,90,钍,6

钛,22,钛,4

铊,81,铊,8

铥,69,铥,5

Ts,117,田纳西州,9

铀,92,铀,6

钒,4

钨,74,钨,4

氙,54,氙,10

Y,39,钇,4

镱,70,镱,5

锌,30,锌,4

锆,40,锆,4

答案1

更新的解决方案:

现在,整个过程被包装成一个宏\periodle,该宏采用逗号分隔的元素符号列表。因此

\periodle{P,H,Y,Si,Cs}

\periodle{La,Te,Xe,Rf,O,Re,V,Er}

生产

在此处输入图片描述

如果包含的符号不是元素的符号,?则会出现灰色图块。颜色由\definecolor{unk}{rgb}{.3,.3,.3}

\periodle{La,Te,Xe,Rf,O,Re,V,Er,?}

在此处输入图片描述

\elementlist您可以使用语法添加元素<symbol>/<number>/<name>/<color>。例如,Lx/314/Latex/pink

颜色值取自 Periodle 网站:

在此处输入图片描述

以下是包含冗长的代码\elementlist。请注意,我修复了一些错误(未大写的 Kr,拼写错误的 Tennessine)。可能还有其他错误。

\documentclass{article}

\usepackage{tikz,ifthen}
\usetikzlibrary{chains}

\newcommand{\elementlist}{Ac/89/Actinium/6,Ag/47/Silver/4,Al/13/Aluminum/4,Am/95/Americium/6,Ar/18/Argon/10,As/33/Arsenic/7,At/85/Astatine/9,Au/79/Gold/4,B/5/Boron/7,Ba/56/Barium/3,Be/4/Beryllium/4,Bh/107/Bohrium/4,Bi/83/Bismuth/8,Bk/97/Berkelium/6,Br/35/Bromine/9,C/6/Carbon/1,Ca/20/Calcium/3,Cd/48/Cadmium/4,Ce/58/Cerium/5,Cf/98/Californium/6,Cl/17/Chlorine/9,Cm/96/Curium/6,Cn/112/Copernicium/4,Co/27/Cobalt/4,Cr/24/Chromium/4,Cs/55/Cesium/2,Cu/29/Copper/4,Db/105/Dubnium/4,Ds/110/Darmstadtium/4,Dy/66/Dysprosium/5,Er/68/Erbium/5,Es/99/Einsteinium/6,Eu/63/Europium/5,F/9/Fluorine/9,Fe/26/Iron/3,Fl/114/Flerovium/8,Fm/100/Fermium/6,Fr/87/Francium/2,Ga/31/Gallium/8,Gd/64/Gadolinium/5,Ge/32/Germanium/7,H/1/Hydrogen/1,He/2/Helium/10,Hf/72/Hafnium/4,Hg/80/Mercury/4,Ho/67/Holmium/5,Hs/108/Hassium/4,I/53/Iodine/9,In/49/Indium/8,Ir/77/Iridium/4,K/19/Potassium/2,Kr/36/Krypton/10,La/57/Lanthanum/5,Li/3/Lithium/2,Lr/103/Lawrencium/6,Lu/71/Lutetium/5,Lv/116/Livermorium/8,Md/101/Mendelevium/6,Mg/12/Magnesium/3,Mn/25/Manganese/4,Mo/42/Molybdenum/4,Ms/115/Moscovium/8,Mt/109/Meitnerium/4,N/7/Nitrogen/1,Na/11/Sodium/2,Nb/41/Niobium/4,Nd/60/Neodymium/5,Ne/10/Neon/10,Nh/113/Nihonium/8,Ni/28/Nickel/4,No/102/Nobelium/6,Np/93/Neptunium/6,O/8/Oxygen/1,Og/118/Oganesson/10,Os/76/Osmium/4,P/15/Phosphorus/1,Pa/91/Protactinium/6,Pb/82/Lead/8,Pd/46/Palladium/4,Pm/61/Promethium/5,Po/84/Polonium/7,Pr/59/Praseodymium/5,Pt/78/Platinum/4,Pu/94/Plutonium/6,Ra/88/Radium/2,Rb/37/Rubidium/2,Re/75/Rhenium/4,Rf/104/Rutherfordium/4,Rg/111/Roentgenium/4,Rh/45/Rhodium/4,Rn/86/Radon/10,Ru/44/Ruthenium/4,S/16/Sulfur/1,Sb/51/Antimony/7,Sc/21/Scandium/4,Se/34/Selenium/1,Sg/106/Seaborgium/4,Si/14/Silicon/7,Sm/62/Samarium/5,Sn/50/Tin/8,Sr/38/Strontium/3,Ta/73/Tantalum/4,Tb/65/Terbium/5,Tc/43/Technetium/4,Te/52/Tellurium/7,Th/90/Thorium/6,Ti/22/Titanium/4,Tl/81/Thallium/8,Tm/69/Thulium/5,Ts/117/Tennessine/9,U/92/Uranium/6,V/23/Vanadium/4,W/74/Tungsten/4,Xe/54/Xenon/10,Y/39/Yttrium/4,Yb/70/Ytterbium/5,Zn/30/Zinc/4,Zr/40/Zirconium/4}

\definecolor{1}{rgb}{0.01, 0.28, 1.00}
\definecolor{2}{rgb}{1.00, 0.03, 0.00}
\definecolor{3}{rgb}{1.00, 0.49, 0.00}
\definecolor{4}{rgb}{0.99, 0.93, 0.00}
\definecolor{5}{rgb}{0.80, 0.00, 0.80}
\definecolor{6}{rgb}{1.00, 0.08, 0.58}
\definecolor{7}{rgb}{0.00, 0.75, 1.00}
\definecolor{8}{rgb}{0.20, 0.80, 0.20}
\definecolor{9}{rgb}{0.62, 0.00, 1.00}
\definecolor{10}{rgb}{0.41, 0.00, 0.66}
\definecolor{unk}{rgb}{.3,.3,.3}

\newcommand{\periodle}[1]{\tikz[start chain, node distance=0mm]{\foreach \elem in {#1}{\xdef\ll{?}\xdef\nn{}\xdef\mm{}\xdef\cc{unk}
    \foreach \l/\n/\m/\c in \elementlist{\ifthenelse{\equal{\l}{\elem}}{\xdef\ll{\l}\xdef\nn{\n}\xdef\mm{\m}\xdef\cc{\c}}{}}
    \node[on chain, line width=.5mm, draw=gray, shade, left color=\cc, right color=white, shading angle=210, minimum size=1cm, font=\sffamily\bfseries](B){\ll};
    \node[font=\sffamily\bfseries, transform shape,scale=.4] at ([yshift=-3mm]B){\nn};
    \node[font=\sffamily\bfseries, transform shape,scale=.4] at ([yshift=3mm]B){\mm};
}}}


\begin{document}

\periodle{P,H,Y,Si,Cs}

\periodle{La,Te,Xe,Rf,O,Re,V,Er,?}

\end{document}

旧解决方案:

好的。这有点愚蠢,但这是一个\periodle以逗号分隔的列表作为输入的宏。每个条目应具有以下形式<symbol>/<name>/<number>/<color>

在此处输入图片描述

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{chains}

\definecolor{c1}{rgb}{0.68, 0.87, 0.68}
\definecolor{c2}{rgb}{0.99, 0.99, 0.59}
\definecolor{c3}{rgb}{0.74, 0.83, 0.99}
\definecolor{c4}{rgb}{0.81, 0.59, 0.86}

\newcommand{\periodle}[1]{\tikz[start chain, node distance=0mm]{\foreach \l/\n/\m/\c in {#1}{
    \node[on chain, line width=.5mm, draw=gray, shade, left color=\c, right color=white, shading angle=210, minimum size=1cm, font=\sffamily\bfseries](B){\l};
    \node[font=\sffamily\bfseries, transform shape,scale=.4] at ([yshift=-3mm]B){\n};
    \node[font=\sffamily\bfseries, transform shape,scale=.5] at ([yshift=3mm]B){\m};
}}}

\begin{document}

\periodle{Lx/Latexium/201/c1,Xt/Xetexium/202/c2,Mp/Metapostium/203/c3,L/Luanium/204/c4}

\end{document}

答案2

在此处输入图片描述这要感谢 Sandy G. 的回答。这是按符号字母顺序排列的元素周期表。它旨在帮助想要开展课堂活动的教师或想要解决相关难题的学生。

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{chains}

\definecolor{1}{rgb}{0.68, 0.87, 0.68}
\definecolor{2}{rgb}{0.99, 0.99, 0.59}
\definecolor{3}{rgb}{0.74, 0.83, 0.99}
\definecolor{4}{rgb}{0.81, 0.59, 0.86}
\definecolor{5}{rgb}{0.77, 0.32, 0.45}
\definecolor{6}{rgb}{0.81, 0.63, 0.44}
\definecolor{7}{rgb}{0.66, 0.83, 0.99}
\definecolor{8}{rgb}{0.99, 0.59, 0.86}
\definecolor{9}{rgb}{0.44, 0.32, 0.45}
\definecolor{10}{rgb}{0.55, 0.63, 0.44}
\definecolor{11}{rgb}{0.66, 0.77, 0.88}

\thispagestyle{empty}
\null 
\vskip -.5in

\newcommand{\periodle}[1]{\tikz[start chain, node distance=0mm]{\foreach \l/\m/\n/\c in {#1}{
%   \node[on chain, line width=.5mm, draw=gray, fill=\c, minimum size=1cm, font=\sffamily\bfseries](B){\l};
\node[on chain, line width=.5mm, draw=gray, shade, left color=\c, right color=white, shading angle=210, minimum size=1cm, font=\sffamily\bfseries](B){\l};
\node[font=\sffamily\bfseries, transform shape,scale=.4] at ([yshift=-3mm]B){\n};
\node[font=\sffamily\bfseries, transform shape,scale=.4] at ([yshift=3mm]B){\m};
}}}

\begin{document}
\periodle{
Ac/89/Actinium/6,
Ag/47/Silver/4,
Al/13/Aluminum/4,
Am/95/Americium/6,
Ar/18/Argon/10,
As/33/Arsenic/7,
At/85/Astatine/9,
Au/79/Gold/4}

\periodle{
B/5/Boron/7,
Ba/56/Barium/3,
Be/4/Beryllium/4,
Bh/107/Bohrium/4,
Bi/83/Bismuth/8,
Bk/97/Berkelium/6,
Br/35/Bromine/9}

\periodle{
C/6/Carbon/1,
Ca/20/Calcium/3,
Cd/48/Cadmium/4,
Ce/58/Cerium/5,
Cf/98/Californium/6,
Cl/17/Chlorine/9,
Cm/96/Curium/6,
Cn/112/Copernicium/4,
Co/27/Cobalt/4,
Cr/24/Chromium/4,
Cs/55/Cesium/2,
Cu/29/Copper/4}

\periodle{
Db/105/Dubnium/4,
Ds/110/Darmstadtium/4,
Dy/66/Dysprosium/5}

\periodle{
Er/68/Erbium/5,
Es/99/Einsteinium/6,
Eu/63/Europium/5}

\periodle{
F/9/Fluorine/9,
Fe/26/Iron/3,
Fl/114/Flerovium/8,
Fm/100/Fermium/6,
Fr/87/Francium/2}

\periodle{
Ga/31/Gallium/8,
Gd/64/Gadolinium/5,
Ge/32/Germanium/7}

\periodle{
H/1/Hydrogen/1,
He/2/Helium/10,
Hf/72/Hafnium/4,
Hg/80/Mercury/4,
Ho/67/Holmium/5,
Hs/108/Hassium/4}

\periodle{
I/53/Iodine/9,
In/49/Indium/8,
Ir/77/Iridium/4}

\periodle{
K/19/Potassium/2,
kr/36/Krypton/10}

\periodle{
La/57/Lanthanum/5,
Li/3/Lithium/2,
Lr/103/Lawrencium/6,
Lu/71/Lutetium/5,
Lv/116/Livermorium/8}

\periodle{
Md/101/Mendelevium/6,
Mg/12/Magnesium/3,
Mn/25/Manganese/4,
Mo/42/Molybdenum/4,
Ms/115/Moscovium/8,
Mt/109/Meitnerium/4}

\periodle{
N/7/Nitrogen/1,
Na/11/Sodium/2,
Nb/41/Niobium/4,
Nd/60/Neodymium/5,
Ne/10/Neon/10,
Nh/113/Nihonium/8,
Ni/28/Nickel/4,
No/102/Nobelium/6,
Np/93/Neptunium/6}

\periodle{
O/8/Oxygen/1,
Og/118/Oganesson/10,
Os/76/Osmium/4}

\periodle{
P/15/Phosphorus/1,
Pa/91/Protactinium/6,
Pb/82/Lead/8,
Pd/46/Palladium/4,
Pm/61/Promethium/5,
Po/84/Polonium/7,
Pr/59/Praseodymium/5,
Pt/78/Platinum/4,
Pu/94/Plutonium/6}

\periodle{
Ra/88/Radium/2,
Rb/37/Rubidium/2,
Re/75/Rhenium/4,
Rf/104/Rutherfordium/4,
Rg/111/Roentgenium/4,
Rh/45/Rhodium/4,
Rn/86/Radon/10,
Ru/44/Ruthenium/4}

\periodle{
S/16/Sulfur/1,
Sb/51/Antimony/7,
Sc/21/Scandium/4,
Se/34/Selenium/1,
Sg/106/Seaborgium/4,
Si/14/Silicon/7,
Sm/62/Samarium/5,
Sn/50/Tin/8,
Sr/38/Strontium/3}

\periodle{
Ta/73/Tantalum/4,
Tb/65/Terbium/5,
Tc/43/Technetium/4,
Te/52/Tellurium/7,
Th/90/Thorium/6,
Ti/22/Titanium/4,
Tl/81/Thallium/8,
Tm/69/Thulium/5,
Ts/117/Tennesineum/9}

\periodle{
U/92/Uranium/6,
V/23/Vanadium/4,
W/74/Tungsten/4,
Xe/54/Xenon/10,
Y/39/Yttrium/4,
Yb/70/Ytterbium/5,
Zn/30/Zinc/4,
Zr/40/Zirconium/4,
?/?/?/11}

\end{document}

相关内容