From bdf817efec1cfdd67cc6176a6664442fd98173ae Mon Sep 17 00:00:00 2001 From: Ian Jauslin Date: Mon, 17 Oct 2022 20:59:01 -0400 Subject: As presented at RUMA on 2022-10-12 --- figs/atoms.fig/Makefile | 15 +++++ figs/atoms.fig/crystal-base.gp | 21 +++++++ figs/atoms.fig/crystal.py | 24 ++++++++ figs/atoms.fig/gas-base.gp | 21 +++++++ figs/atoms.fig/gas-rods-base.gp | 21 +++++++ figs/atoms.fig/gas-rods.py | 88 ++++++++++++++++++++++++++++ figs/atoms.fig/gas.py | 39 +++++++++++++ figs/atoms.fig/liquid-base.gp | 21 +++++++ figs/atoms.fig/liquid.py | 39 +++++++++++++ figs/atoms.fig/nematic-base.gp | 21 +++++++ figs/atoms.fig/nematic.py | 90 +++++++++++++++++++++++++++++ figs/atoms.fig/smectic-base.gp | 21 +++++++ figs/atoms.fig/smectic.py | 92 +++++++++++++++++++++++++++++ figs/diamonds.fig/Makefile | 20 +++++++ figs/diamonds.fig/diamonds.py | 65 +++++++++++++++++++++ figs/diamonds.fig/shapes.sty | 1 + figs/libs/shapes.sty | 109 +++++++++++++++++++++++++++++++++++ figs/rods.fig/Makefile | 28 +++++++++ figs/rods.fig/libs/shapes.sty | 1 + figs/rods.fig/rods.tikz.tex | 30 ++++++++++ figs/shapes.fig/L_tetromino.tikz.tex | 11 ++++ figs/shapes.fig/Makefile | 28 +++++++++ figs/shapes.fig/P_pentomino.tikz.tex | 11 ++++ figs/shapes.fig/T_tetromino.tikz.tex | 11 ++++ figs/shapes.fig/V_triomino.tikz.tex | 11 ++++ figs/shapes.fig/cross.tikz.tex | 11 ++++ figs/shapes.fig/diamond.tikz.tex | 11 ++++ figs/shapes.fig/hexagon.tikz.tex | 37 ++++++++++++ figs/shapes.fig/libs/shapes.sty | 1 + 29 files changed, 899 insertions(+) create mode 100644 figs/atoms.fig/Makefile create mode 100644 figs/atoms.fig/crystal-base.gp create mode 100644 figs/atoms.fig/crystal.py create mode 100644 figs/atoms.fig/gas-base.gp create mode 100644 figs/atoms.fig/gas-rods-base.gp create mode 100644 figs/atoms.fig/gas-rods.py create mode 100644 figs/atoms.fig/gas.py create mode 100644 figs/atoms.fig/liquid-base.gp create mode 100644 figs/atoms.fig/liquid.py create mode 100644 figs/atoms.fig/nematic-base.gp create mode 100644 figs/atoms.fig/nematic.py create mode 100644 figs/atoms.fig/smectic-base.gp create mode 100644 figs/atoms.fig/smectic.py create mode 100644 figs/diamonds.fig/Makefile create mode 100644 figs/diamonds.fig/diamonds.py create mode 120000 figs/diamonds.fig/shapes.sty create mode 100644 figs/libs/shapes.sty create mode 100644 figs/rods.fig/Makefile create mode 120000 figs/rods.fig/libs/shapes.sty create mode 100644 figs/rods.fig/rods.tikz.tex create mode 100644 figs/shapes.fig/L_tetromino.tikz.tex create mode 100644 figs/shapes.fig/Makefile create mode 100644 figs/shapes.fig/P_pentomino.tikz.tex create mode 100644 figs/shapes.fig/T_tetromino.tikz.tex create mode 100644 figs/shapes.fig/V_triomino.tikz.tex create mode 100644 figs/shapes.fig/cross.tikz.tex create mode 100644 figs/shapes.fig/diamond.tikz.tex create mode 100644 figs/shapes.fig/hexagon.tikz.tex create mode 120000 figs/shapes.fig/libs/shapes.sty (limited to 'figs') diff --git a/figs/atoms.fig/Makefile b/figs/atoms.fig/Makefile new file mode 100644 index 0000000..50559fa --- /dev/null +++ b/figs/atoms.fig/Makefile @@ -0,0 +1,15 @@ +PROJECTNAME=crystal liquid gas nematic smectic gas-rods +PNGS=$(addsuffix .png, $(PROJECTNAME)) + +all: $(PNGS) + +$(PNGS): + cp $(patsubst %.png, %, $@)-base.gp $(patsubst %.png, %, $@).gp + python $(patsubst %.png, %, $@).py >> $(patsubst %.png, %, $@).gp + gnuplot $(patsubst %.png, %, $@).gp > $@ + +clean-aux: + rm -f $(addsuffix .gp, $(PROJECTNAME)) + +clean: clean-aux + rm -f $(PNGS) diff --git a/figs/atoms.fig/crystal-base.gp b/figs/atoms.fig/crystal-base.gp new file mode 100644 index 0000000..4de0ee2 --- /dev/null +++ b/figs/atoms.fig/crystal-base.gp @@ -0,0 +1,21 @@ +set terminal pngcairo size 2048,2048 + +set key off +unset colorbox +unset border +unset xtics +unset ytics +unset ztics + +set parametric + +set view equal xyz + +set isosample 100 + +set pm3d depthorder +set pm3d lighting primary 0.50 specular 0.6 + +set palette defined (0 "#339999", 1 "#339999") + +splot \ diff --git a/figs/atoms.fig/crystal.py b/figs/atoms.fig/crystal.py new file mode 100644 index 0000000..4b1ba3c --- /dev/null +++ b/figs/atoms.fig/crystal.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 + +from math import * +import random +import sys + +# size of lattice +N=5 + +# configuration +config=[] +for i in range(N): + for j in range(N): + for k in range(N): + config.append([2*i+((j+k)%2),sqrt(3)*(j+(k%2)/3),2*sqrt(6)/3*k]) + + +for i in range(len(config)): + print(str(config[i][0])+"+cos(u)*sin(v)", end=",") + print(str(config[i][1])+"+sin(u)*sin(v)", end=",") + print(str(config[i][2])+"+cos(v)", end=" ") + print("with pm3d", end="") + if i1 and abs(c)<1.0001): + if(c>0): + return([w[0],0]) + else: + return([w[0],pi]) + if(s>=0): + return([w[0],acos(c)]) + return([w[0],2*pi-acos(c)]) + +# configuration +config=[] +# add rods +while len(config)1 and abs(c)<1.0001): + if(c>0): + return([w[0],0]) + else: + return([w[0],pi]) + if(s>=0): + return([w[0],acos(c)]) + return([w[0],2*pi-acos(c)]) + +# configuration +config=[] +# add rods +while len(config)1 and abs(c)<1.0001): + if(c>0): + return([w[0],0]) + else: + return([w[0],pi]) + if(s>=0): + return([w[0],acos(c)]) + return([w[0],2*pi-acos(c)]) + +# configuration +config=[] +# add rods +while len(config) diamonds.tikz.tex + cat diamonds.tikz.tex | sed 's/%1%/red/g;s/%2%/blue/g' > diamonds_color.tikz.tex + sed -i 's/%1%/teal/g;s/%2%/teal/g' diamonds.tikz.tex + pdflatex -jobname diamonds diamonds.tikz.tex + pdflatex -jobname diamonds_color diamonds_color.tikz.tex + +clean-aux: + rm -f diamonds.tikz.tex + rm -f diamonds.log + rm -f diamonds.aux + rm -f diamonds_color.tikz.tex + rm -f diamonds_color.log + rm -f diamonds_color.aux + +clean: clean-aux + rm -f diamonds.pdf + rm -f diamonds_color.pdf diff --git a/figs/diamonds.fig/diamonds.py b/figs/diamonds.fig/diamonds.py new file mode 100644 index 0000000..2bc4d9c --- /dev/null +++ b/figs/diamonds.fig/diamonds.py @@ -0,0 +1,65 @@ +#!/usr/bin/env python3 + +from math import * +import random + +# size of space (must be int) +L=30 +# number of particles +N=int(L*L/2*0.97) + +# check whether two diamonds overlap +def check_overlap(x1,x2): + if(sqrt((x1[0]-x2[0])**2+(x1[1]-x2[1])**2)<=1): + return(True) + return(False) + +# configuration +config=[] + +# put particles on odd lattice manually +for i in range(4): + for j in range(4): + if (i!=2 or j!=1): + config.append([2*int(L/2/2)+1+i+j,2*int(L/2/2)+i-j]) + +# add particles +while len(config)