Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://rkaneriya.github.io/point-location/
An interactive implementation of Kirkpatrick's point location algorithm.
https://rkaneriya.github.io/point-location/
Last synced: 2 months ago
JSON representation
An interactive implementation of Kirkpatrick's point location algorithm.
- Host: GitHub
- URL: https://rkaneriya.github.io/point-location/
- Owner: rkaneriya
- Created: 2016-01-14T07:19:35.000Z (about 9 years ago)
- Default Branch: gh-pages
- Last Pushed: 2023-05-13T16:29:42.000Z (over 1 year ago)
- Last Synced: 2024-08-04T00:11:18.301Z (5 months ago)
- Language: JavaScript
- Homepage: http://rkaneriya.github.io/point-location
- Size: 39.1 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-computational-geometry - Kirkpatrick's Point location - A data structure and method for point location with O(n) space and O(log n) query time using triangulation. (Algorithm Visualizations)
README
# Kirkpatrick's Point Location
An interactive implementation of Kirkpatrick's point location algorithm for COS 451 (Computational Geometry).Play with it [here](http://rkaneriya.github.io/point-location), or [watch a demo](https://youtu.be/xQZackH69BQ). Read the original paper by Kirkpatrick [here](https://www.cs.princeton.edu/courses/archive/fall05/cos528/handouts/Optimal%20Search%20In%20Planar.pdf).
---
## Instructions
1) Click within the bounding triangle to create a simple polygon. Select "Close Polygon" when finished.
2) Select "Triangulate" to triangulate the polygon as well as the region outside the polygon but inside the bounding triangle.
3) Select "Find Independent Set" to highlight a set of vertices in the resulting graph.
4) Select "Remove Set & Re-Triangulate" to remove the highlighted points and re-triangulate the "holes" left by their removal.
5) Repeat steps 2 & 3 until the coarsest triangulation (the bounding triangle) is reached.
6) Select a "query point" inside one of the faces of the base triangulation.
7) Repeatedly select "Step" to view each level of triangulation with the triangle containing the query point highlighted in yellow.
## Implementation
O(n) space complexity and O(n^2) time complexity for pre-processing the planar graph. O(log n) for point location queries.
I used the following module for triangulation: https://github.com/mapbox/earcut (uses the ear-clipping algorithm for O(n^2) triangulation).