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

make triangulation tests stronger with more randomness #53

Open
basnijholt opened this issue Dec 19, 2018 · 1 comment
Open

make triangulation tests stronger with more randomness #53

basnijholt opened this issue Dec 19, 2018 · 1 comment

Comments

@basnijholt
Copy link
Member

(original issue on GitLab)

opened by Joseph Weston (@jbweston) at 2018-07-10T15:35:28.517Z

Currently we test against the standard simplex.

We could improve matters by applying a random affine transform to the standard simplex, and checking that the tests still pass.

We would also need to have functions for generating points around simplices (inside, outside, on face). This should not be too hard.

For example we can generate points on a face by choosing ndim positive random numbers from successively smaller intervals, and then choosing a final number so that the sum is 1. These are the coordinates of a point in a simplex in the basis of the vertex vectors.

@basnijholt
Copy link
Member Author

originally posted by Jorn Hoofwijk (@Jorn) at 2018-07-13T07:48:30.616Z on GitLab

Joe and I discussed this yesterday (in real life), we made the tests stronger, with all possible special points (like on an edge, collinear with an edge, coplanar with a face, on a face, inside and outside, etcetera) and instead removed some randomness to make the tests easier to understand.

I do see that applying a transform could be interesting to do, but then for each case we should watch out that it is actually still correct, because a triangulation may change when scaling x and y with different factors.

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

No branches or pull requests

1 participant