CSE 4101/5101 Prof. Andy Mirzaian Computational Geometry.

Slides:



Advertisements
Similar presentations
Computer Graphics: 2D Transformations
Advertisements

Mathematical Preliminaries
3.6 Support Vector Machines
Angstrom Care 培苗社 Quadratic Equation II
1 Vorlesung Informatik 2 Algorithmen und Datenstrukturen (Parallel Algorithms) Robin Pomplun.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Cognitive Radio Communications and Networks: Principles and Practice By A. M. Wyglinski, M. Nekovee, Y. T. Hou (Elsevier, December 2009) 1 Chapter 12 Cross-Layer.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
STATISTICS Random Variables and Distribution Functions
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
UNITED NATIONS Shipment Details Report – January 2006.
February 21, 2002 Simplex Method Continued
Introduction to Algorithms
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Properties of Real Numbers CommutativeAssociativeDistributive Identity + × Inverse + ×
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Polygon Scan Conversion – 11b
ENV Envisioning Information Lecture 12 – Scientific Visualization Scalar 2D Data Ken Brodlie
Data Visualization Lecture 4 Two Dimensional Scalar Visualization
1 Outline relationship among topics secrets LP with upper bounds by Simplex method basic feasible solution (BFS) by Simplex method for bounded variables.
Robust Window-based Multi-node Technology- Independent Logic Minimization Jeff L.Cobb Kanupriya Gulati Sunil P. Khatri Texas Instruments, Inc. Dept. of.
Solve Multi-step Equations
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
Turing Machines.
Randomized Algorithms Randomized Algorithms CS648 1.
PP Test Review Sections 6-1 to 6-6
Slide 6-1 COMPLEX NUMBERS AND POLAR COORDINATES 8.1 Complex Numbers 8.2 Trigonometric Form for Complex Numbers Chapter 8.
CSE554Cell ComplexesSlide 1 CSE 554 Lecture 3: Skeleton and Thinning (Part II) Fall 2013.
MAT 205 F08 Chapter 12 Complex Numbers.
Bellwork Do the following problem on a ½ sheet of paper and turn in.
14 Vectors in Three-dimensional Space Case Study
Computer vision: models, learning and inference
Quadratic Inequalities
Differential Forms for Target Tracking and Aggregate Queries in Distributed Networks Rik Sarkar Jie Gao Stony Brook University 1.
Constant, Linear and Non-Linear Constant, Linear and Non-Linear
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Functions, Graphs, and Limits
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
CSE 4101/5101 Prof. Andy Mirzaian. References: Lecture Note 8 [LN8]LN8 [CLRS] chapter 33 Lecture Note 8 [LN8]LN8 [CLRS] chapter 33 Applications:  Proximity.
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
Artificial Intelligence
1 Motion and Manipulation Configuration Space. Outline Motion Planning Configuration Space and Free Space Free Space Structure and Complexity.
Surface normals and principal component analysis (PCA)
Splines IV – B-spline Curves
Splines I – Curves and Properties
6.4 Best Approximation; Least Squares
Mrs. Rivas International Studies Charter School. Worksheet Practice 7-1 to 7-5Section 7-1 Algebra Solve each proportion.
Computer Graphics- SCC 342
Polynomial Functions of Higher Degree
Trigonometry Trigonometry begins in the right triangle, but it doesn’t have to be restricted to triangles. The trigonometric functions carry the ideas.
Analyzing Genes and Genomes
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Intracellular Compartments and Transport
PSSA Preparation.
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
Energy Generation in Mitochondria and Chlorplasts
Sections 5.1 & 5.2 Inequalities in Two Variables
1 Sections 5.1 & 5.2 Inequalities in Two Variables After today’s lesson, you will be able to graph linear inequalities in two variables. solve systems.
Math Review with Matlab:
Copyright © Cengage Learning. All rights reserved.
Computational Geometry -- Voronoi Diagram
COSC 6114 Prof. Andy Mirzaian Computational Geometry.
COMPUTATIONAL GEOMETRY INTRODUCTION AND CONVEX HULLS ZAHRA NILFOROUSHAN ELECTRICAL & COMPUTER ENGINEERING DEPARTMENT, FACULTY OF ENGINEERING, KHARAZMI.
Presentation transcript:

CSE 4101/5101 Prof. Andy Mirzaian Computational Geometry

Overview

Computational Geometry: Study of algorithms, data structures, and computational complexity of computational problems in geometry. Dimension: 1 2 3 … d … Objects: Finitely specifiable points lines ( line segments, rays, oriented, …) circles ( conics ) polygons … Computational Model & Primitive operations: real-RAM (Random Access Machine with exact real arithmetic) Arithmetic: + -   Comparison: = < >   Logic: not and or other: sin cos … ( as little as possible)

Landscape of Computational Geometry Applications: Graphics Robotics Vision GIS CAD VLSI Pattern Recognition Optimization Transportation Statistics . . . Algorithmic Tools: general incremental divide-&-conquer space sweep topological sweep prune and search random sampling locus approach multidimensional search dynamization . . . Data Structures: general interval trees range trees segment trees priority search trees K-d trees fractional cascading persistent D.S. . . . Analysis Tools: general amortization Davenport-Schinzel . . . Geometric Tools: Convex Hull Space subdivision Arrangements Voronoi / Delaunay Diagram Triangulations Geometric Transforms Duality . . . Implementation Issues: Degeneracy (symbolic perturbation) Robustness (inexact arithmetic) . . .

Example 1: Convex Hull

Example 1: Convex Hull

Example 2: Point set triangulation

Example 2: Point set triangulation

Example 3: Simple Polygon Polygon: A closed curve in the plane consisting of finitely many straight segments. Simple Polygon: A connected non-self-crossing polygon. Convex Polygon: A simple polygon with no interior angle exceeding 180°. Non-simple Convex Simple

Example 3: Simple Polygon Triangulation

Example 4: Planar Line Arrangement

Example 4: Planar Line Arrangement

Example 5: Voronoi Diagram & Delaunay Triangulation

Example 5: Voronoi Diagram & Delaunay Triangulation Nearest site proximity partitioning of the plane

Example 5: Voronoi Diagram & Delaunay Triangulation Delaunay Triangulation = Dual of the Voronoi Diagram.

Example 5: Voronoi Diagram & Delaunay Triangulation Delaunay triangles have the “empty circle” property.

Example 5: Voronoi Diagram & Delaunay Triangulation

Example 6: 2D Delaunay Triangulation via 3D Convex Hull z z=x2+y2 y x

Example 7: Hidden Surface Removal B B Applications: Graphics Multi-window user systems …

Example 8: Planar Graph Drawing Koebe-Andreev-Thurston’s Circle Packing Theorem: [1] Any planar graph can be drawn in the plane with vertices as centers of non-overlapping circles, such that  edge between two vertices  the two circles touch. Applications: CAD, VLSI, Graphics, …

Geometric Preliminaries

Metric Space (S,d) S = a set of objects called “points” of the space, d: S2   called the distance metric Metric Axioms: (x,y,z  S) d(x,y)  0 (non-negativity) d(x,y) = 0  x=y (positive definiteness) d(x,y) = d(y,x) (symmetry) d(x,y) + d(y,z)  d(x,z) (triangle inequality)

d = d-dimensional real space is the set of d-vectors x=(x1,x2, … ,xd)d, xi   (for i=1..d). d forms a vector space, i.e., it is closed under: scaling: x = (x1, x2, … ,xd)  d , . addition: x+y = (x1+y1, x2+y2, … , xd+yd)  d. x3 3 x1 x2

Normed space x , x  0 (with equality  x=0) x , y = y , x Inner product of two vectors x and y: x , y  . x , x  0 (with equality  x=0) x , y = y , x  x , y = x , y Norm of a vector x: ||x|| = x , x ½ . Distance between vectors x,y: d(x,y) = || x – y || ||.|| is a metric norm if d(x,y) = || x – y || forms a metric. Example: dot-product x , y = xTy = x1y1+ x2y2+ … + xdyd defines Euclidean norm ||x|| = (|x1|2 + |x2|2 + … + |xd|2)1/2

Unit Ball of Norm: Unit Ball of the norm ||.|| is B = { xd | ||x||  1} & satisfies: B is symmetric about the origin, i.e., xB  -xB. B is convex B is closed, bounded, and has nonempty interior. Conversely, norm can be defined in terms of the unit ball: ||x|| = min {   0 | x  B } B = { y | yB } B B x ||x||= -1x O

Minkowski Metric Lp (1  p  ) || x ||p = (|x1|p + |x2|p + … + |xd|p)1/p dp(x,y) = || x-y ||p = (|x1 –y1|p + … + |xd –yd|p)1/p Example: L2 : (Ed : Euclidean) ||x||2 = (|x1|2 + |x2|2 + … + |xd|2)1/2 L1 : (Manhattan) ||x||1 = (|x1| + |x2| + … + |xd|) L : ||x|| = max { |x1| , |x2| , … , |xd| }

Unit Ball of Minkowski Metric Lp 2 p=3 p=2 p=1 Minkowski metric is indeed a metric: The triangle inequality is known as the Minkowski inequality [1] It is obtained from the Holder inequality [2]

Linear, affine & convex combinations points q1 , q2 , … , qk  d coefficients 1 , 2 , … , k   Linear combination: p = i iqi = 1q1+2q2+ … +kqk (this is a vector sum) Affine combination: p = i iqi = 1q1+2q2+ … +kqk s. t. i i =1 Convex combination: p = i iqi = 1q1+2q2+ … +kqk s. t. i i =1 & i0

Example: d=3, k=2 x3 q1 3 q2 Linear combinations: span(q1,q2) = {1q1+2q2 | 1 ,2  } = plane(O,q1,q2) Affine combinations: aff(q1,q2) = { q1+(1-)q2 |  } = line q1q2 Convex combinations: conv(q1,q2) = { q1+(1-)q2 | 0    1 } = line segment q1q2 conv(q1,q2,q3) = triangle q1q2q3 O x2 x1 >1 =1 q1 =0 0    1 q2 <0 q1 p q3 q2 r

-test: consider 3 points pi = (xi,yi)2, i=1,2,3  > 0  (p1 p2 p3 ) counter-clockwise (CCW), i.e., left turn  < 0  (p1 p2 p3 ) clockwise (CW), i.e., right turn  = 0  (p1 p2 p3 ) collinear ½ |  | = area of triangle (p1 p2 p3)

-test in higher dimensions: Consider d+1 points pi = (xi1,…,xid)  d, i=1..d+1. || /d! = volume of d-simplex (p1 ,p2 …,pd+1). sign() = orientation of d-simplex (p1 ,p2 …,pd+1).

Some applications of -test Polar angle comparison: (0i<) 1  2  (O,p1,p2)  0 [no need to compute trigonometric functions] p1 p2 O 1 2 p r1 r2 q In-sector test: q sector(p,r1,r2)  q is left of r1 and right of r2. (assume r2 is CCW from r1 about p.) p1 q1 p2 q2 Open line-segment crossing: p1p2  q1q2    (p1,p2,q1)  (p1,p2,q2) < 0 and (q1,q2,p1)  (q1,q2,p2) < 0 Cont’d

4. Line equation in 2D (ax+by+c=0) (x,y) collinear points (x2,y2) (x1,y1) (y1 - y2) x – (x1- x2) y + x1 y2 - x2 y1 = 0 a b c Some special cases: non-vertical (b0; divide by b): y = x +  vertical (a0, b=0; divide by a): x = 

Simple Polygons

Area of a simple polygon P=(p1,p2, …, pn) Algebraic area A(P) A(P) > 0 if P is CCW, A(P) < 0 if P is CW Geometric area Area(P) = |A(P)| FACT: 2A(P) =  (O, pi ,pi+1) =  (xi yi+1 – xi+1 yi ) =  xi(yi+1 – yi-1) O pi pi+1 P x y i=1 n (where O = origin, pn+1 = p1 , p0 = pn )

Jordan Curve Jordan Curve Theorem: A Jordan Curve is any closed non-self-crossing curve in the plane. Jordan Curve Theorem: Any Jordan curve J partitions the plane into two regions, and J is their common boundary. The bounded region is called the interior of J. The unbounded region is called the exterior of J.

Point in Polygon Inclusion Problem Input: Simple n-gon P & query point q. Query: Is q inside P? P q

Point in Polygon Inclusion Problem In O(n) time shoot a ray out of q and count “proper” boundary crossings with P. P q

Point in Polygon Inclusion Problem In O(n) time shoot a ray out of q and count “proper” boundary crossings with P. P q

Point in Polygon Inclusion Problem Degenerate cases: How to count if ray passes through a vertex of the polygon? q q Answer: implicit and slight ray perturbation:

Point in Polygon Inclusion Problem Can we solve the problem in sub-linear time if P is convex? Answer: Yes, in O(log n) time by “binary Search”. p1 p2 pn pn-1 Step 1: Is q in sector p1 pn pn-1? If not, then return “outside” pn p1 pn-1 (O(1) time. Use -test.) Step 2: Binary search. q is in sector pi pn pj, 0<i<j<n. Let m =  (i+j)/2. Is q to the left of pnpm? Update i or j to m accordingly. Repeat until j=i+1. (O(log n) time.) pi pj pm pn Step 3: j=i+1. q is inside P  qpn does not cross pip i+1 . (O(1) time.) pi pi+1 pn q

Exercises

Show the following relationships hold for Minkowski norms in the plane: In general, how do these Minkowski norms compare in d ? [See the CSE6118: Lecture Slide 6 for a more general result.] We are given a triangle T =  t1, t2, t3  by its 3 vertices in counter-clockwise order and a query point q, all in the plane. Give a simple O(1) time test to determine whether T contains q (inside or on its boundary). [Simplify your test “formula” as much as you can.] We are given a sequence P =  p1, p2, … , pn  of n points in the plane purported to be the vertices of a convex polygon in counter-clockwise order around its boundary. Give an efficient verification algorithm that P indeed represents such a polygon. We are given a convex polygon P with n vertices. Devise efficient algorithms to find (a) the largest circle inside P, (b) the largest axis-parallel square inside P, (c) the largest arbitrarily oriented square inside P. [Revisit this after we study Voronoi Diagrams and Delaunay Triangulations.] For Problem 4 see CACM Vol. 53, No. 5 & 6, 2010.

Let P be a given simple polygon with n vertices and q a given point inside P. For an arbitrary ray r that emanates from q, let CN(r, q, P) denote the crossing number of r, i.e., the number of edges of P crossed by ray r. Define Depth(q, P) to be the minimum CN(r, q, P) over all rays r emanating from q. Devise an efficient algorithm to compute Depth(q,P). Let P be an arbitrary simple polygon. (a) Show that there exists a square S that contains P and all 4 sides of S touch P. (A corner of S belongs to its both incident sides.) [Hint: the smallest bounding box of P at an arbitrary rotational orientation is a rectangle. We want a square. Continuously rotate the bounding box.] (b) Prove or disprove: there exists a square with all 4 corners on P. [This is hard.] For Problem 4 see CACM Vol. 53, No. 5 & 6, 2010.

We are given a set S of n pairwise disjoint line-segments in the plane We are given a set S of n pairwise disjoint line-segments in the plane. A J-walk of S is a Jordan curve that passes through the 2n endpoints of the segments in S, and contains each (open) segment of S either completely on its boundary, or completely in its interior, or completely in its exterior. A J-walk that is a polygon with exactly 2n vertices is called a P-walk of S. (See the figure below.) If a J-walk contains all segments of S on its boundary, then it is called a J-traversal. A P-walk whose (open) exterior is void of any segment of S is called a circumscribing P-walk. (a) Show that S has a J-traversal. [Hint: use induction.] (b) Show that S has a J-traversal that is a polygon with O(n) vertices? [Hint: Extend each segment of S (in some arbitrary order) from both sides until it hits (the extension of) another segment. Now the plane is divided into O(n) convex regions. Navigate through these regions.] (c) Show that S has a P-walk. [Harder. Use the above hint.] (d) Devise an efficient algorithm to construct a P-walk of S. (e) Show that the instance below-left has no circumscribing P-walk.

END