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

InteractionBounds are stored as two positions which will fail when one point is at infinity #53

Open
austinschneider opened this issue Feb 24, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@austinschneider
Copy link
Collaborator

austinschneider commented Feb 24, 2024

The InteractionBounds are currently represented as a std::tuple<Vector3D, Vector3D> pair of positions.

InteractionBounds are used to compute interaction- and column-depth integrals and thus need to be well defined.

This will process will certainly fail if one of the two positions is a point at infinity, because the direction information is lost.
The solution to this may be to implement a dedicated Ray class.

However, even with a dedicated Ray representation there may still be an issue computing the normalized position probabilities with an unbounded ray. This is something we should double check and potentially implement a special case for.

The main defense against this right now is that we (almost?) always use the Path::ClipToOuterBounds() function during the vertex injection and are initializing our Path objects with an initial position, direction, and length. Which means as long as the vertex injection happens with a valid path through the geometry, it should produce finite InjectionBounds. The trouble will come if we have a path that does not intersect with the geometry, or if some position distribution does not use this same mechanism to calculate its bounds.

@austinschneider austinschneider added the bug Something isn't working label Feb 24, 2024
@austinschneider austinschneider self-assigned this Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant