algorithm - Combining items into fixed sized groups for k-d tree -


i'm using k-d tree spacial partitioning in ray-tracer. want combine near-by primitives fixed-sized groups data in each group can deinterleaved , processed simultaneously using simd instructions. fast algorithm find (approximately) smallest fixed-sized groups?

ideally augment k-d tree building algorithm instead of adding separate pass, complicated fact primitives close primitives belong more 1 leaf node , can't have groups duplicate items because floating point precision errors mess shadows , reflections.

i figure i'm far first person try solution exists, relevant solutions found searching internet grouping objects deal point data , variable-sized groups.

one popular way group objects pick random object, add "closest" k objects group it. "closest" defined mean giving smallest surface area combined bounding box. can use hilbert curve distance; either distance on 3d curve between objects' centers, or in 6d space bounding boxes become points:

(x_min, y_min, z_min, x_max, y_max, z_max) 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

c# - How do I get the Nth largest element from a list with duplicates, using LINQ? -

jsp - "Sending a redirect is forbidden after the response has been committed" in sendRedirect -