News for hackers. Stuff that matters.
Re:The skyline problem by tomjen3 on Tuesday September 02, 2014 @01:37PM (#8258960)
Why not just sort the rectangles by the left side position, then walk through the list, drawing a line from the current position to either the right of the next rectangle (in case that one is taller) or to the right of the current rectangle, in case it is not?

This even makes it easy to parallize it because you can use the quick sort algorithm to split the rectangles in two non-overlapping sets and once your two cores have made the two parts of the skyline you only need to update the line between them.

Re:The skyline problem by Retric on Tuesday September 02, 2014 @02:27PM (#8259260)
Widths are not fixed. A tall skinny building might be drawn over a short wide one.

Also, you end up as N^2 degenerate case if the buildings form a pyramid.