Implementation of core computational geometry algorithms with emphasis on robustness, correctness, and empirical evaluation.
Reusable Python module geometria_toolkit.py implementing:
-
orient2d(p, q, r)
Robust orientation predicate using adaptive or fallback precision methods. -
convex_hull(points)
Optimal convex hull algorithm (Monotone Chain / Graham Scan). -
segment_intersection(segments)
Plane sweep algorithm (Bentley–Ottmann approach). -
Auxiliary geometric utilities.
- Clean modular implementation
- Numerical robustness
- Edge-case handling (collinearity, degeneracy)
- Unit testing per function (pytest-based)
Implementation of the Minimum Enclosing Circle problem using:
Recursive randomized algorithm with boundary set constraint:
- Base case: trivial circle from ≤ 3 boundary points
- Robust point-in-circle test
- Degenerate case handling
Comparison implementation:
- Convex hull pre-filtering
- Exhaustive evaluation of pairs and triples
- Selection of minimal enclosing circle
Execution time comparison between:
- Welzl algorithm
- Deterministic hull-based approach
Datasets tested:
- 10
- 100
- 1,000
- 10,000 points
Application of the Minimum Enclosing Circle to determine optimal antenna placement covering urban regions in Quito.
Tasks performed:
- Compute minimum enclosing circle
- Visualize:
- Input points
- Convex hull
- Enclosing circle
- Estimate coverage efficiency:
- Compare circle area vs convex hull area
- Report:
- Optimal center (geographic coordinates)
- Radius (km)
- Python 3.10+
- numpy
- matplotlib
- pytest
src/ → Core algorithms
tests/ → Unit tests
report/ → Technical documentation
pytestEmpirical comparison between the randomized Welzl algorithm and the deterministic hull-based approach shows near-linear behavior for Welzl on large datasets (n ≥ 1000), with significant speedup over exhaustive methods.
