locationtech / locationtech/jts

ConformingDelaunayTriangulationBuilder poor triangulation for single-triangle input, possibly for any already-Delaunay set of constraints.

Open
#1,190 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

jts-core type-question
Dominant language
Java
Stars
2.2k
Forks
475
Avg merge
14d 10h
Merged PRs (30d)
1

Description

Starting from a single triangle, passing the 3 vertices as sites with empty constraints reproduces the same triangle.

No constraint result, same as original triangle:
Image

Adding the triangle's 3 edges as constraints nominally succeeds, but produces 3 unnecessary and incorrect triangles, one of which has zero area.
Image

I have seen similar issues with constraints that happen to correspond to a triangulation of the sites which is already Delaunay.
I could add some multiple triangle examples if that would helpful.

Code:
https://github.com/palisades-lakes/jts-issues/blob/main/src/main/java/jts/CDTBIssues.java

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduction in src/main/java/jts/CDTBIssues.java and run it against ConformingDelaunayTriangulationBuilder. Compare the unconstrained triangle output with the output when its three edges are supplied as constraints, then trace the builder's handling of already-Delaunay constraints. Done means no unnecessary or zero-area triangles are produced for the reported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.