New answers tagged

1

Given an intersection algorithm like the one you linked which first generates a $t$ value for every plane of the AABB, then computes $t_{min}$ and $t_{max}$ from those, you simply need to figure out which of the six initial values correspond to your final $t_{min}$. There will be two matches if your ray hits an edge, three if it hits a corner. In that case, ...


0

Build a hexahedron from 6 triangles(!), setting its 2 vertices at the poles of the sphere, and the other 3 vertices equally around the equator. Then iteratively or recursively subdivide all triangles, projecting the new vertices at the sphere surface (!). Triangle subdivision can be done by replacing an original triangle by 4 new ones, adding new vertices in ...


Top 50 recent answers are included