Computationl Geometry problems

  • Thread starter JasonJo
  • Start date
  • Tags
    Geometry
In summary: Therefore, we can reduce the problem to finding the closest point out of a set of points, which can be solved using a Voronoi diagram. By storing the Voronoi diagram and using it to quickly determine which region a given point is in, we can quickly answer the query. In summary, the solution to this problem involves constructing a Voronoi diagram and using it to determine the closest point to a given query point within a certain distance, reducing the problem to a point location query.
  • #1
JasonJo
429
2
Point location query:

(a) Show how to do point in polygon query using O(n) preprocessing time and the actual query in 0(logn) time for a convex polygon without having to resort to triangulation as the preprocessing and without having to use Kirkpatrick's DAG as the query.

the O(n) preprocessing time is the time needed to build a data structure that allows us to use O(logn) query time.

(b) what about for x-monotone polygons?

I figure for (a), since the polygon is convex, i can find the left and right extreme points and binary search q by the x coordinate to see if it's between the right and left most extreme polnt of the polygon. but then what? do i do n left tests? that doesn't take logn, the binary search by x is log n, but n left tests is 0(n). any ideas?

also, i don't know how to adapt the method for the x-monotone polygon, any help or hints is greatly appreciated



Given a set S of n points in the plane, find a method of constructing a data structure that allows you to answer quicly a query of the form: is there a point of S within distance r of point q = (qx,qy) the query is specified by 3 numbers: (r, qx, qy)
 
Physics news on Phys.org
  • #2
You might try part (b) of the problem first, since convex polygons are a strict subset of x-monotone polygons.
Hint: What do you know about x-monotone polygons?

For the second part:
Is there a fast way to figure out which s in S is closest to q?
 
  • #3
x-monotone polygons are? i don't quite see the hint, sorry, i just have been going blank on this problem for the last few days

so I'm assuming we build a Voronoi diagram of the s points, and we can answer the query "quickly" using the Voronoi diagram data structure? am i close?

thanks
 
  • #4
JasonJo said:
x-monotone polygons are? i don't quite see the hint, sorry, i just have been going blank on this problem for the last few days

Well, what definition of x-monotone polygon are you using?

so I'm assuming we build a Voronoi diagram of the s points, and we can answer the query "quickly" using the Voronoi diagram data structure? am i close?

So, what would you do with the Voronoi diagram?
 
  • #5
i'm using the definition that a polygon is x-monotone if the boundary of P can be split into two polygonal chains A and B such that each chain is monotone with respect to L

with the Voronoi diagram? i don't know lol
 
  • #6
JasonJo said:
i'm using the definition that a polygon is x-monotone if the boundary of P can be split into two polygonal chains A and B such that each chain is monotone with respect to L

Ah, OK. I was thinking of it as:
'Vertical' lines intersect the polyon at most once.

with the Voronoi diagram? i don't know lol

Ok, let's try a different approach, what if [itex]|S|=1[/itex], that is, if there is only one point in [itex]S[/itex], can you get the answer quickly?
 
  • #7
In a., fix (over all queries) an interior point P of the polygon and fix some other point R, and let the query point be Q. What information can be gained from angle RPQ?
 
Last edited:
  • #8
i solved the one about the convex and x-monotone polygons

however, i don't get the: Given a set S of n points in the plane, find a method of constructing a data structure that allows you to answer quicly a query of the form: is there a point of S within distance r of point q = (qx,qy) the query is specified by 3 numbers: (r, qx, qy) still.

my professor said it had something to do with: recall the discussion about VOronoi diagrams and the relationship
to point location methods (e.g., Kirkpatrick's)

any help?
 
  • #9
I have not had the course you are taking, but this may be helpful: if you have a way of quickly determining which region of a Voronoi diagram a given point is in, that would allow you to solve this problem.
 
  • #10
Edit:

Ah I Finally Got It!

Thanks Guys!
 
Last edited:
  • #11
If there were any points within r of q, then the closest point to q would be one of those points.
 

FAQ: Computationl Geometry problems

What is computational geometry?

Computational geometry is a branch of computer science that deals with the algorithmic solution of geometric problems. It involves the study and design of efficient algorithms for solving problems involving geometric data, such as points, lines, polygons, and curves.

What are some common applications of computational geometry?

Computational geometry has many practical applications, such as in computer graphics, robotics, geographic information systems, and computer-aided design. It is also used in fields like architecture, physics, and biology.

What are some challenges in solving computational geometry problems?

One challenge in solving computational geometry problems is dealing with the complexity and precision of geometric data. Another challenge is designing efficient algorithms that can handle large and complex datasets. Additionally, some problems in computational geometry are NP-hard, meaning there is no known algorithm that can solve them in polynomial time.

What are some common techniques used in computational geometry?

Some common techniques used in computational geometry include triangulation, convex hulls, Voronoi diagrams, and Delaunay triangulation. Other techniques include sweep line algorithms, divide and conquer algorithms, and random sampling algorithms.

How does computational geometry relate to other fields of computer science?

Computational geometry is closely related to other fields of computer science, such as data structures, algorithms, and computational complexity. It also has applications in fields like computer vision, machine learning, and data science. Additionally, techniques from computational geometry are often used in solving problems in other areas of computer science.

Similar threads

Replies
39
Views
6K
Replies
1
Views
1K
Replies
3
Views
3K
Replies
1
Views
1K
Replies
1
Views
1K
Replies
7
Views
2K
Replies
9
Views
4K
Replies
3
Views
1K
Back
Top