Presentation is loading. Please wait.

Presentation is loading. Please wait.

Convex Hull ● Jarvis' March O(hn) – Find lowest point O(n) – Repeatedly Find next least-counterclockwise point O(hn) ● Grahm's Scan O(n log n) – Find lowest.

Similar presentations


Presentation on theme: "Convex Hull ● Jarvis' March O(hn) – Find lowest point O(n) – Repeatedly Find next least-counterclockwise point O(hn) ● Grahm's Scan O(n log n) – Find lowest."— Presentation transcript:

1 Convex Hull ● Jarvis' March O(hn) – Find lowest point O(n) – Repeatedly Find next least-counterclockwise point O(hn) ● Grahm's Scan O(n log n) – Find lowest point O(n) – Sort points by counterclockwise-ness from lowest point O(n log n) – Visit points in order, popping verticies off the stack when turning right O(n)

2 Which is better? Depends whether h > log n

3 Data Set

4 Time

5 Size of Hull

6 Divergence 500,000 points

7 Time comparison

8 Time over n

9 h vs n

10 Conclusions ● Jarvis march slower, but implementation is correct ● JM and GS have similar complexity with this data set ● What about 3 dimensions? – applications in ray tracing


Download ppt "Convex Hull ● Jarvis' March O(hn) – Find lowest point O(n) – Repeatedly Find next least-counterclockwise point O(hn) ● Grahm's Scan O(n log n) – Find lowest."

Similar presentations


Ads by Google