BIE |
Fixing KD Tessellation Aspect RatiosTHE PROBLEMThe current KD tessellation implementation recursively splits the data (or rather a sample) in alternating dimensions using the median as the split point. This can lead to tessellations made up of long needle like rectangles, which are not suitable for the calculations our system is designed for.
SOLUTION ONEAllow consectutive splits in the same dimension, as opposed to strictly alternating the split dimension. It would be possible when splitting to either :
This will solve the problems for some sets of data, but does not guarantee the eliminatation of bad aspect ratios. This is because a 50/50 split of the data might cause a bad aspect ratio in both dimensions. A simple of example of this is a tile with all the data concentrated in one of the corners.
SOLUTION 2Allow the split point to vary from the median in the data. Ideally, we would like to be able to provide limits as follows:
Of course, meeting both constraints at once is not possible in general. We can always meet one constraint, sometimes both, but never both all the time. Note that the QuadGrid and the KdTessellation rigidly bound one constraint while ignoring the other:
What we need is a tessellation technique that trades off population split with aspect ratio. Suppose we have a penalty formula which increases in value when the ratio and population percentage of a split deviate from their respective ideal values. A simple algorithm for performing the tessellation would be as follows:
if the number of (sample size adjusted) points in tile is less than (max points per tile) do not split this tile further else compute the minimum value of the penalty formula for both x dim and y dim. split on the dimension with the lowest penalty. Hybrid versions are also possible. The following algorithm tries to keep the KD algorithm intact unless predetermined ratio bounds cannot be adhered to.
if we can do so without breaking ratio bound follow existing implementation (ie alternate 50/50 splits), else if we can do so without breaking ratio bound split 50/50 on the other dimension, else use penalty formula to determine the best split point as above. Similarly, it would be possible to have a tessellation which maintained the geometric properties of a binary (quad) tree if the population split percentage was within a predetermined range, but used a different aspect ratio when this was not the case.
POSSIBLE PENALTY FUNCTIONS
Alistair Dundas, 26th September 2002. Send suggestions, questions, and feedback to WEINBERG at ASTRO dot UMASS dot EDU. Documentation generated at Fri Mar 26 00:35:11 2010 by
|