Closed cgyurgyik closed 4 years ago
function SphericalCoordinateTraversalExample min_bound = [-20, -20.0, -20.0]; max_bound = [20.0, 20.0, 20.0]; ray_origin = [-13.0, -13.0, -13.0]; ray_direction = [1.0, 1.5, 1.0]; sphere_center = [0.0, 0.0, 0.0]; sphere_max_radius = 10.0; num_radial_sections = 4; num_angular_sections = 4; num_azimuthal_sections = 4; t_begin = 0.0; t_end = 30.0; verbose = true; [rVoxels, thetaVoxels, phiVoxels] = sphericalCoordinateTraversal(min_bound, max_bound, ray_origin, ray_direction, ... sphere_center, sphere_max_radius, num_radial_sections, num_angular_sections, num_azimuthal_sections, t_begin, t_end, verbose); rVoxels thetaVoxels phiVoxels end
# max radius of the sphere max_radius = 10 # number of radial sections num_rad = 4 # number of angular sections num_ang = 4 # number of azimuthal sections num_azi = 4 # sphere center origin_sphere = np.array([0, 0, 0]) # ray Start origin_ray = np.array([-13, -13, -13]) # ray direction ray_dir = np.array([1, 2, 1]) # t_begin t_begin = 0.0 # t_end t_end = 30.0
Ok so using the visualization, I've changed the ray direction from what our only test has, which is:
ray_direction = [1.0, 1.0, 1.0];
to
ray_direction = [1.0, 1.5, 1.0];
Aaaaand it was a typo. Sorry for the alert.
Test
spherePlot.py code
Ok so using the visualization, I've changed the ray direction from what our only test has, which is:
to
This produces the following voxels:
The XY, XZ Plane are pictured as follows:
The discrepancy: