0% found this document useful (0 votes)
12 views

Geometric Algorithms

This document presents a 3-sentence summary of a written work on geometric algorithms. It details concepts such as geometric search, polygon inclusion, and polygon intersection, and includes examples of each. The written work was carried out by 5 computer engineering students as part of the Algorithm Analysis subject.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Geometric Algorithms

This document presents a 3-sentence summary of a written work on geometric algorithms. It details concepts such as geometric search, polygon inclusion, and polygon intersection, and includes examples of each. The written work was carried out by 5 computer engineering students as part of the Algorithm Analysis subject.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

HIGHER SCHOOL OF MECHANICAL AND

ELECTRICAL ENGINEERING

CULHUACAN UNIT

CAREER: COMPUTER ENGINEERING

SUBJECT: ANALYSIS OF ALGORITHMS

WRITTEN WORK
GEOMETRIC ALGORITHMS

PROFESSOR: DR. GUARDIAN SOTO BEATRIZ DOLORES

GROUP: 5CM23

STUDENTS:
ANTONIO NORIEGA ALFREDO
ORTEGA LETTUCE JESÚS ALEJANDRO
OSNAYA ARRIETA JOSÉ DANIEL
SILVA ROBLES ARI RAÚL

DELIVERY: NOVEMBER 7, 2018

1
Content
Aim..................................................................................................................................................2
Introduction...................................................................................................................................3
Theory.............................................................................................................................................3
Examples.........................................................................................................................................7
Geometric algorithms...................................................................................................................7
Geometric Search.........................................................................................................................8
Polygon inclusion.........................................................................................................................8
Intersection of polygons...............................................................................................................9
Applications..................................................................................................................................13
Geometric algorithms.................................................................................................................13
Geometric Search.......................................................................................................................13
Polygon inclusion.......................................................................................................................13
Intersection of polygons.............................................................................................................13
Works Cited.................................................................................................................................14

Aim
The purpose of this report is to broadly detail the geometric algorithms presented, how
they are applicable and their definition.
2
Introduction
Geometric algorithms or computational geometry as it is better known is a branch of
computer science that studies algorithms to solve geometric problems. Within the
geometric algorithms, techniques such as geometric search are used, which, as its
name suggests, will analyze some characteristic or necessary key point from a
geometric space, while the inclusion of polygons will also be used, which will be given a
flat geometric figure. that is limited by three or more straight lines and has three or more
angles and vertices, some search will be carried out or polygons will be related to each
other, giving way to the intersection of polygons where it will be the union of taking more
than one polygon, being broadly speaking topics that It forms a geometric algorithms
and see that they are very applicable and from here derives some of the algorithms
such as Voronoi, Javis's March and Graham's Scan.

Figure 1. Geometric Representation

Source : M. Macho.: Posts Tagged 'computational geometry'

Theory
Although Computational Geometry emerged in the late 70s, specializing in the area of
algorithm design and analysis.
With approaches in which we sought:

3
• Systematic study of algorithms and data structures of geometric objects, with a
focus on exact (deterministic) algorithms.

• It brings together mathematical and computer science problems.

• Applications to numerous areas such as: computer graphics, geographic


information systems, robotics, computer vision, etc.

• A good solution to the Computational Geometry problem requires a good


understanding of the geometric structure of the problem and deep knowledge of
algorithms and data structures.

Geometric algorithms operate on geometric objects such as points, segments or


polygons.
We will analyze two-dimensional algorithms in which each geometric object is
represented as a set of points. { pi }donde pi=(xi , yi)con xi, yi ∈ R

Figure 2. Geometric Construction from points

Source : Miguel Sancho.: Computational Geometry

There are those who say that the first algorithm of Computational Geometry was born
when a series of correct, unambiguous steps with an end solve a geometric problem,
the precursor: Euclid, but it is only at the beginning of 1970 that Michael Shamos begins
a systematized study of problems, obsessed with the idea of creating a new discipline of
computer science, which I call Geometry
Computational

Image 1. Michael Shamos father of Computational Geometry

4
Research in this area has found many real-life applications: Robotics, speech and
pattern recognition, graphic design, geographic information systems, etc.

In computational geometry, different parameters are searched for applicable examples,


since this search is based on a series of geometric data, it will be observed and
analyzed if a certain geometric condition is met in the data, that condition is proposed
according to the proposed problem. In addition to searching, points or figures can be
located, given a partition of the geometric space, it is efficiently calculated in which cell
the point is located.

Figure 3. Search in geometric space

Source : Pablo Brasero Moreno.: Set of points

Considering the partition of the plane determined by a simple polygon (interior and
exterior region). It is the definition of the inclusion of polygons but first we must detail
what a polygon is, well a polygon is that flat geometric figure that is limited by three or
more straight lines and has three or more angles and vertices

Figure 4. Characteristics of a polygon

5
Source : s/author.: Elements of a polygon
These polygons can face being related or joined to another polygon. We know this as
an intersection where given 2 or more polygons interact.
 Where they can't occupy the same place at the same time

 There are no intersection points

 There are points of intersection between different geometric objects

 Natural extension of geometric search and localization problems

 Elimination of hidden lines in graphic design

Figure 5. Intersection of 2 polygons

Source : M. Sepúlveda: Convex Polygons:

6
Examples
Geometric algorithms
1st Example
Start
Read a, b, c
Calculate perimeter = a+b+c
Write perimeter
End.
2nd Example

3rd Example
Calcular la distancia entre dos puntos

Formula=

7
Geometric Search
1st Example
 Given a region of space, pre-process a set of figures to locate where point a, b
and c is located according to the representation

Point a lies outside


any region of some
figure
Point b is located in
the region of the
decagon.
Point c is located in
the region of the
heptagon

2nd Example
• Given a region of space, pre-process a set of points to efficiently count how
many there are in the region.

Points inside the triangular region = 5

Points outside the triangular region = 11

3rd Example
• If we think of the players on the playing field as points on a plane, we can look for
what their voronoi region will be for each of them, which will be formed by the
points on the playing field that are closer to each player than to the rest.

8
Polygon inclusion
1st Example
• A convex polygon P given by the Cartesian coordinates of its vertices as they
appear when traversing P counterclockwise.

P={(x0,y0),(x1,y1),…,(xn,yn)= (x0,y0)}
Step 1:
Find the point O, centroid of the triangle of vertices (x0,y0).(x1,y1).(x2,y2).
Step 2:
Find the list of the polar coordinates of the vertices of P, with respect to the point
O and the positive direction of the OX axis.
P = {(m0,a0),(m1,a1),…,(mn,an) = (m0,a0)}
Step 3 :
Find the minimum, a2, of the values
{a0,a1,….,an-1}.

Step 4:
Reorder the vertices of P in the following way

P = {(mk,ak),(mk+1,ak+1),…,(mn,an)
= (m0,a0), (m1,a1),…, (mk,a)}
2nd Example
• If any simple Polygon, we are going to give an algorithm to locate a point x with
respect to P that does not require any process. For clarity of the algorithm, it will
be assumed that the ordinate of point X is different from all the ordinates of the
vertices of the polygon.
P = {(x0,y0),(x1,y1),…,(xn,yn) = (x0,y0)}
X = (x,y)
Step 1:
i <= 0 , c <=0
Step 2:
If i = n go to step 6

Step 3:
If yi<y<yi+1 or yi>y>yi+1
And also point X is to the left of the right segment, so c = c+1
Step 4:
I = i+1
Step 5:
Return to step 2
Step 6:
If c is odd, the answer is, the point is interior, otherwise the point is exterior.

Intersection of polygons
1st Example
Given a set P of points in the plane, we define the convex envelope of P and call it
EC(P), as the smallest convex set that contains it.
9
We know that the set Pi = (Xi,Yi), with i = 1,…,N teaches the computer to calculate the
convex hull, as in the figure

1st Example Javis March Algorithm


• Calculate a point that we know for sure is in the convex envelope (The point with
the lowest Y coordinate) Operation time O(N)
• Calculate the angle that the remaining N – 1 points form with the and with the
horizontal, and choose the smallest Operation time O(N)
• Calculation from P0 to P1


• We follow the same procedure from P0 to P1


• For P3

10

2nd Example of Graham's Scan Algorithm
• Calculate a point EC(P), for example, the lowest P0
• Angularly order the remaining N – 1 with respect to P0
Operation cost O(N*log(N))
• Starting at P0 and following the ordered list, we check every 3 points if the
rotation through them is clockwise or counterclockwise and based on that sign
we decide whether to delete the central one or not.
Operation cost O(N) checks
• Once P0 has been chosen, we label the other points following the angular order,
as seen in the previous figure. Next, we check the direction of rotation of the first
triple (P0, P1 and P2):


• Since the rotation is positive, counterclockwise, we move forward and consider
the following triple (P0, P1, P2)


• Once again the turn is positive, we continue with (P2, P3, P4):

11

• When the rotation is negative, as in the previous figure, we eliminate the central
point of the triple which therefore will not be part of the convex envelope, we go
back one point and start again


3rd Example
• In an art gallery you want to place security cameras so that they cover the largest
area possible, while occupying the smallest number of cameras possible. How
many cameras will be necessary for any type of room? Where in the room? Do
these cameras have to be installed in the room?

12

Applications
Geometric algorithms
Computer graphics, Robotics, integrated circuit design. Geometric algorithms operate
on geometric objects such as points, segments or polygons.
Geometric Search
This process has a greater interest in geographic, statistical and automatic design
areas, which is where they are mostly applied to solve problems.
Polygon inclusion
Pattern recognition
Circuit design
Linear programming
Statistics
Intersection of polygons
Recognition of shapes that intervene in the intersection
Circuit design
Linear programming
Statistics

13
Works Cited
M.Macho. (11 de Agosto de 2012). Posts Tagged 'Geometría Computacional'. Obtenido de
https://ztfnews.wordpress.com/tag/geometria-computacional/
Mendoza, F. R. (2018). Geometría Computacional. Universidad de Los Andes, -.
Sancho, M. (13 de Julio de 2013). Geometría Computacional. Obtenido de
https://es.slideshare.net/sanchocuba/geometra-computacional-solapamiento-de-
subdivisiones
Sepúlveda, m. (25 de Junio de 2012). Polígonos Convexos:. Obtenido de Método de los Calibres
Giratorios: http://www.dma.fi.upm.es/personal/gregorio/geometria_computacional/web/
calibres_giratorios/teoria/interseccion.html

14

You might also like