Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing first example in the docs #83

Open
erykciepiela opened this issue Apr 30, 2024 · 0 comments
Open

Confusing first example in the docs #83

erykciepiela opened this issue Apr 30, 2024 · 0 comments

Comments

@erykciepiela
Copy link

That's very minor, yet, may discourage users who are new to this excellent library and wants to evaluate it.

What I did with the first example:

const coords = [168,180, 168,178, 168,179, 168,181, 168,183, ...];

const delaunay = new Delaunator(coords);
console.log(delaunay.triangles);
// [623, 636, 619,  636, 444, 619, ...]

was to make it runnable by changing:

const coords = [168,180, 168,178, 168,179, 168,181, 168,183];

and to my surprise this yielded no triangles.
Having a second look I found that all the points are on the same line so, indeed, no triangulation can be done.

Changing example shouldn't be hard but may save some time for new users, the time I have just wasted...

Thanks you for exceptional library, much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant