Giter VIP home page Giter VIP logo

Comments (7)

micampbell avatar micampbell commented on August 29, 2024

Yes, this is a special case that David and I talked about years ago. I think there is a solution, but I think the code will need to be cleaned up first to discover the best place to put it. One solution was to add noise to the points which give the system robustness since equal and opposite coordinates seem to cause issue.

from miconvexhull.

Jordan181 avatar Jordan181 commented on August 29, 2024

Hi Matt, thank you for your reply. Are there any plans to patch this soon?

from miconvexhull.

mc0re avatar mc0re commented on August 29, 2024

I stumbled on another similar example:
(-1, 0), (0, 1), (1, 0), (0, -1)
Throws an exception in FindInitialPoints().

from miconvexhull.

Jordan181 avatar Jordan181 commented on August 29, 2024

I've since discovered that this extends to any regular polygon centered on (0,0) for which the points can be represented exactly.

Also, perhaps this is a related issue but a different case, these points:
(0,0)
(0,50)
(5000,0)
(5000,50)
Do not throw an exception, but return a triangulation with 0 triangles.

from miconvexhull.

spaaaaam avatar spaaaaam commented on August 29, 2024

Hello,

stumbled upon the same problem while upgrading from nuget 1.1.19.504 to 1.1.19.1019.

Will revert to the previous version for now, but would happily test any fix.

Cheers

from miconvexhull.

TysonCodes avatar TysonCodes commented on August 29, 2024

Hello,

I seem to have found additional weirdness with simple squares. Using d5f3a77 (Oct 19, 2019) I get a similar exception about it being degenerate using these points:
(100, 100)
(100, 395.03999999999996)
(438, 100)
(438, 395.03999999999996)
This seems to be in ConvexHullAlgorithm.FindInitialPoints() where it detects a negligible volume.

Interestingly enough, if I instead use the following (just use MakeGrid(2, vs) instead of (10, vs) in Project 4) it generates an invalid triangulation (3 triangles where one overlaps the other 2):
(0, 0)
(0, 495.03999999999996)
(538, 0)
(538, 495.03999999999996)

Also, if I update to the newest version (241b117) from July 12, 2020 then the first set of points no longer give an exception and instead generate 2 triangles but they are still invalid as they half-way overlap. The second set of numbers continue to generate 3 triangles that overlap. Not sure if any of that helps narrow down the issue.

Thanks so much for this useful library!

from miconvexhull.

mc0re avatar mc0re commented on August 29, 2024

The following 2D points also generate ConvexHullGenerationException exception in Triangulation.CreateDelaunay:

(0, 0),
(0, -2),
(-0.71, -1.5),
(-0.71, -0.5)

MIConvexHull version 1.1.19.1019

from miconvexhull.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.