0% found this document useful (0 votes)
10 views15 pages

AMS345-Module 2-GMT2-transcript

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 TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views15 pages

AMS345-Module 2-GMT2-transcript

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 TXT, PDF, TXT or read online on Scribd
You are on page 1/ 15

SPEAKER 2

Okay, today's module is going to address the question, what is computational


geometry in doing so, I hope to give you some examples of computational geometry
problems and give you some appreciation for what the discipline is about. So the
learning objectives are precisely that you want to understand what computational
geometry is as a field of study

SPEAKER 0
and be able to specify or recognize some basic computational

SPEAKER 2
geometry problems at a high level. So what is the computational geometry? My
definition is as follows. I call it the algorithmic and mathematical study of
efficient methods to solve geometric problems. Here's what Wikipedia calls
computational geometry and there's an entry there and many topics and computational
geometry are covered quite well in Wikipedia.

SPEAKER 1
I do refer you to those topics.

SPEAKER 2
Many of the things that we study in the course actually have very good
computational geometry pages associated with them on Wikipedia, where you can find
lots of additional information and links to more information. So some computational
geometry application areas. Well, practically every discipline these days in
engineering or science has some form of computational geometry applications
associated with it. I got into the field through robotics. I was doing a summer
internship at a robotics lab and programming mobile robots to move around in a lab
and eventually programming uh driverless cars or what became driverless cars.

SPEAKER 0
Um I also worked in graphics and visualization and got

SPEAKER 2
a good appreciation for the need to do geometric computations efficiently in doing
those algorithms. Computer vision. Machine learning is very hot topic these days
statistics fitting data to various shapes, virtual environments and gains. We'll
talk a little bit about that. Uh database search, social networks of all sorts
sensor networks, communication networks, optimization, linear programming. If you
know what that is. We teach operations research here at stony brook and
optimization is a form of computational geometry, manufacturing applications. Many
transportation google maps et cetera.

SPEAKER 0
There have been several of my students who have worked

SPEAKER 2
in the finance area and they've applied computational geometry methods to solve
finance problems.

SPEAKER 0
Biology and chemistry. A lot of molecules are modeled with geometric structure and

SPEAKER 2
computational geometry is underlying many of the algorithms used in computational
biology and computational chemistry simulations of all sorts geographic information
systems and maps, architecture, construction etcetera, etcetera. I have yet to find
a field that does not have computational geometry applications associated with it.
So I'll give you some examples of specific computational geometry
SPEAKER 0
problems. We're not going to see all of these today, but these are some of the
problems where it shows up. We'll be talking in this course, some about visibility
computation what visibility means. I'll have to define that various kinds of
optimal coverage problems, sensor coverage or guarding problems. We're going to
talk about those early in the course. In fact, your first homework involves optimal
coverage problems, shortest paths, optimal networks of various sorts motion
planning for robotics will perhaps have time to cover a little bit of that topic.
Intersection detection will definitely be covering linear programming is a topic.
I'm mostly covering the graduate course in the spring, but we'll refer to it and
and we'll certainly see some

SPEAKER 1
optimization problems related to linear programming.

SPEAKER 0
Convex hulls is a core problem area in computational geometry and we'll see several
algorithms for that. I'll talk about that a little bit now in this module,
separation, clustering, applications that appear in machine learning.

SPEAKER 2
Much of machine learning can be viewed as a computational

SPEAKER 0
geometry problem, pattern matching and shape similarity. Again, classic
computational geometry problems. So let's start with example, zero. Uh consider I
give you end points. These are points in the plane these red dots and I want to
find the minimum enclosing ball. So a circle that goes around all of them. Well
that circle doesn't go around all of them, but that one does.

SPEAKER 2
Okay, so that and maybe that's a minimum radius circle centered at this blue dot
that encloses all of the

SPEAKER 0
red points. And notice because it's minimal, it actually will have to pass through
either two or 3 of the original data points.

SPEAKER 2
In this case it passes Through three of them.

SPEAKER 0
three points determine the circle and pin it. So, if I considered all triples of
points, if there's n points, I look at and choose three subsets and three points
determine the circle. Now, of course, some circles like the circle through these
three points would not enclose all of them. So what you could do naively is just
try every triple of points, write the equation of that circle using high school
geometry and then check every single other point to see if it lies inside that
circle and passing over all of the data once costs you what we call order and time
because you have to look at all in of the data points.

SPEAKER 2
Well, if you're doing that order and work in cubed times, because there's N cubed
roughly and choose three different

SPEAKER 0
circles to try, Then you get an algorithm that grows like into the 4th. Now here
you start to see a notation that we're going to use over and over again in the
course and that's the so called big o notation and I'll review that. But an
algorithm is order of end to the fourth if end to the fourth is roughly its rate of
of growth as N gets larger and larger.

SPEAKER 2
Now, using computational geometry techniques will be able to see that there's
better algorithms that running in log in time

SPEAKER 0
Where log is base anything you want to or 10. It turns out it doesn't matter in the
big O

SPEAKER 1
notation.

SPEAKER 0
And there's even linear time order. N is considered linear time. And that's
something for this problem that we study in

SPEAKER 2
the graduate course that I do in the spring.

SPEAKER 0
We won't get to that algorithm in this course. But I'll mention the problem here.
It's a classic problem, minimum enclosing ball is often what this problem is
called. And it's a way of representing a collection of points by perhaps the center
of a circle that's as small as possible that encloses all of them. But as this
point set depicts there there's sort of a cluster of points here and then you see
there's an outlier and notice that the minimum enclosing ball had to be pretty big
to enclose all of them. But if you allow outliers to be discarded, like we

SPEAKER 2
often do in statistics, we look at perhaps at this

SPEAKER 0
point and we say, hey, if you want to enclose most of the data, you can do so with
this much smaller green disk. So another problem in computational geometry is
minimum enclosing ball with outliers allow one point to be discarded or two points
or three points or some small number. Okay.

SPEAKER 2
Another fundamental problem in computational geometry is called the convex

SPEAKER 0
hall problem and we're going to study this quite extensively.

SPEAKER 1
Again, the input is in points in the plane.

SPEAKER 2
We often use the letter N as the size of

SPEAKER 1
an input.

SPEAKER 2
How much data are we given and we usually think of in as being very large.

SPEAKER 1
So we need to do something efficient.

SPEAKER 0
So here's endpoints and they're labeled by piece of I where eyes and Index one
through N. That's the input. And what we want to do is put a rubber band around
them to determine this region. This green polygon. It's a convex polygon that has
vortices corners that are at some of the data points and all the data points line
within this convex region. And it's the smallest convex region that contains all
the data. We call that the convex whole problem. So given these endpoints, what I
mean?

SPEAKER 2
There is I give you the X.

SPEAKER 0
Y coordinates of each of these.

SPEAKER 2
So I give you two N numbers.

SPEAKER 0
You are to output a description of the convex hull. And one way to describe it
might be by this

SPEAKER 2
sequence 96 42785.

SPEAKER 1
And then it implicitly closes back to night that's a

SPEAKER 0
description of the boundary of this convex polygon. That is, in some sense the
smallest convex polygon that encloses all of the data again, this is a good
statistical representation, perhaps of a cloud of data. How can you take a set of
endpoints and write an algorithm that lets the computer automatically figure out
what this output should be?

SPEAKER 1
So, input to your algorithm should be in points to end numbers. Output should be a
list of up to n indices that tell you the ordered list of corners that go

SPEAKER 0
around the boundary of the of the so called convex hall of the points. Instead of
convex hull of points, you might want to find the convicts hall of other shapes
here these yellow

SPEAKER 2
shapes are polygons, some of them are convex, some are

SPEAKER 0
not convex. And we'll talk about convex polygons and non convex polygons

SPEAKER 1
what they mean and how to work with them.

SPEAKER 2
So here is an algorithm, an animation. Let's see if I can get this. Uh uh huh. To
play let's say switch my point turn.
SPEAKER 0
Yeah, I'm not sure true. Playing at the moment. Turn off that and try this.

SPEAKER 2
Okay, so I'm sharing this screen. This is illustrating an algorithm. It's known as
the grand scan algorithm that is animating an algorithm to compute the convex hull
of the set of points that you see here. King can reset this algorithm and watch it
start from the beginning. So this is an animation of a computational geometry
algorithm. Its first finding a point. This will be in this case it might be the
left most of all the data points which you know

SPEAKER 1
to be a corner of convex hall.

SPEAKER 0
And now the author of this algorithm got fancy with

SPEAKER 2
the animation and showing some some segments and using color to animate which
segments are which.

SPEAKER 1
And this algorithm will will make more sense to you later. This is actually finding
what's called the lower convex salt.

SPEAKER 2
So it's it's putting a taut string from the left most point to the right most point
that goes below

SPEAKER 1
all of the points.

SPEAKER 0
It doesn't close the convicts hold.

SPEAKER 1
Closing the convicts all would go around the top as well. Okay, so let me go back
to my other slides. Okay, so that was an animation of algorithm.

SPEAKER 2
Uh Actually that was a quick hall algorithm which we'll talk about. We'll also talk
about the grand scan algorithm and several

SPEAKER 1
other algorithms for convex hulls. Here's another example of a computational
geometry problem.

SPEAKER 0
It's called a point in polygon test you're asking is

SPEAKER 1
a point Q.

SPEAKER 2
Within the uh within a polygon. So here's a point Q. Here's a polygon that I've
clicked in with my mouse

SPEAKER 1
and I've gone around.
SPEAKER 2
It's the shaded light blue polygon. And if I click here at point Q is Q inside or
outside.

SPEAKER 0
Well, of course, visually I can look at it and

SPEAKER 1
who immediately it's inside the polygon.

SPEAKER 0
But how does a computer know that it's inside the public?

SPEAKER 1
one way to do it is to use computational geometry

SPEAKER 0
to do it.

SPEAKER 1
If I give you the X. Y coordinates of Q and I give you the X. Y coordinates of all
the virtues. Is that go around the boundary of this so called simple polygon. Can
you very quickly tell if this point is inside or not?

SPEAKER 2
And we'll talk about this and there will be some

SPEAKER 1
code written for it in a works book. Don't worry, we're not doing too much.

SPEAKER 2
Uh we're not we're not coding algorithms here but we will be looking at some
computer code at times.

SPEAKER 1
Okay, at a high level here is an algorithm that

SPEAKER 2
has an animation for this again.

SPEAKER 0
Let me try to click on this and take you

SPEAKER 1
to uh this option, show you another screen.

SPEAKER 2
So here is a polygon that has been drawn. And let's do a point in polygon test so I

SPEAKER 0
can click a point here and and it's animating an

SPEAKER 2
algorithmic computation over here. It's doing some things that we're going to talk
about

SPEAKER 1
later. These so called left tests and counterclockwise tests to determine
SPEAKER 2
after some computation at this point is inside that polygon.

SPEAKER 1
This particular little algorithm animation allows you to draw your own polygons. I
could clear and draw polygon that I wish I'm clicking the points and it's being
labeled by these indices. And let's see when I click done. I think it will close
it. Yes, it did.

SPEAKER 2
And I can do things like compute its area.

SPEAKER 0
We'll talk about how an area computation goes computing the

SPEAKER 1
area of the simple polygon automatically. You can do the perimeter, add up the
length of the edges that found it you can ask, is the is the polygon convex or not?
And by doing some simple calculations that are depicted here, you will be able to
tell that in this case the pentagon is not convex and there's other things as

SPEAKER 0
well.

SPEAKER 1
So let me go back again to my slides.

SPEAKER 2
So here we are again, here's another example intersection detection.

SPEAKER 1
In this case. I give you a set of line segments in the

SPEAKER 2
plane and I want to know if perhaps is there some pair of segments that intersect?
That's the detection.

SPEAKER 0
So look at all these segments. Of course there's several pairs of segments that
intersect. Another question.

SPEAKER 1
Could be the reporting question.

SPEAKER 0
Not just a yes no.

SPEAKER 2
Are there any intersecting pairs?

SPEAKER 0
But report all of the pairs of intersecting Segments.

SPEAKER 1
So there's an intersection one, 23 45 6 7. 8 of them in this case. So if I let K be
the number of reported

SPEAKER 2
intersections and in the number of line segments input K

SPEAKER 1
could be as big as in choose to, You know the set of all subsets of size two of
these

SPEAKER 2
end segments.

SPEAKER 1
So it could be roughly quadratic growing like N squared. So a naive algorithm which
is do a double nested for loop and try every segment i against every segment

SPEAKER 0
jay.

SPEAKER 1
And you would need a little bit of analytic geometry and we'll talk about that
later of how Do you

SPEAKER 2
check if one segment intersects another second?

SPEAKER 1
There's many ways to do that. But that's a calculation that you can do in so called
constant time.

SPEAKER 2
And the crucial thing is how many of those calculations

SPEAKER 1
do you do? A naive algorithm would do and choose two of them? It would try all
pairs, but that could be way

SPEAKER 2
too much time if and is huge.

SPEAKER 1
If it is a million, a million squared is quite huge and it would slow your
algorithm down.

SPEAKER 2
So using computational geometry techniques will be able to avoid

SPEAKER 1
the naive quadratic time and get something that is so called near linear time order
in law again, which is

SPEAKER 2
as fast as you can sort and numbers.

SPEAKER 1
And if you actually want to report them, not just to detect if there is an
intersection, then of course

SPEAKER 0
in the worst case you have to spend kate time if there are K intersections because
you just have to to write them down, you have to report those K
SPEAKER 2
intersections.

SPEAKER 1
But what you really like is a running time that depends on the size of the output.
If K is small or if K is zero, you don't want to pay end square, you want to pay
only something proportional to K.

SPEAKER 0
So we call that an output sensitive algorithm and we'll talk about such things a
fundamental construct and computational geometry

SPEAKER 2
and perhaps something that you've heard about in daily life is something called
Avorn oy diagram.

SPEAKER 1
And this pretty picture here is a born oy diagram of these little black dots.

SPEAKER 2
So given a set of end points in the plane, it's a partitioning of the plane into
regions according to

SPEAKER 0
who is the closest black dot.

SPEAKER 1
So if you're anywhere in this region, this black dot

SPEAKER 2
is closest If you're anywhere in this convex political region,

SPEAKER 1
that black dot is closest.

SPEAKER 0
If you're on the line segment between them, it's a tie because that line segment
lies on the perpendicular by sector of that pair of points.

SPEAKER 1
So annoyed diagram is a mathematical construct that actually gives you a
decomposition of the plane into regions according to

SPEAKER 2
which of the input sites is closest and will study

SPEAKER 1
more annoyed diagrams. To quite some extent, the planer duel of the von oy diagram.
If you recall a concept from AmS 301 planer duels of the duality in the graph
theoretic sense, the planer dual is what's called a delaney triangulation and I
won't bother to play this link. But you can do it and in it it generates some
points and then it creates this blue diagram, this set of edges. This is a planer
graph.

SPEAKER 0
It's a special plane a graph.

SPEAKER 1
It's known as a delay on a diagram or a Delaunay triangulation because in this case
all the faces or

SPEAKER 0
triangles except for this unbounded face and infinity.

SPEAKER 2
So Dylan a strangulations will be a topic. We spend a fair amount of time studying
this more generally, were interested in triangulation of points and polygons. So
here there were some black dots.

SPEAKER 1
Those are the points.

SPEAKER 0
And we decomposed the convex hull of those points into

SPEAKER 2
triangles by drawing selective edges. So a triangulation is a special kind of
planer graph

SPEAKER 1
whose faces are triangles.

SPEAKER 2
Another application of computational geometry is when I give you

SPEAKER 1
a polygon, like when I'm oust in this polygon, this red polygon, the computer is
painting it. And how is it painting it in hardware?

SPEAKER 2
It has an algorithm very fast algorithm coded that will

SPEAKER 1
paint the pixels within a triangle. But if I give you a complicated polygon, what
you actually have to do is first decompose it into triangles. So the polygon can be
written as a union of

SPEAKER 0
triangles. And we'll talk about algorithms that take a polygon and

SPEAKER 1
decompose it into triangles.

SPEAKER 0
And that's called a triangulation algorithm.

SPEAKER 1
And it's important in all areas of scientific computing and model building when
Pixar designs, characters and scenes and so on. It's doing what's called meshing,
creating meshes very often triangular

SPEAKER 2
meshes, sometimes quadrilateral meshes of of the geometric models of

SPEAKER 0
characters, of scenes of objects etcetera.

SPEAKER 1
And an important part of that is figuring out how to decompose things well into
triangles. Triangulation. To have given a set of points in the plane.

SPEAKER 2
You might want to find these magenta edges that break

SPEAKER 1
the convex hall of those points into triangles. You might be given a simple polygon
and you want to decompose it into triangles. You might be given what's called a
polygon with holes. These are holes and decompose it into triangles. Or you might
be given a more general thing, what we call a planer straight line graph and want
to decompose its convex hull into trying Now each of these

SPEAKER 0
concepts that I'm talking about is something we're going to talk about in quite a
bit of detail.

SPEAKER 1
So I'm using some terminology and some jargon that I

SPEAKER 0
haven't precisely defined yet, but will slow down will define things precisely and
we'll talk about each of these problems.

SPEAKER 1
But this is giving you a preview of the type of algorithmic problem that we will
study called the triangulation problem. In higher dimensions. You want to decompose
a 3D model into three dimensional

SPEAKER 0
triangles. What we call tetra hydra and we'll just barely mention

SPEAKER 1
this problem. It will be a generalization of the two D problem.

SPEAKER 0
Here's another problem and This relates to what we're going

SPEAKER 1
to study at the beginning and what will already be on homework 1? It's called the
guarding problem or sensor placement problem.

SPEAKER 2
Suppose I give you a room, this blue polygon. So this is a floor plan of the room
and

SPEAKER 0
I want to place guards or points or cameras at point at certain locations.

SPEAKER 1
If I put a guard at this red dot this red point, it's a camera that sees in all
directions, it will illuminate or see the yellow region. We call that the
visibility region. Now that one camera is not enough to see all of the polygon. So
the goal in the guarding Problem is to find

SPEAKER 2
a set of camera placements or guard placements in this case these five dots so that
every point in the
SPEAKER 1
in the region is seen by at least one of them.

SPEAKER 2
Okay. And we'll talk about algorithms to do that in this

SPEAKER 1
case. It's pretty clear these five points are enough, But maybe four points are
enough for three points.

SPEAKER 0
And since we're paying for each guard or for each camera, our goal in this
optimization problem is to try

SPEAKER 1
to minimize the number of guards in order to see the entire domain.

SPEAKER 2
So this is the problem that we'll be talking about in the first classes. Now, an
interesting variant of this problem that I'm working

SPEAKER 1
on in research right now is the mobile guard problem where you don't just have a
static camera but you have a mobile guard that's willing to move. The guard has to
see every point. It has to see this blue point.

SPEAKER 0
So it must have at least one.

SPEAKER 1
It must at least visit the green region. It must visit that region. That region.
That region. In fact, there's an infinite set of regions it must

SPEAKER 0
visit.

SPEAKER 1
And here for instance this red route. This is a round trip route that a mobile
robot could do in this polygon with two holes. These gray things are islands. So
this is the floor plan of your museum and you program a robot to make a round trip
along this red route. That robot will see every point. And we're interested in
finding the shortest such mobile robot loop. And that problem is known as the
Watchman root problem.

SPEAKER 2
You have to stay inside the floor plan and you want to execute the shortest route
to see every point.

SPEAKER 1
Another problem. In fact a problem I work done when I first

SPEAKER 2
got interested in computational geometry, remember I was with a

SPEAKER 1
robotics lab and we wanted to find a shortest path

SPEAKER 2
for a mobile robot to get from S to T. And these red things are obstacles.
SPEAKER 1
In my lab we actually built obstacles out of cardboard boxes and put them on the
ground and we had

SPEAKER 2
a map of the domain and you wanted to find a shortest path.

SPEAKER 1
Now it's shown in green here and it's easy to

SPEAKER 2
argue that it must lie on what's called the visibility

SPEAKER 1
graph that the edges drawn dashed. Um and once you have the visibility graph, you
could run dykstra's shortest path algorithm that you learned about in AMS 301 to
compute the shortest route in the visibility graph. Now the visibility graph is
fairly complicated because it's a

SPEAKER 2
graph on inverters is if n is the number of

SPEAKER 0
corners in the map, it might have roughly in squared

SPEAKER 1
edges. So we'll be talking about efficiency that might be able to avoid that.

SPEAKER 0
And that's a problem that I've worked on. And in fact, you can build another type
of diagram

SPEAKER 1
that encodes shortest paths in a way that's called the

SPEAKER 2
shortest path map for a fixed source.

SPEAKER 0
S decompose the plane here.

SPEAKER 1
The obstacles are these red polygons into regions according to

SPEAKER 0
how an optimal path looks from S to any point

SPEAKER 1
T. So if T is here, then the shortest path from

SPEAKER 0
STT goes via our if T were in this region,

SPEAKER 1
the shortest path would go via this corner and go back. Yeah. And if T were on this
boundary here, then it would be tied along a path that goes this way or that way.

SPEAKER 2
So, the shortest path map is like a generalization of a very annoyed diagram.

SPEAKER 0
We probably won't have time to go into this in

SPEAKER 1
any detail, but I'm just giving you this is an example of a computational geometry
problem.

SPEAKER 2
Now, a problem most of us are familiar with because

SPEAKER 1
we use our apps on our phones to compute routes that we want to get from one point
to another

SPEAKER 2
in a network of roads.

SPEAKER 1
And of course a road network is just a geometric structure uh embedded in the
plane.

SPEAKER 2
So it's a graph, but it's a graph with geometric

SPEAKER 0
coordinates because it's a geographic map and you want to

SPEAKER 1
get from one location to another location along perhaps the

SPEAKER 0
shortest path possibly taking into account traffic etcetera.

SPEAKER 1
So these are shortest path problems in geometric data.

SPEAKER 2
Again, computational geometry.

SPEAKER 1
Another problem you've heard about in a mess. 301 is the traveling salesman
problem. It's geometric version is I give you points in the plane. Maybe I give you
cities in north America or in the United States and I want a shortest route for

SPEAKER 0
a traveling salesperson to visit all of the cities.

SPEAKER 1
And this is a very hard problem. It's known to be computational e very difficult.
Its so called np hard.

SPEAKER 0
And so we often talk about approximations to this and

SPEAKER 1
there's a related concept called minimum spanning tree and we'll talk about it and
the relationship with so called Delanie diagrams.
SPEAKER 2
Finally, another example I mentioned that intersection detection shows up

SPEAKER 1
in applications.

SPEAKER 2
I worked on applications with Boeing during the design of

SPEAKER 1
some of their virtual aircraft. The Boeing triple seven was designed and built
without a

SPEAKER 2
full scale mock up and they had models of all

SPEAKER 0
of the parts. But it was A massive model with millions and millions

SPEAKER 1
of data points in three D. And they wanted to be able to do virtual queries

SPEAKER 0
like put on a glove or do virtual maintenance on

SPEAKER 1
this not yet built aircraft and do it efficiently. Of course.

SPEAKER 0
We work in virtual worlds all the time if you

SPEAKER 1
play video games and such and you need to be able to decide if one geometric
object, the models, let's say of the blue hand, intersects anything among the
obstacles

SPEAKER 0
in the environment so that you can do some kind of collision response.

SPEAKER 1
You need to be able to detect if there's intersection in the virtual world in order
to be able to

SPEAKER 0
respond to that.

SPEAKER 1
And so we built very efficient data structures to be able to do three dimensional
collision detection. And I'll give you some hints about how that's done in
practice. But we'll talk about actual algorithms to do collision detection

SPEAKER 2
and intersection detection in two dimensions. In this course, that brings us to the
end of this set of slides for this module about the question what is computational
geometry, and will continue studying some of these problems throughout this course.

SPEAKER 0
Thank you.

You might also like