Skip to content

Degenerate triangles on boundary #91

@bsy-nicholasw

Description

@bsy-nicholasw

I've been chasing an unexpected behavior and boiled it down to a very basic input. I'm adding points to an existing triangle (on boundary, inside, etc) and using Delaunator to retriangulate and Constrainautor to constrain certain edges. I've been getting degenerate triangles on the boundary.

Consider this input:

[[0, 0], [30.51591076416662, -5.272057753973058], [13.955446995823877, 16.74653639495955], [22.3355613751919, -3.8587860099360114]]

The first three points are the original triangle, and the last point is one I add, which was inserted on the edge [P0, P1]. Delaunator treats the 4th point as inside, instead of on the convex hull.

I get the following triangles:

[2, 3, 0], [3, 1, 0], [2, 1, 3]

And the hull:

[2, 1, 0]

A visual of the data, where the blue line is the degenerate triangle (note, I'm in a +Y up coordinate system, so everything's CW) -

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions