Algorithm – thousands of lights with triangles in 3D space

There are thousands of rays and triangles. We need to get all the intersections. If we use a normal two-level loop, we need O(mn) time complexity. Is there How to reduce the time complexity from O(mn) to O(m * logn) or O(logm * n)?

Best wishes,

You may want to watch Is some kind of spatial partitioning technique. This allows you to quickly exclude the set of triangles.

I might consider some methods of using spherical Bounding Volume Hierarchies. But other techniques you might want to check out are BSP (Binary Space Partitioning) Trees/KD Trees or use Octree

There are thousands of rays and triangles. We need to get all the intersection points. If we use normal For the two-level loop, we need O(mn) time complexity. Is there a way to reduce the time complexity from O(mn) to O(m * logn) or O(logm * n)?

Best wishes,

What you might want to see is some kind of space partitioning technology. This allows you to quickly Exclude the set of triangles.

I might consider some methods of using spherical Bounding Volume Hierarchies. But other techniques you might also want to check out are BSP (Binary Space Partitioning) Trees/KD Trees or use Octree

Leave a Comment

Your email address will not be published.