Skip to content

Conversation

@ak-2485
Copy link
Contributor

@ak-2485 ak-2485 commented Apr 17, 2020

Multiple updates to the traversal phase, the azimuthal/angular hits, and the test cases.
Traversal phase: remove costly array updates in traversal main.
Azimuthal/angular hit: include collinear cases in conditionals, update time comparisons to use function strictly less than.
Test cases: Update test cases based on (a) traversal choices for ambiguities such as ray collinear with boundaries and (b) corrections made by checking 3D vis. in GeoGebra.

@ak-2485 ak-2485 mentioned this pull request Apr 17, 2020
@ak-2485 ak-2485 added the optimization Improve code performance label Apr 17, 2020
pert_x = sphere_center(1) + ray_direction(1) * pert_t;
pert_z = sphere_center(3) + ray_direction(3) * pert_t;
a = sphere_center(1) - pert_x;
b = sphere_center(2) - pert_z;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be: b = sphere_center(3) - pert_z;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

@cgyurgyik
Copy link
Contributor

cgyurgyik commented Apr 17, 2020

IMO, the use of some_value == 1 decreases readability. Instead, use booleans.

if intersect_min == 1
     ...
end

versus

if is_intersect_min
    ...
end

There's also a lot of boolean reduction that can occur (I've tackled some of this in the cpp code already), but since this isn't the production code, not a big deal. Other than that, and the comment above, LGTM.

@nukenukenukelol nukenukenukelol merged commit eced80b into spherical-volume-rendering:master Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

optimization Improve code performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ray collinear with voxel boundary. updateVoxelBoundarySegments() profiling

3 participants