1 / 16

The Visibility Problem and Binary Space Partition

The Visibility Problem and Binary Space Partition. The Visibility Problem. b. a. c. e. d. Z-buffering. Draw objects in arbitrary order For each pixel, maintain depth (“z”) Only draw pixel if new “z” is closer Instead: draw objects in order, from back to front (“painter’s algorithm”).

ehill
Download Presentation

The Visibility Problem and Binary Space Partition

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Visibility ProblemandBinary Space Partition

  2. The Visibility Problem b a c e d

  3. Z-buffering • Draw objects in arbitrary order • For each pixel, maintain depth (“z”) • Only draw pixel if new “z” is closer Instead: draw objects in order, from back to front (“painter’s algorithm”)

  4. 1 3 Binary Planar Partitions 0 0 b 2 1 ab cde a c 3 de a b c 2 e d e d

  5. 1 3 Painter’s Algorithm 0 0 b 2 1 a c 3 a b c 2 e d e d

  6. Binary Planar Partitions b1 b b2 a c

  7. Auto-partitions a b1 b2,c c b1 b b2 b2 a c

  8. Auto-partitions a b1 b2,c b2 b1 b2 c1 c2 a c1 c c2

  9. Auto-partitions 1+2+3+∙∙∙+n = n(n+1)/2 = O(n2)

  10. Binary Planar Partitions Goal: Find binary planer partition, with small number of fragmentations

  11. Random Auto-Partitions Choose random permutation of segments (s1, s2, s3,…, sn) While there is a region containing more than one segment, separate it using first si in the region

  12. Random Auto-Partitions u can cut v4 only if u appears before v1,v2,v3,v4 in random permutation P(u cuts v4) ≤ 1/5 u v1 v4 v3 v2

  13. t3 t1 t2 Random Auto-Partitions E[number of cuts u makes] = E[num cuts on right] + E[num cuts on left] = E[Cv1+Cv2+∙∙∙] + E[Ct1+Ct2+∙∙∙] = E[Cv1]+ E[Cv2]+∙∙∙ + E[Ct1]+ E[Ct2]+∙∙∙ ≤ 1/2+1/3+1/4+∙∙∙+1/n + 1/2+1/3+1/4+∙∙∙+1/n = O(log n) E[total number of fragments] = n + E[total number of cuts] = n + uE[num cuts u makes] = n+nO(log n) = O(n log n) u v1 v4 v3 v2 Cv1=1 if u cuts v1, 0 otherwise

  14. Random Auto-Partitions Choose random permutation of segments (s1, s2, s3,…, sn) While there is a region containing more than one segment, separate it using first si in the region O(n log n) fragments in expectation

  15. Free cuts Use internal fragments immediately as “free” cuts

  16. Binary Space Partitions • Without free cuts: O(n3) • With free cuts: O(n2)

More Related