Edit: This has been fixed. This will remain open until the rest of the tests are implemented.
When writing the spherical algorithm, we didn't include any tests for when the ray origin is inside the sphere. This is something that needs to be accounted for. Here is a list of tests I've compiled to verify the correctness of some corner cases in our algorithm:
ray origin is within the sphere in radial voxel 1.
ray origin is within sphere in radial voxel N, where N = num_radial_voxels (NOT directly centered at origin (0.0, 0.0, 0.0); this is covered in case 6).
ray origin is within sphere and within bounds [1, N] (i.e. exclusive). For example, if N = 4, the ray origin should be 2 or 3.
ray origin is within sphere and t_begin != 0.0
ray origin is within sphere and t_begin = 0.0
ray origin is (0.0, 0.0, 0.0)
ray origin begins on an angular boundary.
ray origin begins on an azimuthal boundary.
ray origin begins on a radial_boundary.
ray origin begins inside sphere and ends inside sphere.
ray origin begins outside sphere and ends inside sphere.
ray origin begins inside sphere and ends outside sphere.
Edit: This has been fixed. This will remain open until the rest of the tests are implemented.
When writing the spherical algorithm, we didn't include any tests for when the ray origin is inside the sphere. This is something that needs to be accounted for. Here is a list of tests I've compiled to verify the correctness of some corner cases in our algorithm:
ray origin is within the sphere in radial voxel 1.ray origin is within sphere in radial voxel N, where N = num_radial_voxels (NOT directly centered at origin (0.0, 0.0, 0.0); this is covered in case 6).ray origin is within sphere and t_begin != 0.0ray origin is within sphere and t_begin = 0.0ray origin is (0.0, 0.0, 0.0)ray origin begins inside sphere and ends inside sphere.ray origin begins outside sphere and ends inside sphere.ray origin begins inside sphere and ends outside sphere.