wm/notes.txt

68 lines
1.8 KiB
Plaintext
Raw Normal View History

2021-05-19 22:57:45 +03:00
Definition of a bend
--------------------
Ends of the line should always be bends, otherwise not
all line vertices are covered by bends (definition elsewhere).
2021-05-19 22:57:45 +03:00
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
--------------------------------------
2021-05-19 22:57:45 +03:00
The self-line-crossing may happen after a few bends have been skipped. E.g.
ends of A<->B cross the line, but "swallow" a few more in between:
2021-05-19 22:57:45 +03:00
,______
/ \
|___A | \ \
\ | B\ | __
\ | | | / \
/ | | |___,---,___/A |
/ | \_________________|
\ |
\ | \ \
/ / B\ | _ __
----/ / | | / \ / \
/ ,____/ | |___/ \___/A |
/ B| \_________________|
|
2021-05-19 22:57:45 +03:00
2021-05-19 22:57:45 +03:00
If a bend with 180+ deg sum of inflection angles is found, its line between
inflection angles (AB in our examples) must be crossed with all the other bends
to detect a possible line-crossing. This is O(N*M), where N is the total number
of line segments, and M is the number of qualifying bends. It is expensive.
2021-05-19 22:57:45 +03:00
Also, there is another way to remove self-crossing, without removing most of
the bend. E.g. from:
\ /
2021-05-19 22:57:45 +03:00
B\ | __
| | / \
| |____/A |
\__________|
2021-05-19 22:57:45 +03:00
Instead of:
\ /
\/ A'
B
2021-05-19 22:57:45 +03:00
To:
2021-05-19 22:57:45 +03:00
\ \_
B\ `-,_.__
| A' \
| |
\__________|
2021-05-19 22:57:45 +03:00
But perhaps it doesn't look quite as natural. I will trust the original
article to do the right thing here and remove the bend altogether.