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

Module 2-What Is CG1

Uploaded by

fardin.iqbal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Module 2-What Is CG1

Uploaded by

fardin.iqbal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

AMS 345/CSE 355

Computational Geometry

Module: What is CG? Examples of CG problems

Joe Mitchell
Learning Objectives
• Understand what computational geometry is, as a
field of study
• Be able to specify or recognize some basic
computational geometry problems, at a high level
What is CG?
• The algorithmic and mathematical study of
efficient methods to solve geometric problems
CG Application Areas
• Robotics • Sensor networks
• Graphics, visualization • Optimization, LP
• Computer vision • Manufacturing
• Machine learning • Transportation
• Statistics • Finance
• Virtual environments, • Biology, chemistry
games • Simulation
• Databases • GIS, maps
• Social networks • Architecture
• Etc, etc
Examples of CG Problems
• Visibility computation
• Optimal coverage, enclosure, packing
• Shortest paths, networks
• Motion planning for robots
• Intersection detection
• Linear programming (LP), optimization
• Convex hulls
• Separation, clustering (machine learning)
• Pattern matching/shape similarity
Example 0
• Data processing: given n points
Find min-enclosing ball

Naïve: Try “all” circles


brute force: O(n4)
Better: O(n log n),
even O(n)

Issue: outliers
Fundamental Problem: 2D Convex
Hulls More generally:
CH(polygons)

• Input: n points S = (p1, p2, …, pn)


p2

p7 p4
p8
p3
p1 p6
p5
p9
Output: (9,6,4,2,7,8,5)

• Output: A boundary representation, e.g., ordered list


of vertices (extreme points), of the convex hull,
CH(S), of S (convex polygon)
Example: Algomation
“Graham scan” algorithm
Example: Algomation
“QuickHull” algorithm
Example 1
• Point-in-polygon test: Is point q inside simple
polygon P?
Naïve: O(n) per test
CG: O(log n)

P n-gon
Applet: O’Rourke
Example

https://visualgo.net/en/polygon
Example 2
• Segment intersection: Given n line segments
in the plane, determine:
– Does some pair intersect? (DETECT)
– Compute all points of intersection (REPORT)

Naïve: O(n2)
CG: O(n log n) detect, O(k+n log n) report
Example 3
Post office problem: Voronoi diagrams

[https://lcc.ncbr.muni.cz/whitezone/development/mole/web/docs/doc_alg.php]
Delaunay Triangulation
https://writings.stephenwolfram.com/2023/02/what-is-chatgpt-doing-and-why-does-it-work/
https://writings.stephenwolfram.com/2023/02/what-is-chatgpt-doing-and-why-does-it-work/
https://writings.stephenwolfram.com/2023/02/what-is-chatgpt-doing-and-why-does-it-work/
https://writings.stephenwolfram.com/2023/02/what-is-chatgpt-doing-and-why-does-it-work/
https://writings.stephenwolfram.com/2023/02/what-is-chatgpt-doing-and-why-does-it-work/
Example 4
Triangulation of points, polygons “Mesh Generation”

[wikipedia]

http://www.cosy.sbg.ac.at/~held/projects/triang/triang.html
Triangulation
• Input: Set S of n points

• Input: Other shapes

Simple polygon Polygon with holes Planar Straight-Line Graph (PSLG)


• 3D: Surfaces and solids (tetrahedralization)
Example 5
• Sensor placement, “guarding”
The Problem

Determine a small set of guards to see all of a given


polygon P

8 guards suffice to cover P


(what about 7 guards? 6? 5? 4?)
Example

https://rawgit.com/hexahedria/math_198o_gallery/master/index.html#
Jackson Warley: https://github.com/hexahedria/math_198o_gallery
QOTD, Part 2: 8/26/2024
For the polygon in the example, what is
g(P)=min # guards (points) to see all of it?
Mobile Robotic Guard
• Visit all visibility polygons Subject to: stay
inside polygonal
domain P

Watchman Route Problem


Example 6
• Shortest path for a mobile robot

Local Optimality: Shortest paths are “taut”


Thus, can search the “visibility graph”
Shortest Path Map
Decomposition of the free space
Shortest Paths
go through
same vertices

Construct in time: O(n log n);


size O(n)

39
Route Planning in Google Maps
• Alternate routes are suggested
TSP: 532 Cities in USA

http://www.math.uwaterloo.ca/tsp/gallery/igraphics/att532.html
Example 7
Collision detection in virtual 3D worlds

QuickCD

You might also like