From 07765516801feece8fce7f7c79cae0cef8ac157e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 12 Apr 2021 20:14:27 +0300 Subject: [PATCH] gentle inflection is now documented --- IV/mj-msc.tex | 18 +++++++++++++++++- IV/notes.txt | 8 -------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/IV/mj-msc.tex b/IV/mj-msc.tex index a58a088..2d54afa 100644 --- a/IV/mj-msc.tex +++ b/IV/mj-msc.tex @@ -359,10 +359,26 @@ vertices to the next bend instead of one. \includegraphics[width=\textwidth]{inflection-1-gentle-inflection-after} \caption{After applying the inflection rule} \end{subfigure} - \caption{Gentle inflection at the end of the bend when multiple vertices is moved.} + \caption{Gentle inflection at the end of the bend when multiple vertices is moved} \label{fig:inflection-1-gentle-inflection} \end{figure} +To find and fix the gentle bends' inflections requires to run the algorithm in +both directions; if implemented as documented, the steps will fail to match +some bends that should be mutated. This implementation does it in the following way: + +\begin{enumerate} + \item Run the algorithm from beginning to the end. + \item \label{rev1} Reverse the line and each bend. + \item Run the algorithm again. + \item \label{rev2} Reverse the line and each bend. + \item Return result. +\end{enumerate} + +The current implementation is the most straight-forward, but not optimal: +reversing of lines and bends could be avoided by walking backwards the lines. +In this case, steps \ref{rev1} and \ref{rev2} could be remove. That would save +both memory and computation time. \section{Self-line Crossing When Cutting a Bend} diff --git a/IV/notes.txt b/IV/notes.txt index bf2c494..051a86a 100644 --- a/IV/notes.txt +++ b/IV/notes.txt @@ -1,11 +1,3 @@ -Gentle inflection at the end of the bend ----------------------------------------- - -The article does not specify how many vertices should be included when -calculating the end-of-bend inflection. We chose the iterative approach -- as -long as the angle is "right" and the distance is (greedily) decreasing, keep -going. - Self-line crossing when cutting a bend --------------------------------------