CG_WindowingQueriesCh10

CG_WindowingQueriesCh10 - Motivation Interval trees...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Motivation Interval trees Priority search trees Windowing queries Computational Geometry Lecture 14: Windowing queries Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Windowing Zoom in; re-center and zoom in; select by outlining Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Windowing Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Windowing Given a set of n axis-parallel line segments, preprocess them into a data structure so that the ones that intersect a query rectangle can be reported efficiently Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Windowing How can a rectangle and an axis-parallel line segment intersect? Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Windowing Essentially two types: Segments whose endpoint lies in the rectangle (or both endpoints) Segments with both endpoints outside the rectangle Segments of the latter type always intersect the boundary of the rectangle (even the left and/or bottom side) Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Windowing Instead of storing axis-parallel segments and searching with a rectangle, we will: store the segment endpoints and query with the rectangle store the segments and query with the left side and the bottom side of the rectangle Note that the query problem is at least as hard as rectangular range searching in point sets Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Windowing Instead of storing axis-parallel segments and searching with a rectangle, we will: store the segment endpoints and query with the rectangle store the segments and query with the left side and the bottom side of the rectangle Question: How often might we report the same segment? Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Avoiding reporting the same segment several times Use one representation of each segment, and store a mark bit with it that is initially false When we think we should report a segment, we first check its mark bit:- if false , then report it and set the mark bit to true- otherwise, dont do anything After a query, we need to reset all mark bits to false , for the next query (how?) Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Windowing Instead of storing axis-parallel segments and searching with a rectangle, we will: store the segment endpoints and query with the rectangle use range tree (from Chapter 5) store the segments and query with the left side and the...
View Full Document

Page1 / 79

CG_WindowingQueriesCh10 - Motivation Interval trees...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online