1.4 Exercises (cont.) Definiton: A set S of points is said to be affinely (convex) independent if no point of S is an affine combination of the others.

Slides:



Advertisements
Similar presentations
Vector Spaces A set V is called a vector space over a set K denoted V(K) if is an Abelian group, is a field, and For every element vV and K there exists.
Advertisements

VC Dimension – definition and impossibility result
Polygon Triangulation
Relations Relations on a Set. Properties of Relations.
2/9/06CS 3343 Analysis of Algorithms1 Convex Hull  Given a set of pins on a pinboard  And a rubber band around them  How does the rubber band look when.
Lecture 3: Parallel Algorithm Design
1/13/15CMPS 3130/6130: Computational Geometry1 CMPS 3130/6130: Computational Geometry Spring 2015 Convex Hulls Carola Wenk.
Computing Convex Hulls CLRS 33.3
Convex Hull obstacle start end Convex Hull Convex Hull
CS16: Introduction to Data Structures & Algorithms
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.
The Divide-and-Conquer Strategy
Convex Hulls in Two Dimensions Definitions Basic algorithms Gift Wrapping (algorithm of Jarvis ) Graham scan Divide and conquer Convex Hull for line intersections.
Divide-and-Conquer Recursive in structure –Divide the problem into several smaller sub-problems that are similar to the original but smaller in size –Conquer.
Ruslana Mys Delaunay Triangulation Delaunay Triangulation (DT)  Introduction  Delaunay-Voronoi based method  Algorithms to compute the convex hull 
Convex Hulls May Shmuel Wimer Bar Ilan Univ., Eng. Faculty Technion, EE Faculty.
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.
Advanced Topics in Algorithms and Data Structures Lecture 7.1, page 1 An overview of lecture 7 An optimal parallel algorithm for the 2D convex hull problem,
1 Convex Hull in Two Dimensions Jyun-Ming Chen Refs: deBerg et al. (Chap. 1) O’Rourke (Chap. 3)
8/29/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Spring 2006 Convex Hulls Carola Wenk.
5/17/2015 1:32 AMConvex Hull1 obstacle start end.
2. Voronoi Diagram 2.1 Definiton Given a finite set S of points in the plane , each point X of  defines a subset S X of S consisting of the points of.
Convex Hulls Computational Geometry, WS 2006/07 Lecture 2 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
3. Delaunay triangulation
Computational Geometry The art of finding algorithms for solving geometrical problems Literature: –M. De Berg et al: Computational Geometry, Springer,
Computational Geometry The art of finding algorithms for solving geometrical problems Literature: –M. De Berg et al: Computational Geometry, Springer,
Exercise 1- 1’ Prove that if a point B belongs to the affine / convex hull Aff/Conv (A 1, A 2, …, A k ) of points A 1, A 2,…, A k, then: Aff/Conv (A 1,
Computational Geometry The art of finding algorithms for solving geometrical problems Literature: –M. De Berg et al: Computational Geometry, Springer,
Algorithm 1. (Convex Hull) - Pseudo code - Input. A set of points in the plane. Output. A list containing the vertices of Conv ( P). 1. Sort the points.
Algorithm3. (3-dim) Assumptions Points are ordered in a sequence increasingly with respect to the x coordinate. Points having the same x coordinate are.
Exersise 01 If A 1 is the foot of the bisector at A of the triangle ABC, and b, c the lengths of the sides CA, AB respectively, then A 1 = (Bb + Cc)/(b.
Lection 1: Introduction Computational Geometry Prof.Dr.Th.Ottmann 1 History: Proof-based, algorithmic, axiomatic geometry, computational geometry today.
Brute-Force Triangulation
Induction and recursion
A brief and sketchy intro to 3D Convex Hulls Rodrigo Silveira GEOC 2010/11 - Q2.
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.
UNC Chapel Hill M. C. Lin Linear Programming Reading: Chapter 4 of the Textbook Driving Applications –Casting/Metal Molding –Collision Detection Randomized.
Line Arrangement Chapter 6. Line Arrangement Problem: Given a set L of n lines in the plane, compute their arrangement which is a planar subdivision.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Arrangements and Duality.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Arrangements and Duality.
Mathematical Preliminaries
Convex Hull. University of Manchester biologists used lasers to measure the minimum amount of skin required to wrap around the skeletons of modern-day.
Divide and Conquer Faculty Name: Ruhi Fatima Topics Covered Divide and Conquer Matrix multiplication Recurrence.
Lecture # 6 1 Advance Analysis of Algorithms. Divide-and-Conquer Divide the problem into a number of subproblems Similar sub-problems of smaller size.
Summary of the Last Lecture This is our second lecture. In our first lecture, we discussed The vector spaces briefly and proved some basic inequalities.
Linear Programming Chap 2. The Geometry of LP  In the text, polyhedron is defined as P = { x  R n : Ax  b }. So some of our earlier results should.
Approximation Algorithms based on linear programming.
Convex Hulls Guo Qi, Chen Zhenghai, Wang Guanhua, Shen Shiqi, Himeshi De Silva.
Polygon Triangulation
Theory of Computational Complexity Probability and Computing Ryosuke Sasanuma Iwama and Ito lab M1.
Computational Geometry
Section Recursion 2  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
Dr Nazir A. Zafar Advanced Algorithms Analysis and Design Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar.
Chapter 11 Sorting Acknowledgement: These slides are adapted from slides provided with Data Structures and Algorithms in C++, Goodrich, Tamassia and Mount.
Lecture 3: Parallel Algorithm Design
Algorithm design techniques Dr. M. Gavrilova
Divide and Conquer Mergesort Quicksort Binary Search Selection
Additive Combinatorics and its Applications in Theoretical CS
Convex Hull obstacle start end 11/21/2018 4:05 AM Convex Hull
Computational Geometry (35/33)
Polyhedron Here, we derive a representation of polyhedron and see the properties of the generators. We also see how to identify the generators. The results.
Computational Geometry Capter:1-2.1
Polyhedron Here, we derive a representation of polyhedron and see the properties of the generators. We also see how to identify the generators. The results.
I. The Problem of Molding
CMPS 3130/6130: Computational Geometry Spring 2017
Quantum Foundations Lecture 3
Computational Geometry
CMPS 3120: Computational Geometry Spring 2013
Convex Hull obstacle start end 4/30/2019 5:21 PM Convex Hull
Convex Hull - most ubiquitous structure in computational geometry
Presentation transcript:

1.4 Exercises (cont.) Definiton: A set S of points is said to be affinely (convex) independent if no point of S is an affine combination of the others. Affine (convex) basis B S of a set S is an affinely (convex) independent subset of S such that every point in S is an affine (convex) combination of points from B S. A set A 1, A 2,…, A k is affinely independent if and only if the set of vectors A 1 A 2,…, A 1 A k is linearly independent. Exercise 7

Every set in E n has an affine basis of k  n+1 points. (easy to prove). It has also a convex basis (not easy to prove), which is not necessarily finite. A number of points in an affine basis of a set S is constant and said to be the dimension of S. Therefore...

Theorem If S is a finite set of points, then Conv (S) is a polygon with the vertices in S. Proof: 1. There is a convex polygon P S with the vertices in S. (for example, Algorithm1) 2. P S = Conv (S).

Algorithm 1. (Convex Hull) - Pseudo code - Input. A set of points in the plane. Output. A list containing the vertices of Conv ( P). 1. Sort the points by (x,y)-coordinate, resulting in a sequence p 1,p 2, …,p n. 2. Put the points p 1 and p 2 in the list L upper with p 1 in the first position. 3. For i  3 to n 4. do Append p i to L upper 5. while L upper contains more than two points and the last three points in L upper do not make a right turn 6. do delete the middle of the last three points from L upper the same in the opposite direction: p n to p 1: Make L lower 12. Remove the first and the last point from L upper. 13. Append L upper and L lower to make L. 14. return L.

Algorithm 1, Step 5: pipi pipi X X X pipi X X X pipi

Left – Right decision Degeneracy O, O,  The complexity of Algorithm 1 is O(nlogn) Exercise 8= Implementation of Algorithm 1 XPiXPi YPiYPi X P i-2 Y P i-2 X P i-1 Y P i > = < 0 XPiXPi X P i-2 X P i-1 = - XPiXPi - Y P i-2 - YPiYPi YPiYPi Y P i-1 - Algorithm 1 (cont.)

Algorithm2. (2-dim) Assumption. The points are ordered in a sequence increasingly with respect to the x coordinate. The vertices having the same x coordinate are ordered with respect to the y coordinate middle ones omitted. The algorithm is incremental (inductive), at the step k+1 the (k+1) st point A k+1, as well as the convex hull of the previous points, are used to produce the convex hull C k of the first k+1-points. (Exercise 9 = Implementation of algorithm 2)

Storing data. -Edges (oriented): origin and the pointer to the “next” edge. -Vertices: a point A and the edge AB originated at A. Algorithm2. (2-dim) Step k Find the the two vertices of C k which divide the “visible” and the “invisible” part of C k with respect to (“from”) the point A k+1.

B0B0 B1B1 BrBr BsBs A k+1 [A k+1 B m-1, A k+1 B m ] = B m-1x - A k+1x B m-1y - A k+1y B m x - A k+1x B m y - A k+1y Algorithm2. (2-dim), Step k+1(cont.)

Denote B 0 =A k. The vertices B m are obtained recursively so that B m-1 B m is the oriented edge of C k and that the 2X2 determinant [A k+1 B m-1, A k+1 B m ] is not positive. In another words, the vertices B m are in the visible part of C k. Let B r be the last one in the sequence having negative determinant, i.e. such that the determinant corresponding to B r and the next vertex of C k is not negative. Hence, the vertex B r is one of the two vertices we are looking for. Similarly, starting with B 0 we can inductively obtain a sequence of the vertices B m-1 with negative indices having the same property. Let B -s be the last vertex in this sequence. Algorithm2. (2-dim), Step k+1(cont.)

2. Vertices B -s + 1,…, B r - 1 are deleted together with the corresponding edges. Vertex A k+1 is added together with the edges B -s A k+1 and A k+1 B r. B r B -s B r+1 A k+1 B -s A k+1 B r+1 Algorithm2. (2-dim), Step k+1(cont.)

3. If there is the vertex B -s -1 i.e if the points B -s -1, B -s and A k+1 are collinear, the middle point B -s is omitted and the edges B -s -1 B -s and B -s A k+1 are substituted with B -s -1 A k+1.The same procedure is performed with the vertex B r.. Algorithm2. (2-dim), Step k+1(cont.)