-
Notifications
You must be signed in to change notification settings - Fork 0
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
optionally use majority rather than unanimous ray consensus #32
Conversation
If > 1/2 of rays claim point is inside the mesh, go with that.
Currently implemented as an int number of rays, and an int number of those rays which must hit backfaces, defaulting to all of them (this allows short-circuiting). Could instead ask for a proportion, although as we're generally using small numbers of rays, that would probably only ever be defined in reference to the number of rays anyway. Alternatively, the rust backend could just report the proportion of rays hitting backfaces (prevents short-circuiting, but that's probably not a big concern) and the caller could do the thresholding themselves. I wondered whether having the rays' angles be better distributed might be a good idea with this bug, in case there were cases where they were all pointing in more or less the same direction. It's commented out for now, but there is an implementation of having the first ray be truly random, the 2nd be random but orthogonal, and the 3rd completing the basis, then the next 3 being the inverse of that basis (these could also be interleaved). Then the next 6 would be another random basis and its inverse, etc.. This could probably be improved by evenly distributing rays for however many rays there are - e.g. random and inverse for 2, random planar vectors at 120deg from each other for 3, tetrahedral for 4 etc.. But also, this probably doesn't make much difference. |
Superceded by #36 |
Configurable number of rays which need to hit backfaces for point to be considered internal.