make sizes more consistent

This commit is contained in:
Motiejus Jakštys 2020-05-27 12:34:32 +03:00
parent 9439ca8d79
commit f5515abe4d
2 changed files with 32 additions and 25 deletions

View File

@ -2,6 +2,7 @@ CROSSING=622916 6109267 626066 6111487 # xmin ymin xmax ymax
ZEIMENA_TOLERANCES = 128 256 512 1024 2048 4096 ZEIMENA_TOLERANCES = 128 256 512 1024 2048 4096
SINEWAVE_TOLERANCES = 1 20 30 40 SINEWAVE_TOLERANCES = 1 20 30 40
CROSSING_TOLERANCES = 64 128 256 CROSSING_TOLERANCES = 64 128 256
SINEWAVE_SIZE = 120x48
GEN1 = $(addsuffix .pdf, \ GEN1 = $(addsuffix .pdf, \
$(addprefix sinewave-douglas-,$(SINEWAVE_TOLERANCES)) \ $(addprefix sinewave-douglas-,$(SINEWAVE_TOLERANCES)) \
$(addprefix sinewave-visvalingam-,$(SINEWAVE_TOLERANCES)) \ $(addprefix sinewave-visvalingam-,$(SINEWAVE_TOLERANCES)) \
@ -9,11 +10,15 @@ GEN1 = $(addsuffix .pdf, \
$(addprefix zeimena-visvalingam-,$(ZEIMENA_TOLERANCES))) $(addprefix zeimena-visvalingam-,$(ZEIMENA_TOLERANCES)))
GEN2 = $(addsuffix .pdf, \ GEN2 = $(addsuffix .pdf, \
$(addprefix crossing-zeimena-douglas-,$(CROSSING_TOLERANCES)) \ $(addprefix overlaid-zeimena-douglas-,$(CROSSING_TOLERANCES)) \
$(addprefix crossing-zeimena-visvalingam-,$(CROSSING_TOLERANCES))) $(addprefix overlaid-zeimena-visvalingam-,$(CROSSING_TOLERANCES)))
GEN3 = $(addsuffix .pdf, \
$(addprefix overlaid-sinewave-douglas-,$(SINEWAVE_TOLERANCES)) \
$(addprefix overlaid-sinewave-visvalingam-,$(SINEWAVE_TOLERANCES)))
mj-referatas.pdf: mj-referatas.tex version.tex bib.bib zeimena.pdf \ mj-referatas.pdf: mj-referatas.tex version.tex bib.bib zeimena.pdf \
sinewave.pdf crossing.pdf $(GEN1) $(GEN2) sinewave.pdf crossing.pdf $(GEN1) $(GEN2) $(GEN3)
latexmk -g -pdf $< latexmk -g -pdf $<
define algo2img define algo2img
@ -25,7 +30,7 @@ $(1)-$(2)-%.pdf: layer2img.py db/.faux_$(1)-$(2)-%
endef endef
define algo2overlay define algo2overlay
crossing-$(1)-$(2)-%.pdf: layer2img.py db/.faux_$(1)-$(2)-% overlaid-$(1)-$(2)-%.pdf: layer2img.py db/.faux_$(1)-$(2)-%
./layer2img.py $(3) --group1-table=$(1) --group2-table=$(1)_$(2)_$$* --outfile $$@ ./layer2img.py $(3) --group1-table=$(1) --group2-table=$(1)_$(2)_$$* --outfile $$@
endef endef
@ -38,11 +43,13 @@ $(eval $(call algo2img,sinewave,douglas,60x24))
$(eval $(call algo2img,sinewave,visvalingam,60x24)) $(eval $(call algo2img,sinewave,visvalingam,60x24))
$(eval $(call algo2img,zeimena,douglas,210x297)) $(eval $(call algo2img,zeimena,douglas,210x297))
$(eval $(call algo2img,zeimena,visvalingam,210x297)) $(eval $(call algo2img,zeimena,visvalingam,210x297))
$(eval $(call gpkg2pdf,sinewave.pdf,sinewave.gpkg,,--size=60x24)) $(eval $(call gpkg2pdf,sinewave.pdf,sinewave.gpkg,,--size=$(SINEWAVE_SIZE)))
$(eval $(call gpkg2pdf,zeimena.pdf,zeimena.gpkg rectangle.gpkg,--size=67x95 --group2-infile rectangle.gpkg)) $(eval $(call gpkg2pdf,zeimena.pdf,zeimena.gpkg rectangle.gpkg,--size=134x191 --group2-infile rectangle.gpkg))
$(eval $(call gpkg2pdf,crossing.pdf,zeimena.gpkg,--size=105x74 --clip $(CROSSING))) $(eval $(call gpkg2pdf,crossing.pdf,zeimena.gpkg,--size=105x74 --clip $(CROSSING)))
$(eval $(call algo2overlay,zeimena,douglas,--size 297x210 --clip $(CROSSING))) $(eval $(call algo2overlay,zeimena,douglas,--size 148x105 --clip $(CROSSING)))
$(eval $(call algo2overlay,zeimena,visvalingam,--size 297x210 --clip $(CROSSING))) $(eval $(call algo2overlay,zeimena,visvalingam,--size 148x105 --clip $(CROSSING)))
$(eval $(call algo2overlay,sinewave,douglas,--size $(SINEWAVE_SIZE)))
$(eval $(call algo2overlay,sinewave,visvalingam,--size $(SINEWAVE_SIZE)))
sinewave.gpkg: fig2layer.py sinewave.gpkg: fig2layer.py
./fig2layer.py -o $@ sine ./fig2layer.py -o $@ sine

View File

@ -246,16 +246,16 @@ Let's zoom in to the river crossing area for some of the algorithms.
Visvalingam-Whyatt \tabularnewline \hline Visvalingam-Whyatt \tabularnewline \hline
64/4096 & 64/4096 &
\includegraphics[width=\linewidth]{crossing-zeimena-douglas-64} & \includegraphics[width=\linewidth]{overlaid-zeimena-douglas-64} &
\includegraphics[width=\linewidth]{crossing-zeimena-visvalingam-64} \tabularnewline \hline \includegraphics[width=\linewidth]{overlaid-zeimena-visvalingam-64} \tabularnewline \hline
125/15625 & 125/15625 &
\includegraphics[width=\linewidth]{crossing-zeimena-douglas-128} & \includegraphics[width=\linewidth]{overlaid-zeimena-douglas-128} &
\includegraphics[width=\linewidth]{crossing-zeimena-visvalingam-128} \tabularnewline \hline \includegraphics[width=\linewidth]{overlaid-zeimena-visvalingam-128} \tabularnewline \hline
250/62500 & 250/62500 &
\includegraphics[width=\linewidth]{crossing-zeimena-douglas-256} & \includegraphics[width=\linewidth]{overlaid-zeimena-douglas-256} &
\includegraphics[width=\linewidth]{crossing-zeimena-visvalingam-256} \tabularnewline \hline \includegraphics[width=\linewidth]{overlaid-zeimena-visvalingam-256} \tabularnewline \hline
\end{tabularx} \end{tabularx}
\caption{{\DP} and {\VW} on river crossing area} \caption{{\DP} and {\VW} on river crossing area}
@ -298,20 +298,20 @@ page~\pageref{tab:comparison-sinewave}.
Visvalingam-Whyatt \tabularnewline \hline Visvalingam-Whyatt \tabularnewline \hline
1/1 & 1/1 &
\includegraphics[width=\linewidth]{sinewave-douglas-1} & \includegraphics[width=\linewidth]{overlaid-sinewave-douglas-1} &
\includegraphics[width=\linewidth]{sinewave-visvalingam-1} \tabularnewline \hline \includegraphics[width=\linewidth]{overlaid-sinewave-visvalingam-1} \tabularnewline \hline
20/400 & 20/400 &
\includegraphics[width=\linewidth]{sinewave-douglas-20} & \includegraphics[width=\linewidth]{overlaid-sinewave-douglas-20} &
\includegraphics[width=\linewidth]{sinewave-visvalingam-20} \tabularnewline \hline \includegraphics[width=\linewidth]{overlaid-sinewave-visvalingam-20} \tabularnewline \hline
30/900 & 30/900 &
\includegraphics[width=\linewidth]{sinewave-douglas-30} & \includegraphics[width=\linewidth]{overlaid-sinewave-douglas-30} &
\includegraphics[width=\linewidth]{sinewave-visvalingam-30} \tabularnewline \hline \includegraphics[width=\linewidth]{overlaid-sinewave-visvalingam-30} \tabularnewline \hline
40/1600 & 40/1600 &
\includegraphics[width=\linewidth]{sinewave-douglas-40} & \includegraphics[width=\linewidth]{overlaid-sinewave-douglas-40} &
\includegraphics[width=\linewidth]{sinewave-visvalingam-40} \tabularnewline \hline \includegraphics[width=\linewidth]{overlaid-sinewave-visvalingam-40} \tabularnewline \hline
\end{tabularx} \end{tabularx}
\caption{{\DP} and {\VW} on example wave} \caption{{\DP} and {\VW} on example wave}