Initial commit

This commit is contained in:
Ian Jauslin 2024-02-05 13:44:30 -05:00
commit baec072d2a
40 changed files with 4209 additions and 0 deletions

321
Bibliography.bib Normal file
View File

@ -0,0 +1,321 @@
% Crystallization
@article{Mainini2014,
title={Crystallization in carbon nanostructures},
author={Mainini, Edoardo and Stefanelli, Ulisse},
journal={Communications in Mathematical Physics},
volume={328},
pages={545--571},
year={2014},
publisher={Springer}
}
@article{Theil2006,
title={A proof of crystallization in two dimensions},
author={Theil, Florian},
journal={Communications in Mathematical Physics},
volume={262},
pages={209--236},
year={2006},
publisher={Springer}
}
@article{Jansen2014,
title={Wigner crystallization in the quantum 1D jellium at all densities},
author={Jansen, Sabine and Jung, Paul},
journal={Communications in Mathematical Physics},
volume={331},
pages={1133--1154},
year={2014},
publisher={Springer}
}
% Insight into continuous systems
@article{Ruelle1971,
title={Existence of a phase transition in a continuous classical system},
author={Ruelle, David},
journal={Physical Review Letters},
volume={27},
number={16},
pages={1040},
year={1971},
publisher={APS}
}
% Mermin-Wagner
@article{Mermin1966,
title={Absence of ferromagnetism or antiferromagnetism in one-or two-dimensional isotropic Heisenberg models},
author={Mermin, N David and Wagner, Herbert},
journal={Physical Review Letters},
volume={17},
number={22},
pages={1133},
year={1966},
publisher={APS}
}
% J-L
@article{Jauslin2017,
title={Crystalline ordering and large fugacity expansion for hard-core lattice particles},
author={Jauslin, Ian and Lebowitz, Joel L},
journal={The Journal of Physical Chemistry B},
volume={122},
number={13},
pages={3266--3271},
year={2017},
publisher={ACS Publications}
}
@article{Jauslin2018,
title={High-Fugacity Expansion, Lee--Yang Zeros, and Order--Disorder Transitions in Hard-Core Lattice Systems},
author={Jauslin, Ian and Lebowitz, Joel L},
journal={Communications in Mathematical Physics},
volume={364},
pages={655--682},
year={2018},
publisher={Springer}
}
% Series by Mazel et al
@article{Mazel2018,
title={High-density hard-core model on triangular and hexagonal lattices},
author={Mazel, A and Stuhl, I and Suhov, Y},
journal={arXiv preprint arXiv:1803.04041},
year={2018}
}
@article{Mazel2019,
title={High-density hard-core model on $\mathbb{Z}^2$ and norm equations in ring $\mathbb{Z}[\sqrt[6]{-1}]$},
author={Mazel, A and Stuhl, I and Suhov, Y},
journal={arXiv preprint arXiv:1909.11648},
year={2019}
}
@article{Mazel2020,
title={The hard-core model on planar lattices: the disk-packing problem and high-density Gibbs distributions},
author={Mazel, A and Stuhl, I and Suhov, Y},
journal={arXiv preprint arXiv:2011.14156},
year={2020}
}
@article{Mazel2021,
title={Kepler's conjecture and phase transitions in the high-density hard-core model on $\mathbb{Z}^3$},
author={Mazel, A and Stuhl, I and Suhov, Y},
journal={arXiv preprint arXiv:2112.14250},
year={2021}
}
% Voronoi diagram for graphs
@article{Mehlhorn1988,
title={A faster approximation algorithm for the Steiner problem in graphs},
author={Mehlhorn, Kurt},
journal={Information Processing Letters},
volume={27},
number={3},
pages={125--128},
year={1988},
publisher={Elsevier}
}
@article{Erwig2000,
title={The graph Voronoi diagram with applications},
author={Erwig, Martin},
journal={Networks: An International Journal},
volume={36},
number={3},
pages={156--163},
year={2000},
publisher={Wiley Online Library}
}
% Voronoi dual on graphs
@article{Honiden2010,
title={Approximate shortest path queries using Voronoi duals},
author={Honiden, Shinichi and Houle, Michael E and Sommer, Christian and Wolff, Martin},
journal={Transactions on computational science IX: special issue on Voronoi diagrams in science and engineering},
pages={28--53},
year={2010},
publisher={Springer}
}
% Pirogov-Sinai theory
@article{Pirogov1975,
title={Phase diagrams of classical lattice systems},
author={Pirogov, SA and Sinai, Ya G},
journal={Theoretical and Mathematical Physics},
volume={25},
number={3},
pages={1185--1192},
year={1975}
}
@article{Zahradnk1984,
title={An alternate version of Pirogov-Sinai theory},
author={Milo{\v s} Zahradn{\'i}k},
journal={Communications in Mathematical Physics},
year={1984},
volume={93},
pages={559-581}
}
@article{Borgs1989,
title={A unified approach to phase diagrams in field theory and statistical mechanics},
author={Borgs, Christian and Imbrie, John Z},
journal={Communications in mathematical physics},
volume={123},
number={2},
pages={305--328},
year={1989},
publisher={Springer}
}
@book{Presutti2008,
title={Scaling limits in statistical mechanics and microstructures in continuum mechanics},
author={Presutti, Errico},
year={2008},
publisher={Springer Science \& Business Media}
}
% m-potential
@article{Holsztynski1978,
title={Peierls condition and number of ground states},
author={Holsztynski, W and Slawny, J},
journal={Communications in Mathematical Physics},
volume={61},
pages={177--190},
year={1978},
publisher={Springer}
}
% Cluster expansion
@book{Friedli2017,
title={Statistical mechanics of lattice systems: a concrete mathematical introduction},
author={Friedli, Sacha and Velenik, Yvan},
year={2017},
publisher={Cambridge University Press}
}
@article{Ueltschi2003,
author = {Ueltschi, Daniel},
year = {2003},
month = {05},
pages = {},
title = {Cluster Expansions and Correlation Functions},
volume = {4},
journal = {Moscow Mathematical Journal},
doi = {10.17323/1609-4514-2004-4-2-511-522}
}
% GFc's
@article{Timar2013,
title={Boundary-connectivity via graph theory},
author={Tim{\'a}r, {\'A}d{\'a}m},
journal={Proceedings of the American Mathematical Society},
volume={141},
number={2},
pages={475--480},
year={2013}
}
@article{Gaunt1965,
title={Hard-sphere lattice gases. I. Plane-square lattice},
author={Gaunt, David S and Fisher, Michael E},
journal={The Journal of Chemical Physics},
volume={43},
number={8},
pages={2840--2863},
year={1965},
publisher={American Institute of Physics}
}
% Sphere packing
@article{Hales2005,
title={A proof of the Kepler conjecture},
author={Hales, Thomas C},
journal={Annals of mathematics},
pages={1065--1185},
year={2005},
publisher={JSTOR}
}
@article{Hales2010,
title={The dodecahedral conjecture},
author={Hales, Thomas and McLaughlin, Sean},
journal={Journal of the American Mathematical Society},
volume={23},
number={2},
pages={299--344},
year={2010}
}
@article{Berryman1983,
title={Random close packing of hard spheres and disks},
author={Berryman, James G},
journal={Physical Review A},
volume={27},
number={2},
pages={1053},
year={1983},
publisher={APS}
}
@article{Adams1972,
title={Computation of dense random packings of hard spheres},
author={Adams, DJ and Matheson, AJ},
journal={The Journal of Chemical Physics},
volume={56},
number={5},
pages={1989--1994},
year={1972},
publisher={American Institute of Physics}
}
@article{Viazovska2017,
title={The sphere packing problem in dimension 8},
author={Viazovska, Maryna S},
journal={Annals of Mathematics},
pages={991--1015},
year={2017},
publisher={JSTOR}
}
@article{Cohn2017,
title={The sphere packing problem in dimension 24},
author={Cohn, Henry and Kumar, Abhinav and Miller, Stephen and Radchenko, Danylo and Viazovska, Maryna},
journal={Annals of Mathematics},
volume={185},
number={3},
pages={1017--1033},
year={2017},
publisher={Department of Mathematics, Princeton University Princeton, New Jersey, USA}
}
@article{Isobe2015,
title={Hard-sphere melting and crystallization with event-chain Monte Carlo},
author={Isobe, Masaharu and Krauth, Werner},
journal={The Journal of chemical physics},
volume={143},
number={8},
pages={084509},
year={2015},
publisher={AIP Publishing LLC}
}
% Sliding
@article{Hadas2022,
title={Columnar order in random packings of $2\times 2$ squares on the square lattice},
author={Hadas, Daniel and Peled, Ron},
journal={arXiv preprint arXiv:2206.01276},
year={2022}
}
% Physics
@article{WJ57, doi = {10.1063/1.1743956}, url = {https://doi.org/10.1063%2F1.1743956}, year = 1957, month = {nov},publisher = {{AIP} Publishing}, volume = {27}, number = {5}, pages = {1207--1208}, author = {W. W. Wood and J. D. Jacobson}, title = {Preliminary Results from a Recalculation of the Monte Carlo Equation of State of Hard Spheres}, journal = {The Journal of Chemical Physics} }
@article{AW57, doi = {10.1063/1.1743957}, url = {https://doi.org/10.1063%2F1.1743957}, year = 1957, month = {nov},publisher = {{AIP} Publishing}, volume = {27}, number = {5}, pages = {1208--1209}, author = {B. J. Alder and T. E. Wainwright}, title = {Phase Transition for a Hard Sphere System}, journal = {The Journal of Chemical Physics} }
@article{PM86, doi = {10.1038/320340a0}, url = {https://doi.org/10.1038%2F320340a0}, year = 1986, month = {mar},publisher = {Springer Nature}, volume = {320}, number = {6060}, pages = {340--342}, author = {P. N. Pusey and W. van Megen}, title = {Phase behaviour of concentrated suspensions of nearly hard colloidal spheres}, journal = {Nature} }
@article{St88, doi = {10.1103/revmodphys.60.161}, url = {https://doi.org/10.1103%2Frevmodphys.60.161}, year = 1988, month = {jan}, publisher = {American Physical Society ({APS})}, volume = {60}, number = {1}, pages = {161--207}, author = {Katherine J. Strandburg}, title = {Two-dimensional melting}, journal = {Reviews of Modern Physics} }
@book{Mc10, title={Advanced statistical mechanics}, author={McCoy, Barry M}, series={International Series of Monographs on Physics}, volume={146}, year={2010}, publisher={Oxford University Press}}
@article{BK11, doi = {10.1103/physrevlett.107.155704}, url = {https://doi.org/10.1103%2Fphysrevlett.107.155704}, year = 2011, month = {oct}, publisher = {American Physical Society ({APS})}, volume = {107}, number = {15},author = {Etienne P. Bernard and Werner Krauth}, title = {Two-Step Melting in Two Dimensions: First-Order Liquid-Hexatic Transition}, journal = {Physical Review Letters} , pages={155704}}
% High fugacity expansions
@article{Do68, doi = {10.1007/bf01075682}, url = {https://doi.org/10.1007%2Fbf01075682}, year = 1969, publisher = {Springer Nature}, volume = {2}, number = {4}, pages = {302--312}, author = {R. L. Dobrushin}, title = {The problem of uniqueness of a gibbsian random field and the problem of phase transitions}, journal = {Functional Analysis and Its Applications} }
@article{HP74, doi = {10.1088/0305-4470/7/15/017}, url = {https://doi.org/10.1088%2F0305-4470%2F7%2F15%2F017}, year = 1974, month = {oct}, publisher = {{IOP} Publishing}, volume = {7}, number = {15}, pages = {1913--1917}, author = {O J Heilmann and E Praestgaard}, title = {Phase transition in a lattice gas with third nearest neighbour exclusion on a square lattice}, journal = {Journal of Physics A: Mathematical, Nuclear and General} }
@article{EB05, doi = {10.1209/epl/i2005-10166-3}, url = {https://doi.org/10.1209%2Fepl%2Fi2005-10166-3}, year = 2005, month = {sep}, publisher = {{IOP} Publishing}, volume = {71}, number = {6}, pages = {900--905}, author = {E Eisenberg and A Baram}, title = {A first-order phase transition and a super-cooled fluid in a two-dimensional lattice gas model}, journal = {Europhysics Letters ({EPL})} }
% Exactly solvable
@book{Ba82, title={Exactly solved models in statistical mechanics}, author={Baxter, Rodney J}, year={1982}, publisher={Academic Press}}
% Lee-Yang
@article{YL52, doi = {10.1103/physrev.87.404}, url = {https://doi.org/10.1103%2Fphysrev.87.404}, year = 1952, month = {aug}, publisher = {American Physical Society ({APS})}, volume = {87}, number = {3}, pages = {404--409}, author = {C. N. Yang and T. D. Lee}, title = {Statistical Theory of Equations of State and Phase Transitions. I. Theory of Condensation}, journal = {Physical Review} }
@article{LY52, doi = {10.1103/physrev.87.410}, url = {https://doi.org/10.1103%2Fphysrev.87.410}, year = 1952, month = {aug}, publisher = {American Physical Society ({APS})}, volume = {87}, number = {3}, pages = {410--419}, author = {T. D. Lee and C. N. Yang}, title = {Statistical Theory of Equations of State and Phase Transitions. {II}. Lattice Gas and Ising Model}, journal = {Physical Review} }
% Mayer expansion
@article{Ma37, doi = {10.1063/1.1749933}, url = {https://doi.org/10.1063%2F1.1749933}, year = 1937, month = {jan},publisher = {{AIP} Publishing}, volume = {5}, number = {1}, pages = {67--73}, author = {Joseph E. Mayer}, title = {The Statistical Mechanics of Condensing Systems. I}, journal = {The Journal of Chemical Physics} }
@article{Ur27, doi = {10.1017/s0305004100011191}, url = {https://doi.org/10.1017%2Fs0305004100011191}, year = 1927, month = {apr}, publisher = {Cambridge University Press ({CUP})}, volume = {23}, number = {06}, pages = {685}, author = {H. D. Ursell}, title = {The evaluation of Gibbs{\textquotesingle} phase-integral for imperfect gases}, journal = {Mathematical Proceedings of the Cambridge Philosophical Society} }
@article{Ru63, doi = {10.1016/0003-4916(63)90336-1}, url = {https://doi.org/10.1016%2F0003-4916%2863%2990336-1}, year = 1963, month = {oct}, publisher = {Elsevier {BV}}, volume = {25}, number = {1}, pages = {109--120}, author = {David Ruelle}, title = {Correlation functions of classical gases}, journal = {Annals of Physics} }
% Textbook
@book{FV17, doi = {10.1017/9781316882603}, url = {https://doi.org/10.1017%2F9781316882603}, year = 2017, month = {nov}, publisher = {Cambridge University Press}, author = {Sacha Friedli and Yvan Velenik}, title = {Statistical Mechanics of Lattice Systems} }

2779
He_Jauslin_2024.tex Normal file

File diff suppressed because it is too large Load Diff

48
Makefile Normal file
View File

@ -0,0 +1,48 @@
PROJECTNAME=$(basename $(wildcard *.tex))
FIGS=$(notdir $(wildcard figs/*.fig))
PDFS=$(addsuffix .pdf, $(PROJECTNAME))
SYNCTEXS=$(addsuffix .synctex.gz, $(PROJECTNAME))
all: $(PROJECTNAME)
$(PROJECTNAME): $(FIGS)
pdflatex -file-line-error $@.tex
pdflatex -file-line-error $@.tex
pdflatex -synctex=1 $@.tex
$(PROJECTNAME).aux: $(FIGS)
pdflatex -file-line-error -draftmode $(PROJECTNAME).tex
$(SYNCTEXS): $(FIGS)
pdflatex -synctex=1 $(patsubst %.synctex.gz, %.tex, $@)
$(PROJECTNAME).bbl: $(PROJECTNAME).aux
bibtex $(PROJECTNAME).aux
figs: $(FIGS)
$(FIGS):
make -C figs/$@
for pdf in $$(find figs/$@/ -name '*.pdf'); do ln -fs "$$pdf" ./ ; done
clean-aux: clean-figs-aux
rm -f $(addsuffix .aux, $(PROJECTNAME))
rm -f $(addsuffix .log, $(PROJECTNAME))
rm -f $(addsuffix .out, $(PROJECTNAME))
clean-figs:
$(foreach fig,$(addprefix figs/, $(FIGS)), make -C $(fig) clean; )
rm -f $(notdir $(wildcard figs/*.fig/*.pdf))
clean-figs-aux:
$(foreach fig,$(addprefix figs/, $(FIGS)), make -C $(fig) clean-aux; )
clean-tex:
rm -f $(PDFS) $(SYNCTEXS)
clean-bibliography:
rm -f bibliography/bibliography.tex
clean: clean-aux clean-tex clean-figs

42
README Normal file
View File

@ -0,0 +1,42 @@
This directory contains the source files to typeset the article, and generate
the figures. This can be accomplished by running
make
* Dependencies:
pdflatex
TeXlive packages:
amsfonts
amsmath
array
authblk
bm
bbm
caption
dsfont
enumitem
geometry
graphicx
hyperref
latex
makecell
mathtools
multirow
pgf
ragged2e
standalone
subcaption
xcolor
GNU make
python
BibTeX
* Files:
He_Jauslin_2024.tex:
main LaTeX file
figs:
source code for the figures

290
figs/GFc.fig/GFc_gen.py Normal file
View File

@ -0,0 +1,290 @@
#!/usr/bin/env python3
import sys
# This script generates a configuration of 3-staircases in which there is a
# grid of particles in one phase, and the rest of space is filled with
# particles in another phase.
# size of grid
L1=100
L2=100
# grid of particles in phase 1
N11=12
N12=12
# position of lower left particle in phase 1
x01=30+N12
x02=30
# only print from here to there
l11=16
l12=16
l21=80
l22=88
# R2 of the model
R2=3
def main():
# particles in phase 1
particles1=[]
# particles in phase 2
particles2=[]
fill_particles1(particles1)
fill_particles2(particles2,particles1)
# join particles
particles=particles1+particles2
# compute which particles have a Voronoi cells containing a given site
voronoi_index=particles_in_voronoi(particles)
# compute the Voronoi cells of each particle
voronois=voronoi_of_particles(voronoi_index,particles)
# check whether the particles are in the GFc
GFc=particles_in_GFc(voronois,particles1,particles2)
# boundary of GFc
support=GFc_support(GFc,voronois)
GFc_boundary=boundary(support)
# print
print_headers()
print_particles(particles1,particles2,GFc)
print_boundary(GFc_boundary)
print_footers()
# generate grid of particles in phase 1
def fill_particles1(particles1):
for k1 in range(N11):
for k2 in range(N12):
particles1.append((x01+2*k1-k2,x02+k1+3*k2,1))
# fill the rest of space with particles in phase 2
def fill_particles2(particles2, particles1):
for x1 in range(L1):
for x2 in range(L2):
# index of particle
k1=(x1+3*x2)/7
k2=(2*x1-x2)/7
# check the indices are integers:
if k1 != int(k1) or k2 != int(k2):
continue
# check overlap with particles in phase 1
if check_overlap_1((x1,x2),particles1):
continue
particles2.append((x1,x2,2))
# check overlap with particles in phase 1
def check_overlap_1(x,particles1):
for p in particles1:
if check_overlap(x,p):
return True
return False
# check overlap between two 3-staircases
def check_overlap(x,y):
if max(abs(y[0]-x[0]),abs(y[1]-x[1]))>2:
return False
if abs((y[1]-x[1])+(y[0]-x[0]))<=2:
return True
return False
# given a site, compute the particles whose Voronoi cell the site is in
def particles_in_voronoi(particles):
out=[]
for x1 in range(L1):
for x2 in range(L2):
# minimize distance
mindist=L1+L2+1
candidate_list=[]
for p in particles:
dd=dist_support((x1,x2),p)
if dd<mindist:
# reset candidate list
candidate_list=[p]
mindist=dd
elif dd==mindist:
# append candidate
candidate_list.append(p)
# add list to output (keep x1,x2 as index)
out.append(((x1,x2),candidate_list))
return out
# distance between a point and the support of a particle
def dist_support(x,p):
# if x is in support then 0
if abs(p[0]-x[0])+abs(p[1]-x[1])<=2 and x[0]>=p[0] and x[1]>=p[1]:
return 0
# base
out=abs(x[0]-p[0])+abs(x[1]-p[1])
# correct this depending on which site in \sigma_p is actually closest
# lower left quadrant: p is the closest
if x[0]-p[0]<=0 and x[1]-p[1]<=0:
return out
# lines next to lower left quadrant: neighbor of p closest
if x[0]-p[0]==1 and x[1]-p[1]<=0 or x[1]-p[1]==1 and x[0]-p[0]<=0:
return out-1
# otherwise: second neightbor of p closest
return out-2
# from a table associating sites to voronoi cells, get particles
def voronoi_of_particles(voronoi_index,particles):
out=[]
# output is indexed in the same order as particles
for p in particles:
vois=[]
for v in voronoi_index:
if p in v[1]:
vois.append(v[0])
out.append((p,vois))
return out
# find which particles are in the GFc
def particles_in_GFc(voronois,particles1,particles2):
out=[]
# loop over particles
for v in voronois:
# check all other particles
for w in voronois:
# skip v
if v==w:
continue
# check whether the distance between the cells is <=R2
if set_dist(v[1],w[1])>R2:
continue
# check whether w is #-correct
if not ((w[0][2]==1 and sharp_correct1(w[0],particles1)) or (w[0][2]==2 and sharp_correct2(w[0],particles2))):
# in GFc
out.append(v[0])
break
return out
# distance between two sets
def set_dist(s1,s2):
if len(s1)==0 or len(s2)==0:
print("error: computing the distance between two sets, one of which is empty",file=sys.stderr)
exit(-1)
return -1
mind=abs(s1[0][0]-s2[0][0])+abs(s1[0][1]-s2[0][1])
for x in s1:
for y in s2:
if abs(x[0]-y[0])+abs(x[1]-y[1])<mind:
mind=abs(x[0]-y[0])+abs(x[1]-y[1])
return mind
# check whether a particle of type 1 is #-correct:
def sharp_correct1(x,particles1):
if (x[0]+2,x[1]+1,1) not in particles1:
return False
if (x[0]-2,x[1]-1,1) not in particles1:
return False
if (x[0]-3,x[1]+2,1) not in particles1:
return False
if (x[0]+3,x[1]-2,1) not in particles1:
return False
if (x[0]+1,x[1]-3,1) not in particles1:
return False
if (x[0]-1,x[1]+3,1) not in particles1:
return False
return True
# check whether a particle of type 2 is #-correct:
def sharp_correct2(x,particles2):
if (x[0]+1,x[1]+2,2) not in particles2:
return False
if (x[0]-1,x[1]-2,2) not in particles2:
return False
if (x[0]+2,x[1]-3,2) not in particles2:
return False
if (x[0]-2,x[1]+3,2) not in particles2:
return False
if (x[0]-3,x[1]+1,2) not in particles2:
return False
if (x[0]+3,x[1]-1,2) not in particles2:
return False
return True
# support of a GFc
def GFc_support(GFc,voronois):
out=[]
for p in GFc:
# find Voronoi cell
for v in voronois:
if p==v[0]:
out=out+v[1]
break
# remove duplicates
return list(set(out))
# boundary of a set
def boundary(S):
out=[]
for s in S:
if (s[0]+1,s[1]) not in S:
out.append(((s[0]+0.5,s[1]-0.5),(s[0]+0.5,s[1]+0.5)))
if (s[0]-1,s[1]) not in S:
out.append(((s[0]-0.5,s[1]-0.5),(s[0]-0.5,s[1]+0.5)))
if (s[0],s[1]+1) not in S:
out.append(((s[0]-0.5,s[1]+0.5),(s[0]+0.5,s[1]+0.5)))
if (s[0],s[1]-1) not in S:
out.append(((s[0]-0.5,s[1]-0.5),(s[0]+0.5,s[1]-0.5)))
return out
# print particles
def print_headers():
print(r'''\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
''')
# print grid
print(r'\grid{'+str(l21-l11+1+3)+'}{'+str(l22-l12+1+3)+'}{('+str(l11-1)+','+str(l12-1)+')}')
def print_particles(particles1,particles2,GFc):
for p in particles1:
if p[0]>=l11 and p[0]<=l21 and p[1]>=l12 and p[1]<=l22:
if p in GFc:
print(r'\staircase{green}{('+str(p[0])+','+str(p[1])+')}')
else:
print(r'\staircase{cyan}{('+str(p[0])+','+str(p[1])+')}')
for p in particles2:
if p[0]>=l11 and p[0]<=l21 and p[1]>=l12 and p[1]<=l22:
if p in GFc:
print(r'\staircase{yellow}{('+str(p[0])+','+str(p[1])+')}')
else:
print(r'\staircase{red}{('+str(p[0])+','+str(p[1])+')}')
def print_boundary(boundary):
for seg in boundary:
if seg[0][0]>=l11 and seg[0][0]<=l21 and seg[0][1]>=l12 and seg[0][1]<=l22:
if seg[1][0]>=l11 and seg[1][0]<=l21 and seg[1][1]>=l12 and seg[1][1]<=l22:
print(r'\draw[line width=8pt]('+str(seg[0][0])+','+str(seg[0][1])+')--('+str(seg[1][0])+','+str(seg[1][1])+');')
def print_footers():
print(r'''
\end{tikzpicture}
\end{document}''')
main()

31
figs/GFc.fig/Makefile Normal file
View File

@ -0,0 +1,31 @@
PROJECTNAME=GFc
LIBS=$(notdir $(wildcard libs/*))
PDFS=$(addsuffix .pdf, $(PROJECTNAME))
all: $(PDFS)
$(PDFS): $(LIBS) GFc.tikz.tex
pdflatex -jobname $(basename $@) -file-line-error $(patsubst %.pdf, %.tikz.tex, $@)
GFc.tikz.tex:
python3 GFc_gen.py > GFc.tikz.tex
install: $(PDFS)
cp $^ $(INSTALLDIR)/
$(LIBS):
ln -fs libs/$@ ./
clean-libs:
rm -f $(LIBS)
clean-aux:
rm -f $(addsuffix .aux, $(PROJECTNAME))
rm -f $(addsuffix .log, $(PROJECTNAME))
clean-tex:
rm -f $(PDFS)
rm -f GFc.tikz.tex
clean: clean-libs clean-aux clean-tex

1
figs/GFc.fig/shapes.sty Symbolic link
View File

@ -0,0 +1 @@
../libs/shapes.sty

View File

@ -0,0 +1 @@
../libs/Makefile

View File

@ -0,0 +1,43 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{10}{10}{(0,0)}
\fill[color=gray](1.5,1.5)--++(5,0)--++(0,3)--++(2,0)--++(0,2)--++(-5,0)--++(0,2)--++(-2,0);
\fill[color=red](2,1)circle(0.1);
\fill[color=red](3,1)circle(0.1);
\fill[color=red](4,1)circle(0.1);
\fill[color=red](5,1)circle(0.1);
\fill[color=red](6,1)circle(0.1);
\fill[color=red](7,2)circle(0.1);
\fill[color=red](7,3)circle(0.1);
\fill[color=red](7,4)circle(0.1);
\fill[color=red](8,4)circle(0.1);
\fill[color=red](9,5)circle(0.1);
\fill[color=red](9,6)circle(0.1);
\fill[color=red](8,7)circle(0.1);
\fill[color=red](7,7)circle(0.1);
\fill[color=red](6,7)circle(0.1);
\fill[color=red](5,7)circle(0.1);
\fill[color=red](4,7)circle(0.1);
\fill[color=red](4,8)circle(0.1);
\fill[color=red](3,9)circle(0.1);
\fill[color=red](2,9)circle(0.1);
\fill[color=red](1,8)circle(0.1);
\fill[color=red](1,7)circle(0.1);
\fill[color=red](1,6)circle(0.1);
\fill[color=red](1,5)circle(0.1);
\fill[color=red](1,4)circle(0.1);
\fill[color=red](1,3)circle(0.1);
\fill[color=red](1,2)circle(0.1);
\draw[color=red, dotted, line width=2pt](2,1)--(3,1)--(4,1)--(5,1)--(6,1)--(7,2)--(7,3)--(7,4)--(8,4)--(9,5)--(9,6)--(8,7)--(7,7)--(6,7)--(5,7)--(4,7)--(4,8)--(3,9)--(2,9)--(1,8)--(1,7)--(1,6)--(1,5)--(1,4)--(1,3)--(1,2)--cycle;
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1 @@
../libs/shapes.sty

1
figs/disk.fig/Makefile Symbolic link
View File

@ -0,0 +1 @@
../libs/Makefile

View File

@ -0,0 +1,13 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{6}{6}{(-3,-3)}
\disk{cyan}{(0,0)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,19 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{6}{11}{(-3,-3)}
\square{yellow}{(-2,2)}
\square{yellow}{(2,2)}
\disk{cyan}{(0,0)}
\disk{magenta}{(0,5)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,19 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{7}{11}{(-3,-3)}
\square{green}{(-1,3)}
\square{green}{(2,2)}
\disk{cyan}{(0,0)}
\disk{magenta}{(1,5)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,32 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{8}{8}{(-4,-4)}
\square{green}{(-1,3)}
\square{green}{(0,3)}
\square{green}{(1,3)}
\square{green}{(3,-1)}
\square{green}{(3,0)}
\square{green}{(3,1)}
\square{green}{(-1,-3)}
\square{green}{(0,-3)}
\square{green}{(1,-3)}
\square{green}{(-3,-1)}
\square{green}{(-3,0)}
\square{green}{(-3,1)}
\square{green}{(2,2)}
\square{green}{(2,-2)}
\square{green}{(-2,2)}
\square{green}{(-2,-2)}
\disk{cyan}{(0,0)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,28 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{16}{16}{(-8,-8)}
\square{green}{(2,2)}
\square{green}{(0,3)}
\square{green}{(-3,1)}
\square{green}{(-2,-2)}
\square{green}{(0,-3)}
\square{green}{(3,-1)}
\disk{cyan}{(0,0)}
\disk{magenta}{(5,1)}
\disk{magenta}{(2,5)}
\disk{magenta}{(-3,4)}
\disk{magenta}{(-5,-1)}
\disk{magenta}{(-2,-5)}
\disk{magenta}{(3,-4)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,26 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{16}{16}{(-8,-8)}
\square{yellow}{(2,2)}
\square{yellow}{(-2,2)}
\square{green}{(0,-3)}
\square{green}{(3,-1)}
\square{green}{(-3,-1)}
\disk{cyan}{(0,0)}
\disk{magenta}{(0,5)}
\disk{magenta}{(5,1)}
\disk{magenta}{(-5,1)}
\disk{magenta}{(3,-4)}
\disk{magenta}{(-3,-4)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,13 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{6}{6}{(-3,-3)}
\octagon{cyan}{(0,0)}
\end{tikzpicture}
\end{document}

1
figs/disk.fig/shapes.sty Symbolic link
View File

@ -0,0 +1 @@
../libs/shapes.sty

28
figs/libs/Makefile Normal file
View File

@ -0,0 +1,28 @@
PROJECTNAME=$(basename $(basename $(wildcard *.tikz.tex)))
LIBS=$(notdir $(wildcard libs/*))
PDFS=$(addsuffix .pdf, $(PROJECTNAME))
all: $(PDFS)
$(PDFS): $(LIBS)
echo $(LIBS)
pdflatex -jobname $(basename $@) -file-line-error $(patsubst %.pdf, %.tikz.tex, $@)
install: $(PDFS)
cp $^ $(INSTALLDIR)/
$(LIBS):
ln -fs libs/$@ ./
clean-libs:
rm -f $(LIBS)
clean-aux:
rm -f $(addsuffix .aux, $(PROJECTNAME))
rm -f $(addsuffix .log, $(PROJECTNAME))
clean-tex:
rm -f $(PDFS)
clean: clean-libs clean-aux clean-tex

81
figs/libs/shapes.sty Normal file
View File

@ -0,0 +1,81 @@
% square lattice (width #1, height #2, origin #3, spacing #4)
\def\grid#1#2#3{
\foreach\i in {0,...,#2}{
\draw#3++(0,\i)--++(#1,0);
}
\foreach\i in {0,...,#1}{
\draw#3++(\i,0)--++(0,#2);
}
}
% 3-staircase (color #1, position #2)
% speedup
\def\staircase#1#2{
\fill[color=#1]#2++(-0.5,-0.5)--++(3,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,-3);
\draw[color=white]#2++(-0.5,0)--++(3,0);
\draw[color=white]#2++(-0.5,1)--++(2,0);
\draw[color=white]#2++(-0.5,2)--++(1,0);
\draw[color=white]#2++(0,-0.5)--++(0,3);
\draw[color=white]#2++(1,-0.5)--++(0,2);
\draw[color=white]#2++(2,-0.5)--++(0,1);
\draw[color=black]#2++(-0.5,-0.5)--++(3,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,-3);
}
%\def\staircase#1#2{
% \fill[color=#1]#2++(-0.5,-0.5)--++(3,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,-3);
% \begin{scope}
% \clip#2++(-0.5,-0.5)--++(3,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,-3);
% \grid44{[color=white]#2++(-1,-1)}
% \end{scope}
% \draw[color=black]#2++(-0.5,-0.5)--++(3,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,-3);
%}
% 4-staircase (color #1, position #2)
\def\Staircase#1#2{
\fill[color=#1]#2++(-0.5,-0.5)--++(4,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,-4);
\begin{scope}
\clip#2++(-0.5,-0.5)--++(4,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,-4);
\grid55{[color=white]#2++(-1,-1)}
\end{scope}
\draw[color=black]#2++(-0.5,-0.5)--++(4,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,-4);
}
% 5-staircase (color #1, position #2)
\def\staircaseV#1#2{
\fill[color=#1]#2++(-0.5,-0.5)--++(5,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,-5);
\begin{scope}
\clip#2++(-0.5,-0.5)--++(5,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,-5);
\grid55{[color=white]#2++(-1,-1)}
\end{scope}
\draw[color=black]#2++(-0.5,-0.5)--++(5,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,1)--++(-1,0)--++(0,-5);
}
% square (color #1, position #2)
\def\square#1#2{
\fill[color=#1]#2++(-0.5,-0.5)--++(1,0)--++(0,1)--++(-1,0)--++(0,-1);
\begin{scope}
\clip#2++(-0.5,-0.5)--++(1,0)--++(0,1)--++(-1,0)--++(0,-1);
\grid22{[color=white]#2++(-1,-1)}
\end{scope}
%\draw[color=black]#2++(-0.5,-0.5)--++(1,0)--++(0,1)--++(-1,0)--++(0,-1);
}
% disk (color #1, position #2)
\def\disk#1#2{
\fill[color=#1]#2circle(2.5);
\begin{scope}
\clip#2circle(2.5);
\grid66{[color=white]#2++(-3,-3)}
\end{scope}
\draw[color=black]#2circle(2.5);
}
% octagon (color #1, position #2)
\def\octagon#1#2{
\fill[color=#1]#2++(-1,-2.5)--++(2,0)--++(1.5,1.5)--++(0,2)--++(-1.5,1.5)--++(-2,0)--++(-1.5,-1.5)--++(0,-2)--++(1.5,-1.5);
\begin{scope}
\clip#2++(-1,-2.5)--++(2,0)--++(1.5,1.5)--++(0,2)--++(-1.5,1.5)--++(-2,0)--++(-1.5,-1.5)--++(0,-2)--++(1.5,-1.5);
\grid66{[color=white]#2++(-3,-3)}
\end{scope}
\draw[color=black]#2++(-1,-2.5)--++(2,0)--++(1.5,1.5)--++(0,2)--++(-1.5,1.5)--++(-2,0)--++(-1.5,-1.5)--++(0,-2)--++(1.5,-1.5);
}

View File

@ -0,0 +1,20 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{10}{10}{(-1,-1)}
\staircaseV{blue}{(0,0)}
\staircaseV{green}{(2,3)}
\square{gray}{(1,4)}
\square{gray}{(3,2)}
\square{gray}{(4,1)}
\square{gray}{(4,2)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,25 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{10}{10}{(-1,-1)}
\staircaseV{blue}{(0,0)}
\staircaseV{green}{(3,4)}
\square{lightgray}{(3,3)}
\square{lightgray}{(4,3)}
\square{gray}{(1,4)}
\square{gray}{(2,3)}
\square{gray}{(2,4)}
\square{gray}{(3,2)}
\square{gray}{(4,1)}
\square{gray}{(4,2)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,26 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{10}{10}{(-1,-1)}
\staircaseV{blue}{(0,0)}
\square{lightgray}{(2,4)}
\square{lightgray}{(3,4)}
\square{lightgray}{(4,2)}
\square{lightgray}{(4,3)}
\square{lightgray}{(4,4)}
\square{gray}{(1,4)}
\square{gray}{(2,3)}
\square{gray}{(3,2)}
\square{gray}{(3,3)}
\square{gray}{(4,1)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,20 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{14}{10}{(-9,-1)}
\staircaseV{blue}{(0,0)}
\staircaseV{green}{(-5,2)}
\square{gray}{(-2,4)}
\square{gray}{(-1,1)}
\square{gray}{(-1,3)}
\square{gray}{(-1,4)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,26 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{14}{10}{(-9,-1)}
\staircaseV{blue}{(0,0)}
\staircaseV{green}{(-8,4)}
\square{lightgray}{(-3,3)}
\square{lightgray}{(-2,2)}
\square{gray}{(-3,4)}
\square{gray}{(-2,3)}
\square{gray}{(-2,4)}
\square{gray}{(-1,1)}
\square{gray}{(-1,2)}
\square{gray}{(-1,3)}
\square{gray}{(-1,4)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,26 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{14}{10}{(-9,-1)}
\staircaseV{blue}{(0,0)}
\square{lightgray}{(-4,4)}
\square{lightgray}{(-3,3)}
\square{lightgray}{(-3,4)}
\square{lightgray}{(-2,2)}
\square{lightgray}{(-2,4)}
\square{gray}{(-2,3)}
\square{gray}{(-1,1)}
\square{gray}{(-1,2)}
\square{gray}{(-1,3)}
\square{gray}{(-1,4)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,48 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{10}{10}{(-5,-5)}
\staircaseV{blue}{(0,0)}
\square{lightgray}{(-4,4)}
\square{lightgray}{(-3,3)}
\square{lightgray}{(-3,4)}
\square{lightgray}{(-2,2)}
\square{lightgray}{(-2,3)}
\square{lightgray}{(-2,4)}
\square{lightgray}{(-1,1)}
\square{lightgray}{(-1,2)}
\square{lightgray}{(-1,3)}
\square{lightgray}{(-1,4)}
\square{lightgray}{(1,4)}
\square{lightgray}{(2,3)}
\square{lightgray}{(2,4)}
\square{lightgray}{(3,2)}
\square{lightgray}{(3,3)}
\square{lightgray}{(3,4)}
\square{lightgray}{(4,1)}
\square{lightgray}{(4,2)}
\square{lightgray}{(4,3)}
\square{lightgray}{(4,4)}
\square{lightgray}{(1,-1)}
\square{lightgray}{(2,-2)}
\square{lightgray}{(2,-1)}
\square{lightgray}{(3,-3)}
\square{lightgray}{(3,-2)}
\square{lightgray}{(3,-1)}
\square{lightgray}{(4,-4)}
\square{lightgray}{(4,-3)}
\square{lightgray}{(4,-2)}
\square{lightgray}{(4,-1)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1 @@
../libs/Makefile

View File

@ -0,0 +1 @@
../libs/shapes.sty

View File

@ -0,0 +1,39 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{7}{7}{(-1,-1)}
\square{gray}{(1,4)}
\square{gray}{(2,3)}
\square{gray}{(2,4)}
\square{gray}{(3,2)}
\square{gray}{(3,3)}
\square{gray}{(3,4)}
\square{gray}{(4,1)}
\square{gray}{(4,2)}
\square{gray}{(4,3)}
\square{gray}{(4,4)}
\square{yellow}{(0,4)}
\square{yellow}{(1,3)}
\square{yellow}{(2,2)}
\square{yellow}{(3,1)}
\square{yellow}{(4,0)}
\square{magenta}{(5,1)}
\square{magenta}{(5,2)}
\square{magenta}{(5,3)}
\square{magenta}{(5,4)}
\square{green}{(1,5)}
\square{green}{(2,5)}
\square{green}{(3,5)}
\square{green}{(4,5)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,13 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{4}{4}{(-1,-1)}
\staircase{cyan}{(0,0)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,20 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\clip(-2,6)--++(12,0)--++(0,12)--++(-12,0);
\grid{19}{24}{(-6,-1)}
\foreach\x in {0,...,6}{
\foreach\y in {0,...,6}{
\staircase{cyan}{(2*\x-\y,\x+3*\y)}
}
}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,27 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{6}{6}{(-2,-2)}
\staircase{cyan}{(0,0)}
\square{green}{(0,-1)}
\square{green}{(1,-1)}
\square{green}{(2,-1)}
\square{magenta}{(-1,0)}
\square{magenta}{(-1,1)}
\square{magenta}{(-1,2)}
\square{yellow}{(1,2)}
\square{yellow}{(2,1)}
\square{lightgray}{(0,3)}
\square{lightgray}{(3,0)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,25 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{10}{10}{(-4,-4)}
\staircase{cyan}{(0,0)}
\staircase{magenta}{(2,1)}
\staircase{magenta}{(-2,-1)}
\staircase{magenta}{(-3,2)}
\staircase{magenta}{(3,-2)}
\staircase{magenta}{(1,-3)}
\staircase{magenta}{(-1,3)}
\square{green}{(2,-1)}
\square{green}{(-1,1)}
\square{green}{(1,2)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,13 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{5}{5}{(-1,-1)}
\Staircase{cyan}{(0,0)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,31 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{7}{7}{(-2,-2)}
\Staircase{cyan}{(0,0)}
\square{green}{(0,-1)}
\square{green}{(1,-1)}
\square{green}{(2,-1)}
\square{green}{(3,-1)}
\square{magenta}{(-1,0)}
\square{magenta}{(-1,1)}
\square{magenta}{(-1,2)}
\square{magenta}{(-1,3)}
\square{yellow}{(3,1)}
\square{yellow}{(2,2)}
\square{yellow}{(1,3)}
\square{lightgray}{(0,4)}
\square{lightgray}{(4,0)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,28 @@
\documentclass{standalone}
\usepackage{tikz}
\usepackage{shapes}
\begin{document}
\begin{tikzpicture}
\grid{13}{13}{(-5,-5)}
\Staircase{cyan}{(0,0)}
\Staircase{magenta}{(2,2)}
\Staircase{magenta}{(-2,4)}
\Staircase{magenta}{(-4,2)}
\Staircase{magenta}{(-2,-2)}
\Staircase{magenta}{(2,-4)}
\Staircase{magenta}{(4,-2)}
\square{green}{(1,-1)}
\square{green}{(3,-1)}
\square{green}{(3,1)}
\square{green}{(-1,1)}
\square{green}{(-1,3)}
\square{green}{(1,3)}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1 @@
../libs/Makefile

View File

@ -0,0 +1 @@
../libs/shapes.sty