https://github.com/niklasb/save-the-robot
https://github.com/niklasb/save-the-robot
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/niklasb/save-the-robot
- Owner: niklasb
- Created: 2015-11-13T15:32:57.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-08T11:49:15.000Z (over 10 years ago)
- Last Synced: 2025-02-26T00:49:53.878Z (over 1 year ago)
- Language: TeX
- Size: 749 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Save the robot
Programming project for the course 'Computational Geometry' at KIT
winter 2015/2016
### Usage
$ make # to build C++ program
$ python3 robot.py
### Example
$ python3 robot.py input/input3.in 80
Input:
Radius: 80
Warehouse: 1038 vertices
Charging stations: 130
Computing visibility graph...
Number of edges in visibility graph: 11068
Wrote visibility graph to output/visiblity.ipe
Computing SSSP for interesting points...
Computing shortest path in reachability graph...
Wrote reachability graph to output/reachability.ipe
Goal distance: 3539.8530409000014
Wrote path to output/path.ipe
Statistics:
Time visibility graph: 2.441 sec
Time reachable graph: 0.023 sec
Time final path: 0.031 sec
The output can be inspected in [Ipe](http://ipe.otfried.org/) by opening the
file `output/path.ipe`. You can find the output of the above example run
rendered as PDF files in the directory `example_output/`.
### Notes on Ipe input files
The warehouse polygon has to be drawn with `black` stroke and `gray` fill, the
holes are polygons with `black` stroke and `white` fill. The start and end point
as well as the charging stations are disks with colors `green`, `red` and `blue`,
respectively.
Please note that we did not implement translation, so you need to place the
disks and polygons *exactly* without moving them around after.