The project implements the Bentley Ottmann algorithm using the FastAPI framework.
Project to pass the course analytical geometry.
The following data structures were used in the algorithm:
- Priority Queue based on heap.
- AVL Tree
More information:
- https://en.wikipedia.org/wiki/Priority_queue
- https://en.wikipedia.org/wiki/AVL_tree
- https://docs.python.org/3/library/heapq.html
- No two line segment endpoints or crossings have the same x-coordinate.
- No line segment endpoint lies upon another line segment.
- No three line segments intersect at a single point.
More information:
- https://en.wikipedia.org/wiki/Bentley%E2%80%93Ottmann_algorithm
- https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection
- Install docker
- Install docker-compose
- Create
.env
file in main folderbentley-ottmann-api/.env
. (Complete the.env
file according to the.example_env
file) docker-compose up --build
-
Board
- GET
/boards/
list all boards name - POST
/boards/
create board - GET
/boards/{name}/
get details board (name and line coordinates) - DELETE
/boards/{name}/
delete board with details
- GET
-
Line
- POST
/boards/{name}/line/
add line to board - POST
/boards/{name}/generate-random-lines/
generate random lines on board - DELETE
/boards/{name}/clear-lines/
clear all lines from board
- POST
-
Draw
- POST
/boards/{name}/draw/
draw lines on board - POST
/boards/{name}/intersection-points/draw/
draw all intersections points on board
- POST
-
Intersection Points
- GET
/boards/{name}/intersection-points/
get all intersection points coordinate - POST
/boards/{name}/intersection-points/
find all intersection points (Bentley-Ottmann algorithm)
- GET
- Open in browser
docs/_build/html/index.html