1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
\documentclass{standalone}
\usepackage{tikz}
\usepackage{graphene}
% reflected graphene grid at #1 of width #2 and height #3
\def\graphenereflected#1#2#3{
\foreach \i in {0,...,#2}{
\foreach \j in {0,...,#3}{
\cellreflected{#1++(\i*3,-2*\j*\sqrtThOT)}
\cellreflected{#1++(\i*3+1.5,\sqrtThOT-2*\j*\sqrtThOT)}
}
}
}
\def\cellreflected#1{
\draw[dotted]#1--++(0:-1);
\draw[dotted]#1--++(120:-1);
\draw[dotted]#1--++(240:-1);
\asite{#1}
\draw[dotted]#1++(-1,0)--++(0:1);
\draw[dotted]#1++(-1,0)--++(120:1);
\draw[dotted]#1++(-1,0)--++(240:1);
\bsite{#1++(-1,0)}
}
\def\square#1#2{\draw#1++(-#2,-#2)--++(#2,0)--++(#2,0)--++(0,#2)--++(0,#2)--++(-#2,0)--++(-#2,0)--++(0,-#2)--++(0,-#2);}
\begin{document}
\begin{tikzpicture}
% first layer
\graphene{(0,0)}{3}{3}
% redefine sites for second layer
\def\bsite#1{\draw#1circle(.1);}
\def\asite#1{\square{#1}{.17}}
% second layer
\graphenereflected{(0,0)}{3}{3}
\end{tikzpicture}
\end{document}
|