Presentation is loading. Please wait.

Presentation is loading. Please wait.

Arrangements and Duality Supersampling in Ray Tracing.

Similar presentations


Presentation on theme: "Arrangements and Duality Supersampling in Ray Tracing."— Presentation transcript:

1 Arrangements and Duality Supersampling in Ray Tracing

2 Introduction Ray Tracing & Ray Casting: Shooting rays from the image plane and determine which object they hit Issue: Each pixel has an area, where should we shoot the rays?

3 Introduction Center? Creating artifacts. We need super-sample! Shooting many rays through each pixel and average the result How should we distribute the rays? Regularly—causes regular artifacts Randomly

4 Introduction (a)reference (b)regular (c)random (d)random super sample

5 Discrepancy How do we choose sample points? How do we know if a sample set S is good? Discrepancy: difference between the percentage of hits for an object and the percentage of the pixel area where that object is visible Assumption: scene is made of polygons

6 Discrepancy

7 Compute Discrepancy Replace infinite candidates by a finite set The half-plane of maximum discrepancy must pass through at least one sample point

8 Compute Discrepancy Lemma 8.1 Let S be a set of n points in the unit square U. A half-plane h that achieves the maximum discrepancy with respect to S is of one of the following types: (i) h contains one point p ∈ S on its boundary, (ii) h contains two or more points of S on its boundary.

9 Compute Discrepancy

10 Duality

11

12

13 Back to the Discrepancy problem To determine our discrete measure we need to Determine how many sample points lie below a given line (in the primal plane) dualizes to Given a point in the dual plane we want to determine how many sample lines lie above it. Easier to compute?

14 Arrangements of Lines

15 Bounded Arrangement

16 Storage: DCEL Doubly Connected Edge List (DCEL) Vertex Coordinates of v IncidentEdge e(v) Face An edge Half-Edges Origin o(e) Twin The face to its left Next previous

17 Compute Arrangement

18 Incremental Algorithm

19

20 Running Time of Incremental Algorithm

21 Zone theory

22 The complexity of a zone is defined as the total complexity of all the faces it consists of, i.e. the sum of the number of edges and vertices of those faces The complexity of the zone of a line in an arrangement of m lines on the plane is O(m)

23 Prove of Zone Theory

24 Each edge in the zone of l is a left bounding edge and a right bounding edge. Claim: number of left bounding edges <= 5m Same for number of right bounding edges Total complexity of zone(l) is linear

25 Prove of Zone Theory: Induction

26 Levels and Discrepancy Back to discrepancy, we want to compute for every line between two sample points how many sample points line above that line dualize to For an arrangement how many lines are below each point

27 Levels and Discrepancy

28 Sampling Algorithms Sobel sequence Halton sequence Hammersley set etc.

29 Independent vs. Low Discrepancy

30 References Computational Geometry Algorithms and Applications, Third Edition, Mark de Berg MIT 6.838 slides, http://people.csail.mit.edu/indyk/6.838- old/handouts/lec7.pdfhttp://people.csail.mit.edu/indyk/6.838- old/handouts/lec7.pdf Utrecht University Geometry Algorithms slides, http://www.cs.uu.nl/docs/vakken/ga/slides8.pdf http://www.cs.uu.nl/docs/vakken/ga/slides8.pdf Physically Based Rendering, Second Edition, Matt Pharr course and project website: http://dreamchou.com/course/comp5008


Download ppt "Arrangements and Duality Supersampling in Ray Tracing."

Similar presentations


Ads by Google