Skip to content

JarvisMarshArlorithm2D: must test for points starvation #4

@eplesse

Description

@eplesse

Hello Erik. First, thanks for your great job . I mainly used your jarvisMarhsallAlgorithm2D. I wanted to raise your attention upon the following trap in which I have fallen quite often (I deal with hundrerds of various 2d Shapes points and need to build convex hull of each shape).
Even if I did not spent much time to understand precisely the algorithm, I had to change line 54 of JarvisMarchAlgorithm2D.cs like this:

 while (true && points.Count > 0)

Since all points may habe been removed by code at line 125
and that and radom access in points in made line 61

This has been enough for my needs but It might need your insight

Anyway, thanks again. This has been really usefull for me.

Emmanuel

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