Initial commit

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

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