Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Incorrect vertex projection for perpendicular edges #4

Open

Description

@grimsa

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()

Activity

  1. grimsa commented on Jan 10, 2016

    @grimsa
    OwnerAuthor

    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.
    1b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions