spherical-volume-rendering / svr-algorithm

A spherical volume rendering algorithm that performs ray casting through a spherical voxel grid.
Other
6 stars 7 forks source link

Fix ray origin inside sphere, other corner cases. #144

Closed cgyurgyik closed 4 years ago

cgyurgyik commented 4 years ago

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:

  1. ray origin is within the sphere in radial voxel 1.
  2. 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).
  3. 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.
  4. ray origin is within sphere and t_begin != 0.0
  5. ray origin is within sphere and t_begin = 0.0
  6. ray origin is (0.0, 0.0, 0.0)
  7. ray origin begins on an angular boundary.
  8. ray origin begins on an azimuthal boundary.
  9. ray origin begins on a radial_boundary.
  10. ray origin begins inside sphere and ends inside sphere.
  11. ray origin begins outside sphere and ends inside sphere.
  12. ray origin begins inside sphere and ends outside sphere.
  13. ray origin is (0.0, 0.0, 0.0) and t_begin != 0.0
cgyurgyik commented 4 years ago

Moving the tests to a new issue.