-
Notifications
You must be signed in to change notification settings - Fork 24
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
question about code #8
Comments
Let's focus on a single ray. Then For Finally, we want to know which face is actually entered and which is exited, if there is any intersection at all. The ray only actually enters the cube when it has passed the |
many thanks for your reply! |
sorry to bother you again! these codes also have questions, can you give me some more detailed explanation?: |
|
sorry to bother you again! why the last intersection was discarded? |
@sarafridov Why directly divide by rays_d, what if the direction component is 0? |
many thanks for your great work!
`
I have question about the code, can you give me some more detailed explanation?
#Compute when the rays enter and leave the grid
offsets_pos = jax.lax.stop_gradient((radius - rays_o) / rays_d)
`
offsets_neg = jax.lax.stop_gradient((-radius - rays_o) / rays_d)
offsets_in = jax.lax.stop_gradient(jnp.minimum(offsets_pos, offsets_neg))
offsets_out = jax.lax.stop_gradient(jnp.maximum(offsets_pos, offsets_neg))
start = jax.lax.stop_gradient(jnp.max(offsets_in, axis=-1, keepdims=True))
stop = jax.lax.stop_gradient(jnp.min(offsets_out, axis=-1, keepdims=True))
first_intersection = jax.lax.stop_gradient(rays_o + start * rays_d)
The text was updated successfully, but these errors were encountered: