Note that there are some explanatory texts on larger screens.

plurals
  1. POArranging rectangles in intersection order so that for i<j we can guarantee that Ri is not containted in Rj
    primarykey
    data
    text
    <p>We are creating interactive SVG diagrams containing a large number of irregular rectangles. Our user clicks within an area of the SVG and based on that we provide more information about that object. (I'm simplifying slightly - this is an industrial application and the areas are not actually rectangles – but I'll assume we can use each shape's bounding rectangle.)</p> <p>Unfortunately some of the rectangles 'entirely contain' some of the other rectangles. For example R2 could be a small rectangle 'entirely contained' the within another rectangle R1. Provided that R2 is added to the SVG file <strong>AFTER</strong> R1 then the small rectangle R2 is interactive. Unfortunately the input stream of objects does not guarantee this. I may get R2 after R1. Then R1 is printed afterwards and hence R2 cannot be clicked because it's completely covered by R1. (The objects are semitransparent so R1 remains visible – is just not clickable - most annoying!)</p> <p>Thus we want to sort our rectangle array such that all 'i' less than 'j' we can guarantee that 'Ri' is not containted in 'Rj'. But apart from this we want to make the minimum disturbance to the z order of the original sequence. We will have thousands of rectangles to sort - so whatever algorithm we choose had better not have n-squared behaviour. </p> <p>I thought initially this would be a fairly common problem in graphics systems. But a scan of the literature doesn't seem to suggest it is. I have some ideas myself for working on this - including splitting space up into regions (K-D-tree) and/ or sorting the rectangles by area (little rectangles can't contain big rectangles!) However, it would be nicer to find a good solution for this problem already out there. Perhaps I'm simply not using the right search terms. </p> <p>Any ideas ? </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload