more notes

This commit is contained in:
Motiejus Jakštys 2021-05-19 22:57:45 +03:00 committed by Motiejus Jakštys
parent e29761d2ef
commit ec4b84b36f

View File

@ -18,19 +18,22 @@ after a few bends have been skipped. E.g. ends of A<->B cross the line, but
/ | | |___,---,___/A | / | | |___,---,___/A |
/ | \_________________| / | \_________________|
\ | \ |
\ | \ | \ |
/ / / / B\ | _ __
----/ / ----/ / | | / \ / \
/ ,____/ / ,____/ | |___/ \___/A |
/ B| / B| \_________________|
| |
If a bend with 180+ deg inflection is found, its line between inflection angles If a bend with 180+ deg inflection is found, its line between inflection angles
(AB in our examples) must be crossed with all the other bends to detect a (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 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. In other words, can be very segments, and M is the number of qualifying bends. In other words, can be very
computationally expensive. computationally expensive.
This may be slightly computationally simplified: if other bend's This may be simplified: if other bend's endpoints (A' and B') are in the same
endpoints (A' and B') are in different sub-planes as divided by AB, then the sub-plane as divided by AB, then the bend can be skipped from checking if it
crossing exists, and more expensive st_split can be used. intersects with AB. Some intersections may be missed (see the example), but
they will be eliminated by just joining A and B.