Download zip package and dependencies from GitHub.
- NumPy is used to calculate dimensions of free space diagrams.
- Free space diagrams are stored using Shapleys Polygon and Multipolygon classes.
- The GUI of the free space diagram is built using matplotlib.
To run the program, run a command line execution in the package with format:
python3 main.py <graph filename: str> <curve filename: str>
Flags:
-
-e
type: float | specifies the Epsilon value for the free space diagram. -
-n
type: int | number of area approximation terms (Δ) of each cells free space. -
-f
type: str | saves plot as a type of file. -
-l
type: str logged computation of Traversal Distance and free space diagram as a .log file. -
-a
type: float given Epsilon, prints the area of the free space diagram. -
-p
plots graph and curve in 2D.
Sample graph and curve files can be copied and pasted into the command line.
- samples/A samples/B
- samples/H samples/G
- samples/P samples/Q
- samples/arc_de_triomphe samples/vehicle_path
This image shows the Arc de Triomphe is Paris, France. It is surrounded by twelve intersecting roads and one pedestrian tunnel. arc_de_triomphe.jpg:
Given a roadmap, we can build the road network surrounding the monument and a path for any given vehicle.
python3 main.py samples/arc_de_triomphe samples/vehicle_path -f docs/arc_de_triomphe_.png
arc_de_triomphe_freespace.png:
In this plot, the road network is defined as a graph (colored black) and the vehicle path is defined as a curve (colored dashed gray). By computing the Traversal Distance of the graph and curve, we can visualize the free space diagram is 3D space.
python3 main.py samples/arc_de_triomphe samples/vehicle_path -e 5.0 -f docs/arc_de_triomphe_graphpng
arc_de_triomphe.png: The free space is shown where epsilon equals five.
To approximate the smoothness of the an elliptical free space diagram, compute the Traversal Distance on a set of sub divided edges from each edge of a curve and graph.
python3 main.py samples/P samples/Q -e 5.0 -n 5
n_approximation_0.png: The free space shown has no approximation, the following free space shown has an approximation of 5. n_approximation_5.png: When the number of approximations increases in the following free space from 5 to 50, the curvature of the free space becomes smoother. n_approximations_50.png:
To Save the data generated by the Traversal Distance and free space diagram, create a log as the program runs.
python3 main.py samples/P samples/Q -e 5.0 -n 50
- Will Rodman | wrodman@tulane.edu
- Dr. Carola Wenk | cwenk@tulane.edu | https://www.cs.tulane.edu/~carola/
- Erfan Hosseini | shosseinisereshgi@tulane.edu | https://erfanhosseini.com
- Emily Powers | epowers3@tulane.edu
- Rena Repenning | | http://renarepenning.com
1.0. 12-8-2022 1.1. 12-23-2022
MIT License • Copyright (c) 2022 Computational Geometry @ Tulane