I. The Problem of Molding Does a given object have a mold from which it can be removed? object not removable mold 1 object removable Assumptions The object.

Slides:



Advertisements
Similar presentations
Two Segments Intersect?
Advertisements

Polygon Triangulation
Incremental Linear Programming Linear programming involves finding a solution to the constraints, one that maximizes the given linear function of variables.
Computational Geometry
Planar Orientations Chapter 4 ( ) in the book Written By: Tomer Heber.
Map Overlay Algorithm. Birch forest Wolves Map 1: Vegetation Map 2: Animals.
Convex drawing chapter 5 Ingeborg Groeneweg. Summery What is convex drawing What is convex drawing Some definitions Some definitions Testing convexity.
Brute-Force Triangulation
2/3/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Triangulations and Guarding Art Galleries II Carola Wenk.
Convex Hull obstacle start end Convex Hull Convex Hull
One of the most important problems is Computational Geometry is to find an efficient way to decide, given a subdivision of E n and a point P, in which.
I. The Problem of Molding Does a given object have a mold from which it can be removed? object not removable mold 1 object removable Assumptions The object.
UNC Chapel Hill M. C. Lin Polygon Triangulation Chapter 3 of the Textbook Driving Applications –Guarding an Art Gallery –3D Morphing.
Lecture 3: Polygon Triangulation Computational Geometry Prof. Dr. Th. Ottmann Triangulation (Naive)
9/12/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Triangulations and Guarding Art Galleries II Carola Wenk.
1 Voronoi Diagrams. 2 Voronoi Diagram Input: A set of points locations (sites) in the plane.Input: A set of points locations (sites) in the plane. Output:
Computer Graphics Viewing.
By Groysman Maxim. Let S be a set of sites in the plane. Each point in the plane is influenced by each point of S. We would like to decompose the plane.
Overlay of Two Subdivisions
Convex Sets & Concave Sets A planar region R is called convex if and only if for any pair of points p, q in R, the line segment pq lies completely in R.
Intersections. Intersection Problem 3 Intersection Detection: Given two geometric objects, do they intersect? Intersection detection (test) is frequently.
Computational Geometry -- Voronoi Diagram
Half-Space Intersections
Linear Programming Computational Geometry, WS 2007/08 Lecture 7, Part II Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Point Location Computational Geometry, WS 2007/08 Lecture 5 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Polygon Triangulation Computational Geometry, WS 2007/08 Lecture 9 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
Voronoi Diagrams.
Polygon Triangulation Computational Geometry, WS 2006/07 Lecture 8, Part 2 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
The Art Gallery Problem
Brute-Force Triangulation
9/7/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Triangulations and Guarding Art Galleries Carola Wenk.
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.
Triangulating a monotone polygon
UNC Chapel Hill M. C. Lin Orthogonal Range Searching Reading: Chapter 5 of the Textbook Driving Applications –Querying a Database Related Application –Crystal.
UNC Chapel Hill M. C. Lin Linear Programming Reading: Chapter 4 of the Textbook Driving Applications –Casting/Metal Molding –Collision Detection Randomized.
UNC Chapel Hill M. C. Lin Line Segment Intersection Chapter 2 of the Textbook Driving Applications –Map overlap problems –3D Polyhedral Morphing.
RA PRESENTATION Sublinear Geometric Algorithms B 張譽馨 B 汪牧君 B 李元翔.
1 Triangulation Supplemental From O’Rourke (Chs. 1&2) Fall 2005.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Arrangements and Duality.
2/19/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Voronoi Diagrams Carola Wenk Based on: Computational Geometry:
Arrangements and Duality Motivation: Ray-Tracing Fall 2001, Lecture 9 Presented by Darius Jazayeri 10/4/01.
1 Computer Graphics Clipping Fall FCC Line Clipping What happens when one or both endpoints of a line segment are not inside the specified drawing.
12.1 Exploring Solids.
1/29/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Triangulations and Guarding Art Galleries Carola Wenk.
UNC Chapel Hill M. C. Lin Computing Voronoi Diagram For each site p i, compute the common inter- section of the half-planes h(p i, p j ) for i  j, using.
Convex Sets & Concave Sets A planar region R is called convex if and only if for any pair of points p, q in R, the line segment pq lies completely in R.
Clipping Primitives. Clipping line Clipping rectangle: – x min to x max – y min to y max A point (x,y) lies within a clip rectangle and thus displayed.
9/8/10CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2010 Triangulations and Guarding Art Galleries Carola Wenk.
Common Intersection of Half-Planes in R 2 2 PROBLEM (Common Intersection of half- planes in R 2 ) Given n half-planes H 1, H 2,..., H n in R 2 compute.
An Introduction to Computational Geometry: Arrangements and Duality Joseph S. B. Mitchell Stony Brook University Some images from [O’Rourke, Computational.
Polygon Triangulation
Computational Geometry
UNC Chapel Hill M. C. Lin Geometric Data Structures Reading: Chapter 10 of the Textbook Driving Applications –Windowing Queries Related Application –Query.
CMPS 3130/6130 Computational Geometry Spring 2017
3. Polygon Triangulation
Introduction to Polygons
Computer Graphics CC416 Week 13 Clipping.
Transformations contd.
The Art Gallery Problem
Craig Schroeder October 26, 2004
Computational Geometry Capter:1-2.1
The Art Gallery Problem
Polygon Triangulation
Depth Estimation via Sampling
Convex Sets & Concave Sets
I. The Problem of Molding
CMPS 3130/6130 Computational Geometry Spring 2017
Computational Geometry
Overlay of Two Subdivisions
Presentation transcript:

I. The Problem of Molding Does a given object have a mold from which it can be removed? object not removable mold 1 object removable Assumptions The object is polyhedral. The mold has only one piece. Spherical objects cannot be manufactured using a mold of one piece. The object should be removed by only a single translation. Real screws cannot be removed by just a translation. mold 2

Castability How to choose the orientation? The object has a horizontal top facet – the only one not in contact with the mold. # possible orientations = # facets. An object is castable if it is removable from its mold for one of the orientations. Because every facet may become horizontal. How to determine the object is castable? For each potential orientation, determine whether there exists a direction along which the object can be removed from the mold.

Making Things More Precise polyhedron The mold is a rectangular block with a concavity that exactly matches the polyhedron. Its topmost facet is horizontal and chosen to be xy-plane. Top facet of the polyhedron is coplanar with the xy-plane. Ordinary facet f: a facet of the polyhedron that is not the top. F : the facet in the mold that corresponds to f. Problem Decide whether a direction d exists such that P can be translated to infinity without colliding with the mold. P

Necessary Condition for Removal polyhedron P d has a positive z component.   chosen to be in [0,  ]. d The translation of a facet f cannot penetrate into the corresponding facet F of the mold.  F blocks the translation if d forms an angle >  /2 with its outward normal.  d must make an angle >  /2 with the outward normal of every facet of P. (necessary condition) angle between two vectors

Also a Sufficient Condition Theorem The polyhedron can translate out of the mold in a direction d iff d makes an angle >  /2 with the outward normal of all facets except the top one. Proof  (  ) By contradiction. Suppose d makes an angle <  /2 with the outward normal of some facet f. (  ) By contradiction. Suppose P collides with the mold translating in direction d. P p Let p be the point on P that collides with a facet F of the mold. p is about to move into the interior. d n The outward normal n of F makes an angle >  /2 with d. The outward normal of f makes an angle <  /2 with d. # f Then any interior point of f collides with the mold in the translation.

One Trans vs. Multiple Trans Polyhedron removable by a sequence of translations.  There exists at least one direction d which makes an angle   /2 with the outward normal of every polyhedron face.  Removable along the direction d. Allowing for multiple translations does not help.

Representing a Direction d to make angle   /2 with the normal of every facet. z =1 x y z Every point (x,y,1) represents a direction. The set of all directions with a positive z component is represented by the plane z = 1. d

Geometric Interpretation z =1 x y z Let d = (d, d, 1). x y Let n = (n, n, n ) be the outward normal of one facet. Then x y z n n  d = 0  an area to one side of the line n  d = 0 on the plane z = 1.  when the facet is horizontal, the constraint is either true for all d or false for all d (easy to verify).

Geometric Formulation Every non-horizontal facet defines a closed half-plane of z = 1. The intersection of all such half-planes is the set of points that correspond to a direction in which the polygon can be removed. Given a set of half-planes, compute their common intersection. Castability test: Enumerate all facets as top facet. If P is castable, a mold and a removal direction can be computed within the same time bound. This can be done in expected time O(n ) and O(n) storage. 2

II. Intersection of Half-Planes n half-planes h : a x + b y  c, 1  i  n i i Their intersection must be a convex set, more specifically, each a convex set! A convex polygonal region. At most n edges. May be unbounded May degenerate into a line, segment, a point, or an empty set.

Some Possible Cases

A Divide-and-Conquer Algorithm IntersectHalfplane(H) Input: A set H of n half-planes in the plane Output: The convex polygon region C =  h 1.if | H | = 1 2. then C  the unique half-plane h  H 3. else split H into sets H and H of size  n/2  and  n/2 . 4. C  IntersectHalfplane(H ) 5. C  IntersectHalfplane(H ) 6. C  IntersectConvexRegion(C, C ) hHhH

Intersection of Convex Regions The intersection of two polygons in O((n+k) log n) time. #vertices#intersections Modify the algorithm to intersect two convex regions. Every intersection v of an edge of one region with an edge of the other must be a vertex of the intersection region. The intersection region has  n edges and vertices.  k  n k  n  IntersectConvexRegion takes time O(n log n). v

The Recurrence IntersectHalfplane(H) Input: A set H of n half-planes in the plane Output: The convex polygon region C =  h 1.if | H | = 1 2. then C  the unique half-plane h  H 3. else split H into sets H and H of size  n/2  and  n/2 . 4. C  IntersectHalfplane(H ) 5. C  IntersectHalfplane(H ) 6. C  IntersectConvexRegion(C, C ) hHhH Let T(n) be the running time. // T(n/2) // O(n log n) // T(n/2) T(n) = O(1) if n = 1 O(n log n) + 2T(n/2), if n > 1.  T(n) = O(n log n) 2

Improvement The subroutine for intersection of convex regions is a transplant from that for intersecting two simple polygons. We made use of the convexity in our analysis. Can we do better? But we haven’t taken full advantage of convexity yet … Yes! Assumption (non-degeneracy): The regions to be intersected are 2-dimensional. (The degenerate cases are easier.)

Representing a Convex Region left boundary right boundary Left and right boundaries as sorted lists of half-planes during traversals from top to bottom. h 2 h 1 h 4 h 3 h 5 h 6 Denote the two lists by L and R. L(C) :,, h 1 h 5 h 4 R(C) :,, h 2 h 3 h 6 Vertices can be easily computed by intersecting consecutive bounding lines. But they are stored explicitly. An horizontal edge, if exists, belongs to the left boundary if bounding C from above and to the right boundary otherwise. C

Plane Sweep Again Assumption: no horizontal edge (easy to dealt with if not true). Sweep downward to merge two convex regions C and C. 1 2 l_e_C1, r_e_C1, l_e_C2, r_e_C2 At most four edges intersecting the sweep line. Corresponding pointer set to nil if no intersection. C 1 C 2 r_e_C1r_e_C1 l_e_C1l_e_C1 l_e_C2l_e_C2 r_e_C2 = nil

No Event Queue Next event point: Highest of the lower endpoints of the four edges that intersect the sweep line. the y-coordinate of the highest vertex of the two chains, or  if one chain has one edge extending upward. Start at O(1) The new edge e is one of the following: 1. part of C and on the left chain 1 2. part of C and on the right chain 1 3. part of C and on the left chain 2 4. part of C and on the right chain 2

Left Boundary of Chain 1 p: upper endpoint of e. Three possible cases involving e and p in the intersection C: e p p lies inside C 2 This can be determined by checking whether p is between l_e_C2 and r_e_C2. Add the half-plane with e part of its boundary to the list L. e intersects l_e_C2.  C has an edge with p as the upper endpoint.  the intersection is a vertex of C.  the edge of C starting at the vertex is either part of e or l_e_C2. Add the appropriate edge(s) to the list L. p l_e_C2l_e_C2 e e l_e_C2l_e_C2 p 2 new edges

cont’d e intersects r_e_C2. p e r_e_C2r_e_C2 e r_e_C2r_e_C2  both edges contributing an edge to C starting at the intersection. Case 1. the new edges start at the intersection Add the half-plane defining e to L and the one defining r_e_C2 to R. Case 2. the new edges end at the intersection Do nothing because these edges have been discovered.

Running Time It takes O(1) time to handle an edge. Intersection of two convex polygonal regions takes O(n) time. Recurrence for the total running time: T(n) = O(1) if n = 1 O(n) + 2T(n/2), if n > 1. Theorem The common intersection of n half-planes in the plane can be computed in O(n log n) time and O(n) storage.  T(n) = O(n log n)