Skip to content

question about code #8

@UestcJay

Description

@UestcJay

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)
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions