From d66013892b430be22506294c07da2c34b55476e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 19 May 2021 22:57:47 +0300 Subject: [PATCH] gentle inflection is now documented --- mj-msc.tex | 18 +++++++++++++++++- notes.txt | 8 -------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/mj-msc.tex b/mj-msc.tex index a58a088..2d54afa 100644 --- a/mj-msc.tex +++ b/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/notes.txt b/notes.txt index bf2c494..051a86a 100644 --- a/notes.txt +++ b/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 --------------------------------------