The exercise involved implementing the Graham and Jarvis algorithms for computing convex hulls. Then, it was necessary to test their performance on different datasets and measure their execution time.
The algorithms for computing convex hulls were the topic of my semester project on Geometric Algorithms course. For more implemented convex-hull-search algorithms, visualizations and further information, you can explore this repository.
The Graham algorithm, also known as the Graham scan, first finds the point with the lowest y-coordinate (or the leftmost point in case of a tie). It then sorts the remaining points based on their polar angle with respect to this point and constructs the convex hull using a stack.
The Jarvis algorithm, also known as the gift wrapping algorithm, is a simple approach for computing the convex hull. It starts with the leftmost point and iteratively selects the next point that forms the smallest angle with the current edge.