The Visibility Problem and Binary Space Partition

Slides:



Advertisements
Similar presentations
Computer Graphics - Rasterization -
Advertisements

CSC418 Computer Graphics n Polygon normals n Back Faces n Visibility Algorithms.
03/12/02 (c) 2002 University of Wisconsin, CS559 Last Time Some Visibility (Hidden Surface Removal) algorithms –Painter’s Draw in some order Things drawn.
David Luebke5/11/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
Memory Management Chapter 7. Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated efficiently to pack as.
Visibility in Computer Graphics Toni Sellarès Unversitat de Girona
Computer Graphics Visible Surface Determination. Goal of Visible Surface Determination To draw only the surfaces (triangles) that are visible, given a.
Using Divide and Conquer for Sorting
Korea Univ. Graphics Lab. 3D Game Engine Design Chapter 12. Spatial Sorting Chung Ji Hye
BSP Trees Binary space partitioning trees. Used to store a collection of objects in n- dimensional space. Tree recursively divides n-dimensional space.
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Lecture 12 : Special Case of Hidden-Line-Elimination Computational Geometry Prof. Dr. Th. Ottmann 1 Special Cases of the Hidden Line Elimination Problem.
1 Dr. Scott Schaefer Hidden Surfaces. 2/62 Hidden Surfaces.
A lion in the desert How do you find a lion in the desert? How about when you have a predicate that tells you if the lion is in front or behind a separating.
Hidden Surface Elimination Wen-Chieh (Steve) Lin Institute of Multimedia Engineering I-Chen Lin’ CG Slides, Rich Riesenfeld’s CG Slides, Shirley, Fundamentals.
1 Memory Management Chapter 7. 2 Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated to ensure a reasonable.
1 CSCE 441: Computer Graphics Hidden Surface Removal (Cont.) Jinxiang Chai.
Now Playing: Big Bird Eddie Floyd from The Complete Stax-Volt Singles Volume 1 ( ) Released April 30, 1991.
Hidden-Line Elimination Computational Geometry, WS 2006/07 Lecture 14 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Point Location Computational Geometry, WS 2007/08 Lecture 5 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
1 Clipping and Hidden Surfaces CS-184: Computer Graphics Prof. James O’Brien.
Visible-surface Detection Computer Graphics Seminar MUM
A lion in the desert How do you find a lion in the desert? How about when you have a predicate that tells you if the lion is in front or behind a separating.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
Vertices and Fragments III Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Spatial Data Structure: Quadtree, Octree,and BSP tree Mengxia Zhu Fall 2007.
Hidden Surface Removal
Visible Surface Determination
Shadows Computer Graphics. Shadows Shadows Extended light sources produce penumbras In real-time, we only use point light sources –Extended light sources.
Math 5A: Area Under a Curve. The Problem: Find the area of the region below the curve f(x) = x 2 +1 over the interval [0, 2].
10/29/02 (c) 2002 University of Wisconsin, CS559 Today Hidden Surface Removal Exact Visibility.
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 26.
CSC418 Computer Graphics n BSP tree n Z-Buffer n A-buffer n Scanline.
The BSP-tree from Prof. Seth MIT.. Motivation for BSP Trees: The Visibility Problem We have a set of objects (either 2d or 3d) in space. We have.
In a rectangular grid, each cell is denoted by a pair (level, column) A rectangular grid : (0, 1)
Stereogram Solver Katya Groisman. What is stereogram? Two-dimensional image, with an optic illusion of depth.
2 COEN Computer Graphics I Evening’s Goals n Discuss application bottleneck determination n Discuss various optimizations for making programs execute.
CS-378: Game Technology Lecture #2.2: Clipping and Hidden Surfaces Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney,
3/23/04© University of Wisconsin, CS559 Spring 2004 Last Time Antialiasing –Area-weighted sampling Visibility –Painters algorithm –Depth buffer (Z-buffer)
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Binary Space Partitioning Trees Ray Casting Depth Buffering
Implementation II.
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Average Case Analysis.
Slides by: Arjun Dasgupta BINARY PLANAR PARTITION Lecture 2 Advanced Algorithms II Slides by: Arjun Dasgupta.
Where We Stand At this point we know how to: –Convert points from local to window coordinates –Clip polygons and lines to the view volume –Determine which.
Computer Graphics I, Fall 2010 Implementation II.
February 17, 2005Lecture 6: Point Location Point Location (most slides by Sergi Elizalde and David Pritchard)
The Visibility Problem and Binary Space Partition.
Image Segmentation Nitin Rane. Image Segmentation Introduction Thresholding Region Splitting Region Labeling Statistical Region Description Application.
BSP Tree Supplement Jyun-Ming Chen. Fall Kd-Tree and BSP tree kd-tree is a special kind of bsp tree.
Files An operating system, maintains descriptive information about files in a data structure called a file descriptor. NameDeletion control Storage Organization.
COMPUTER GRAPHICS CS 482 – FALL 2015 NOVEMBER 10, 2015 VISIBILITY CULLING HIDDEN SURFACES ANTIALIASING HALFTONING.
4 Starting Tips to Keep Your Car in Top Condition
Memory Management Chapter 7.
Computer Graphics Implementation II
Solid Area Scan Conversion or Visible Surface Detection
Hidden Surface Removal
CSC418 Computer Graphics Back Faces Visibility Algorithms.
BSP Trees Binary space partitioning trees.
© University of Wisconsin, CS559 Fall 2004
Hidden Surfaces Dr. Scott Schaefer.
Implementation II Ed Angel Professor Emeritus of Computer Science
Texture and Shadow Mapping
1 To go to the next slide, click this button instead. A random slide will come up.
Introduction to Computer Graphics with WebGL
The Framebuffer 1 Lecture 37 Fri, Nov 30, 2007.
Implementation II Ed Angel Professor Emeritus of Computer Science
Visible-Surface Determination
Presentation transcript:

The Visibility Problem and Binary Space Partition Slides prepared by Indyk@MIT

The Visibility Problem 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”)

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

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

Binary Planar Partitions c

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

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

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

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

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

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

Random Auto-Partitions v1 v4 v2 v3 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) Cv1=1 if u cuts v1, 0 otherwise

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

Use internal fragments immediately as “free” cuts

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