average curvature and isolated bend

This commit is contained in:
Motiejus Jakštys 2021-04-14 20:03:34 +03:00
parent efa34c0fa5
commit 46acc0dc83
2 changed files with 25 additions and 10 deletions

View File

@ -503,10 +503,22 @@ find out similar ones.
\subsection{Isolated Bend}
Bend itself and its extensions can be described by \textsc{average curvature},
Bend itself and its "isolation" can be described by \textsc{average curvature},
which is \textcquote{wang1998line}{geometrically defined as the ratio of
inflection over the length of a curve.}
Two conditions must be true to claim that a bend is isolated:
\begin{enumerate}
\item \textsc{average curvature} of neighboring bends, should be larger
than the "candidate" bend's curvature; this implementation arbitrarily
chose $\isolationThreshold$.
\item Bends on both sides of the "candidate" should be longer than a
certain value. This implementation does not (yet) define such a
constraint and will only follow the average curvature constraint above.
\end{enumerate}
\subsection{The Context of a Bend: Isolated and Similar Bends}
To find out whether two bends are similar, they are compared by 3 components:
@ -527,7 +539,7 @@ $q$:
(baseline_p-baseline_q)^2}
\]
The smaller the distance $d$, the more similar the bends are.
The more similar the bends are, the smaller the distance $d$.
\subsection{Elimination Operator}

View File

@ -1,18 +1,21 @@
#!/usr/bin/awk -f
BEGIN { FS="[() ]" }
BEGIN { FS="[(); ]" }
/small_angle constant real default radians/ {
if(d) {
exit 1
} else {
d = sprintf("\\newcommand{\\smallAngle}{\\frac{\\pi}{%d}}\n",180/$8);
x1 += 1;
d1 = sprintf("\\newcommand{\\smallAngle}{\\frac{\\pi}{%d}}",180/$8);
}
/isolation_threshold constant real default / {
x2 += 1;
d2 = sprintf("\\newcommand{\\isolationThreshold}{%.2f}",$7);
}
END{
if(d) {
print d > "vars.inc.tex"
if(x1 == 1 && x2 == 1) {
print d1 > "vars.inc.tex"
print d2 >> "vars.inc.tex"
} else {
exit 1
}