You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 18, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 18, 2022. It is now read-only.
Incorrect vertex projection for perpendicular edges #4
As perpendicular edges (e.g. AB and CD, where A(0;0), B(0;20), C(5;10) and D(15;10)) have two equally viable angle-bisectors, some vertexes are projected along one, and some - along another bisector, leading to incorrectly determined projection points.
See failing test case:
de.incentergy.geometry.utils.GeometryUtilsTest.GetProjectedPointTest#projectionForPerpendicularIntersectingEdges()
For that we have to consider the orientation of both edges. For example, if we are traversing along the ring of the polygon, the bounded are will always lie on the left of each edge (or right, depending on direction of traversal). Let's say we are traversing in the direction of ABCDEF..., then polygon's area is on the left of each edge.
Now if we have a pair of perpendicular edges, we can take the direction of both of them (left+left) and that will give us a quadrant. E.g. for AB and FG it would be the AFG one, for AB and DE it would be BED. Then the angle bisector we are interested in will be in that quadrant. And the rest is easy then.
Activity
grimsa commentedon Jan 10, 2016
Potential solution documented here: http://www.khetarpal.org/polygon-splitting/#comment-2449214878
For that we have to consider the orientation of both edges. For example, if we are traversing along the ring of the polygon, the bounded are will always lie on the left of each edge (or right, depending on direction of traversal). Let's say we are traversing in the direction of ABCDEF..., then polygon's area is on the left of each edge.

Now if we have a pair of perpendicular edges, we can take the direction of both of them (left+left) and that will give us a quadrant. E.g. for AB and FG it would be the AFG one, for AB and DE it would be BED. Then the angle bisector we are interested in will be in that quadrant. And the rest is easy then.