From d254a3e3f495e9cd3110ae48020786466d850d57 Mon Sep 17 00:00:00 2001 From: Ian Jauslin Date: Tue, 14 Jun 2022 16:32:34 +0200 Subject: Initial commit --- figs/bilayer.fig/Makefile | 23 ++++++++++++++++++++++ figs/bilayer.fig/bilayer.tikz.tex | 40 +++++++++++++++++++++++++++++++++++++++ figs/bilayer.fig/graphene.sty | 1 + 3 files changed, 64 insertions(+) create mode 100644 figs/bilayer.fig/Makefile create mode 100644 figs/bilayer.fig/bilayer.tikz.tex create mode 120000 figs/bilayer.fig/graphene.sty (limited to 'figs/bilayer.fig') diff --git a/figs/bilayer.fig/Makefile b/figs/bilayer.fig/Makefile new file mode 100644 index 0000000..147037c --- /dev/null +++ b/figs/bilayer.fig/Makefile @@ -0,0 +1,23 @@ +PROJECTNAME=$(basename $(basename $(wildcard *.tikz.tex))) + +PDFS=$(addsuffix .pdf, $(PROJECTNAME)) + +all: $(PDFS) + +$(PDFS): + pdflatex -jobname $(basename $@) $(patsubst %.pdf, %.tikz.tex, $@) + + +install: $(PROJECTNAME) + cp $^.pdf $(INSTALLDIR)/ + + +clean-aux: + rm -f $(addsuffix .aux, $(PROJECTNAME)) + rm -f $(addsuffix .log, $(PROJECTNAME)) + rm -f $(addsuffix .out, $(PROJECTNAME)) + +clean-tex: + rm -f $(PDFS) $(SYNCTEXS) + +clean: clean-aux clean-tex diff --git a/figs/bilayer.fig/bilayer.tikz.tex b/figs/bilayer.fig/bilayer.tikz.tex new file mode 100644 index 0000000..a35b039 --- /dev/null +++ b/figs/bilayer.fig/bilayer.tikz.tex @@ -0,0 +1,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} diff --git a/figs/bilayer.fig/graphene.sty b/figs/bilayer.fig/graphene.sty new file mode 120000 index 0000000..477bbc1 --- /dev/null +++ b/figs/bilayer.fig/graphene.sty @@ -0,0 +1 @@ +../lib/graphene.sty \ No newline at end of file -- cgit v1.2.3-70-g09d2