commit a35a6981f361d0b668266c6c55bb9b302120039e (tree)
parent 12bc65ee76c9b9a3e4f4eb84c8919dbcd297f807
Author: Motiejus Jakštys <motiejus@uber.com>
Date: Sat, 17 Apr 2021 17:19:41 +0300
wip selfcrossing-1 real visual
Diffstat:
3 files changed, 45 insertions(+), 14 deletions(-)
diff --git a/IV/Makefile b/IV/Makefile
@@ -16,8 +16,9 @@ FIGURES = test-figures \
fig5-gentle-inflection-after \
inflection-1-gentle-inflection-before \
inflection-1-gentle-inflection-after \
- fig6-self-crossing-before \
- fig6-self-crossing-after
+ fig6-selfcrossing-before \
+ fig6-selfcrossing-after \
+ selfcrossing-1-before
#################################
# The thesis, publishable version
@@ -92,14 +93,19 @@ inflection-1-gentle-inflection-after_1SELECT = wm_debug where name='inflection-1
inflection-1-gentle-inflection-after_2SELECT = wm_debug where name='inflection-1' AND stage='cinflections-polygon' AND gen=1
inflection-1-gentle-inflection-after_2CMAP = 1
-fig6-self-crossing-before_WIDTHDIV = 4
-fig6-self-crossing-before_1SELECT = wm_debug where name='fig6' AND stage='bbends' AND gen=1
-fig6-self-crossing-before_2SELECT = wm_visuals where name='fig6-baseline'
-fig6-self-crossing-before_2LINESTYLE = dotted
-fig6-self-crossing-before_3SELECT = wm_visuals where name='fig6-newline'
-fig6-self-crossing-after_WIDTHDIV = 4
-fig6-self-crossing-after_1SELECT = wm_debug where name='fig6' AND stage='dcrossings' AND gen=1
-
+fig6-selfcrossing-before_WIDTHDIV = 4
+fig6-selfcrossing-before_1SELECT = wm_debug where name='fig6' AND stage='bbends' AND gen=1
+fig6-selfcrossing-before_2SELECT = wm_visuals where name='fig6-baseline'
+fig6-selfcrossing-before_2LINESTYLE = dotted
+fig6-selfcrossing-before_3SELECT = wm_visuals where name='fig6-newline'
+fig6-selfcrossing-after_WIDTHDIV = 4
+fig6-selfcrossing-after_1SELECT = wm_debug where name='fig6' AND stage='dcrossings' AND gen=1
+
+selfcrossing-1-before_WIDTHDIV = 4
+selfcrossing-1-before_1SELECT = wm_debug where name='selfcrossing-1' AND stage='bbends' AND gen=1
+selfcrossing-1-before_2SELECT = wm_visuals where name='selfcrossing-1-baseline'
+selfcrossing-1-before_2LINESTYLE = dotted
+selfcrossing-1-before_3SELECT = wm_visuals where name='selfcrossing-1-newline'
.faux_test-integration: tests-integration.sql wm.sql .faux_aggregate-rivers
./db -f $<
diff --git a/IV/mj-msc.tex b/IV/mj-msc.tex
@@ -417,21 +417,38 @@ following the rules of the article.
\begin{figure}[h]
\centering
\begin{subfigure}[b]{.4\textwidth}
- \includegraphics[width=\textwidth]{fig6-self-crossing-before}
+ \includegraphics[width=\textwidth]{fig6-selfcrossing-before}
\caption{Bend's baseline is crossing another bend}
\end{subfigure}
\hfill
\begin{subfigure}[b]{.4\textwidth}
- \includegraphics[width=\textwidth]{fig6-self-crossing-after}
+ \includegraphics[width=\textwidth]{fig6-selfcrossing-after}
\caption{Self-crossing removed}
\end{subfigure}
\caption{Originally Figure 6: self-line crossing}
- \label{fig:fig6-self-crossing}
+ \label{fig:fig6-selfcrossing}
\end{figure}
The self-line-crossing may happen not by the neighboring bend, but by any other
bend in the line. For example, the baseline of the bend $(A, B)$ may cross
-different bends in between, as depicted in figure~\onpage{fig:ascii-selfcross}.
+different bends in between, as depicted in
+figure~\onpage{fig:selfcrossing-1-non-neighbor}.
+
+\begin{figure}[h]
+ \centering
+ \begin{subfigure}[b]{.4\textwidth}
+ \includegraphics[width=\textwidth]{selfcrossing-1-before}
+ \caption{Bend's baseline is crossing a non-neighboring bend}
+ \end{subfigure}
+ \hfill
+ %\begin{subfigure}[b]{.4\textwidth}
+ % \includegraphics[width=\textwidth]{selfcrossing-1-after}
+ % \caption{Self-crossing removed}
+ %\end{subfigure}
+ \caption{Self-crossing with non-neighboring bend}
+ \label{fig:selfcrossing-1-non-neighbor}
+\end{figure}
+
\begin{figure}[h]
\centering
diff --git a/IV/tests.sql b/IV/tests.sql
@@ -59,11 +59,19 @@ create table wm_visuals (name text, way geometry);
do $$
declare fig6b1 geometry;
declare fig6b2 geometry;
+
+ declare scb1 geometry;
+ declare scb2 geometry;
begin
select way from wm_debug where name='fig6' and stage='bbends' and gen=1 into fig6b1 limit 1 offset 0;
select way from wm_debug where name='fig6' and stage='bbends' and gen=1 into fig6b2 limit 1 offset 2;
insert into wm_visuals (name, way) values('fig6-baseline', st_makeline(st_startpoint(fig6b2), st_endpoint(fig6b2)));
insert into wm_visuals (name, way) values('fig6-newline', st_makeline(st_endpoint(fig6b1), st_endpoint(fig6b2)));
+
+ --select way from wm_debug where name='selfcrossing-1' and stage='bbends' and gen=1 into scb1 limit 1 offset 0;
+ --select way from wm_debug where name='selfcrossing-1' and stage='bbends' and gen=1 into scb2 limit 1 offset 2;
+ --insert into wm_visuals (name, way) values('selfcrossing-1-baseline', st_makeline(st_startpoint(scb2), st_endpoint(scb2)));
+ --insert into wm_visuals (name, way) values('selfcrossing-1-newline', st_makeline(st_endpoint(scb1), st_endpoint(scb2)));
end $$ language plpgsql;